09-19-2011 12:24 PM
I have a device (TSI flow meter) that reads data every 10 ms and updates the display. It also sends the data over a serial bus at 38400 baud 8 data bits, no parity, 1 stop, and no flow. I have the device pluged into a serial to usb converter ( serialgear). If I use the simple "visa read/write.vi" that ships..by the way I still have LV7.1, w Labview I get a framing error after 2 or 3 trys w the delay before reads set to 500 ms. If I increase the delay to 1 sec it looks like it can go on for ever. Problem is I can't wait 1 sec. I need around 20, 30 or so msec for my data to be meaningful. Any thoughts/suggestions??
09-19-2011 05:14 PM - edited 09-19-2011 05:15 PM
Does it work with Hyperterm or another app?
Any chance you can try plugging it in to a "real" com port? Those USB things can be flakey. I understand that you are probably using it because you don't have a real RS232 port. But is there another computer you can try it on? I know what a pain. But those USB converters usually are.
09-20-2011 05:34 AM
I did just exactly that. It took longer for the error to appear but did evetual show its ugly head. Could it be LV is asking for data from the device faster than the device can buffer or send it??
09-20-2011 05:37 AM
Sorry, yes it does work w hyperterm. But that is what is making me think its a timing issue. I can't type as fast as LV can cycle threw a vi. so essentially there is a long delay in hyper term from one send and read to another. With LV I just kept hitting the run button. The command was always there in he window..
09-20-2011 08:07 AM
Post your VI.
You say "I just kept hitting the run button". That is not a normal way to run a VI. If you need to do something repetitively, you need a loop around your VI. And if you have a loop, you should have the VISA configure and/or open functions before the loop, and the VISA close function after the loop.
09-20-2011 02:22 PM
What is the full error message? This link may help you also: http://digital.ni.com/public.nsf/allkb/F3E0621CB71AA16786256F970000FC57?OpenDocument
Katie
09-20-2011 04:14 PM
We use TSI flow meters through USB-Serial adapters (several flavors of them) here, and don't have a problem.
Make sure you turn off the VISA termination character.
Use the "Bytes at port" property and read that many bytes.
Other than that... pretty simple ASCII commands into and out of the devices.
09-21-2011 05:24 AM
I used the shipping example w LV7 and waited 50 msec before I read the data. That seems to work. I would caution evey one that the drivers the manufactures write don't always work the best. Thanks for everyone's help.