Jump to content

Forrest

Members
  • Posts

    11
  • Joined

  • Last visited

Posts posted by Forrest

  1. Mike:

    Just baught two USB to RS232 cables from USB Gear (model # USBG-232-MM).

    I plan to hook them up as: computer1(VB)-->USB--> RS232 <--Null--> RS232 <--USB<-- Computer2(LV711)

    and make a null modem between the two USB to RS232 Cables. A Little messy but it should work.

    Thanks for your help, and i will down load the snippits for TCP/IP if my solution does not work.

    Thanks Forrest :wacko:

    I second the TCP/IP recommendation, as well as the Googling for VB code samples. For Example:

    Google: VB TCP/IP code example

    You get a big list, one is at Developer Fusion community forums.

    http://www.developerfusion.co.uk/vb/41/

    Check the article: A TCP/IP socket server object for Visual Basic - Overview

    The author includes code you can cut & paste & modify.

    Cheers,

  2. Question.. what VB commands could be used in this situation.

    Thanks Forrest

    Though I like the simplicity of Serial in general, I would recommend TCP/IP in this situation. It should not be very difficult in VB to send similar commands over TCP. And on your LabVIEW side, you would have a simple TCP Client (single connection listener). You could even modify the shipping examples to suit this for your application. The rest of the code for parsing and interpreting the cycle counts need not have to change.

    The advantages of TCP are obvious: can have multiple computers (or applications within a single computer) read the counts, distance is not an issue, and can even go wireless in the future.

    My 2 Canadian cents.

    -Khalid

  3. Thanks for your suggestions:

    How easy it to implement RS232 using Visual Basic on computer(1). I would not use much handshaking... Just dump to the labview computer with a special charactor for the start of cycle counts. Such as $00000020, $00000021,$00000022 ...etc. Either pad with leading Zeros or not.. Possible at max 115K baud. Computers are within 6 feet of each other.

    Thanks Forrest :wacko:

    Forrest,

    Personally I like the ease and reliablity of the serial port. Even though the physical 9-pin connectors are going away, you can always purchase a $20 Belkin USB to RS232 adaptor that shows up in Max like any other Com port.

    We've been faced with the option to upgrade the communication method on a test box we use. Going USB requires more development on both ends. How does the guy developing the box write USB drivers and how to I interface to them in LV? Like I say, RS232 is simple and for us, already done. Speed is also not an issue for us.

    Using a TTL interface means you'll need a DAQ card to acquire the signal (or some combersome parallel port DIO scheme. I'd be interested in learning a simple way to acquire a TTL signal using standard PC hardware, if anyone knows...). If you will always have a DAQ card in the system with your third party box, then maybe it's no problem. I didn't want our box to require a DAQ card in every application.

    We didn't investigate a TCP/IP approach but again that adds some level of complexity over the RS232 solution.

    Just my two-cents...

    -James

  4. Greetings:

    I have an interesting interfacing problem brewing.

    Bad news:

    I initially was taking a cycle count thru the serial port from

    computer(1) using IBM Basic A (compiled) thru a serial port at 9600 baud. Then i was picking that cycle count with another computer(2) running Labview. The program on computer (1) is finally getting a little obsolite (no ISA ports for cards(3 ea) , cards obsolite (no PCI cards, cannot run Dos 6.2 anymore on new computers, Computer (1) software is not suported anymore. I think i have finally beat the dog to death!

    Good news:

    There was an upgrade for the software on computer(1) to run on Win XP it is using Visual Basic for control and USB to run an external Box. The third party person is willing to change his program to send cycle counts to either USB and or another form of comunication such as the serial port,(maybe to TCP/IP). Serial port would put a speed limits of the serial port. Also serial ports are going away with new computers. TCP/IP thru VB ??. Maybe even a digital (ttl) lines?. l am wondering which would be the better option into Labview 7.1.1 ??

    Any suggestions would be helpful.

    Thanks Forrest :wacko:

  5. Greetings:

    I just have the numbers coming in from the RS232. The software in the motor just uses Integer 32 , so the number in the motor rolls over. Example: 2,147,483,648 + 1 = -2,147,483,647 ; ( next count )= -2,127,483,646 ; (next count)=-2,127,483,645 ... etc.

    Now i want a variable (extended mode)

    2,147,483,648 + 1 = 2,147,483,649 ; ( next count )= 2,127,483,650 ; (next count)=2,127,483,651 ... etc.

    (ie. to increase al the time with out a sign roll over)

    Thanks Forrest

  6. Greetings:

    I have a Smart motor by animatics that has an internal encoder that rolls over on i32 integers. the encoder is

    2000 counts / rev and when you are running at 3600 RPM that will roll over in about 5 hours. (i will be running almost continousely)

    I am taking continous readings thru the RS232 port at 38400 baud of the counts.

    I need to convert the counts to a continous up positive going reading, unless the motor reverses, than a down going reading.

    Can i convert the readings into a Extended precision variable ??

    Thanks Forrest

  7. Greetings:

    Labview version 7.1.1

    I am trying to print a report using 4 XY graphs on front panel. The four graphs have to fit on one sheet of 8.5 x 11 paper from printer.

    I am having a problem of aligning the front panel graphs .

    _________

    | [1] [2] |

    | |

    | [3] [4] |

    --------------

    The Vi sequence is:

    New Report .vi

    Set report margines.vi (.25 inches x 4)

    Set report orintation.vi ( portrate)

    Append Control Image to Report.vi (reference of panel waveform #1)

    Append Control Image to Report.vi (reference of panel waveform #2)

    Append Control Image to Report.vi (reference of panel waveform #3)

    Append Control Image to Report.vi (reference of panel waveform #4)

    Then and/or Print report.vi (default printer) , save report to file.vi ( file name)

    Dispose report.vi

    The printer output is sensitive to the location and size of the front panel xy graphs.

    Is there a way to locate and size the printer output independent of the front panel size and

    position.??

    Thanks

    Forrest

  8. :

    Thanks:

    I will check this out... Also i am trying to get a hardware USB checker like the USB explorer www.ellisys.com.

    Maybe i can rent one somewhere.

    Thanks for your help...

    I'll keep you informed

    Forrest

    Greetings , I replaced all the vi's that i was communicating with the NI 4350 with the "NI435x download vi's from National instruments" and i think that has fixed the crashes using the USB bus.

    Thanks for you guys listening to my Frustration.

    Forrest :D

  9. Thanks:

    I will check this out... Also i am trying to get a hardware USB checker like the USB explorer www.ellisys.com.

    Maybe i can rent one somewhere.

    Thanks for your help...

    I'll keep you informed

    Forrest

    Hi Forrest,

    That sounds frustrating. You've definitely done everything right: you have contacted NI, sent them an example, and documented your problem and how you recover from it. I guess that I would look for some solution that might allow you to "reconnect" with the DAQ device without having to physically unplug it.

    There is probably a way to achieve this using Windows API calls -- but, I am not sure.

    A quick Google search and following the first result to a USB Developers FAQ brought me to a FAQ entry called "How can my application reset, disable, or restart a USB device?". The answer says that "The DevCon example in the Windows DDK is a command-line utility that shows how to enable, disable, restart, update, remove and query devices using the SetupAPI and CfgMgr32 API functions". I did a search on the Microsoft Support Site for CfgMgr32 and the second search result was to the DevCon command-line utility page.

    The DevCon command-line utility page has a link to...

    Download.gifDownload the DevCon package

    You can call this program (DevCon.exe) using SystemExec.vi to execute it from the command-line.

    Please let us know if this works, or if you have any other questions. I'm very interested because your problem might happen to the rest of us, and it would be comforting to know that there is a good work-around solution.

    Good luck,

  10. Greetings:

    I am getting frustrated with a USB problem with an NI 4350 that is connected either to a desktop, or a laptop

    running Win XP sp2 , or Win 2000. Using Labview 7.1.1

    The problem is that the communication will hang up and i have to unplug the usb connector when this happens

    to reistablish the connection to the labview program, or have to reboot.

    The program can run a day,hour, or a week before this happens. Debugging such randomness is very frustrating.

    I have used a powerd Hub ( still crashes), Changed to another NI4350 (still crashes) , Shut off the USB reduce power

    check on windows (still crashes).

    The errors that i get in Labview are either -10800 or -10400.

    I'm almost ready to put a watchdog timer in labview which will activate a relay and break the USB cable so that windos will reenumerate the device. !!!???

    I do not know if i have a windows (ugh) problem or a NI4350 problem, or the USB enumeration problem.

    I am using the NI4350 to send out 8 bits of Digital out and 24 bit voltage analog in (sequentially over and over again).

    I have read that there might be a problem with over voltage on the Analog in on the NI4350, low power fram a USB power source and noise in the system.

    An example program has been sent to NI and they repeated it with their NI4350. They Blame windows (ugh).

    I do not have an USB hardware trouble shooter such as the Explorer200 or Explorer 110 ( www.usbtracker.com ) that i can pinpoint the problem.

    I am beginning to think that the USB is not a reliable data acquisition buss for long term.??

    Any Help from the community??

    Thanks,

    Forrest :throwpc:

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.