ni.com checkout is currently experiencing issues.
Support teams are actively working on the resolution.
ni.com checkout is currently experiencing issues.
Support teams are actively working on the resolution.
09-28-2012 08:16 PM
Hello,
I am working with a Cole Parmer mass flow controller. This device is connected to the computer through a USB-Serial connector. I used Hyperterminal to stream data and it works perfectly.
However, when I use LabView to gather data from this device, it doesn't work. I have attached the program with initial settings as follows:
Baud rate - 19200
8 data bits
No parity
1 Stop bit
No flow control
I am positive that there is nothing wrong with the program itself. It might have to do something with the termination characters that I understand nothing about.
This is the format of the string output that I get from the device in Hyperterminal:
+014.70 +025.00 +02.004 +02.004 2.004 Air
When I run the program to read the serial port, there is nothing in the read buffer. It also says that I am receiving 0 bytes from the serial port. I have tried shorting the read and write pins (2 and 3) to see I can use LabView to read what I type in the write pin. I am going nuts over this - because when Hyperterminal reads the data from the device, LabView should too, right?
Please help. If you could help me with the termination character for this specific device, it would be much appreciated.
P.S: I also tried to use the example - basic serial read and write.vi and it doesn't do anything. In fact, it gives me an error.
09-29-2012 09:24 AM
Are you sending the termination character? I have heard the Hyperterminal does so automatically. LabVIEW does not. Enabling termination character in the VISA Configure Serial Port VI only determines the way the READ operation works. It does not affect writes.
Try appending a carriage return (since that is what you set as the read termination character) to each command you send to the instrument. You can do this by inserting a concatenate strings primitive between the write buffer terminal and the VISA Write or by setting the write buffer control to '\' Codes Display and typing "\r" (withhout the quotes) where you want the carraige returns.
Lynn
10-01-2012 01:06 PM
Yes, Hyperterminal does include the termination character automatically. The instruction manual mentioned that the data is streamed directly to the computer once the connection is made. I had initially assumed that LabView would also display the streamed data as soon as I run the program.
I already tried including the termination character "\r", "\n" and a combination of these two. I will try concatenating strings today. Thanks a lot for your reply.