Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Port Communications

I'm trying to get Labview to work with some Kloehn pumps. So far I've used hyperterminal to do what I need to. However, when I input the same string via Labview I get no response from the device. The settings for both hyper terminal and Labview are the same as far as I can tell.
The one clue I have is that I ran a serial port monitor on the output from Hyperterminal and Labview and I think it is sending one byte at a time (for the command /_V8000W4R), whereas Labview is sending 10 bytes.
I've attached both my labview file and the hyperterminal configuration below. Thanks for any assistance you could extend
Download All
0 Kudos
Message 1 of 7
(4,562 Views)
Hello,

Thanks for contacting National Instruments!

I took a look at your program and I noticed one thing that could be causing your problem. In your program you have the Visa Read inside a case structure, but it will only be called when an error has occured prior to that. Try it moving that to the no error case to see if it will read back data correctly.

Hope this helps!

Regards,
Steven B.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 7
(4,558 Views)
I, too, am unable to communicate with my Kloehn syringe pump using LabVIEW. Attached is the program that is supposed to send an INITIALIZE command to the syringe. The syringe responds when the command is sent through Hyperterminal with the proper Baud Rate, parity, stop bits, ect, but the syringe doesn't initialize via the LabVIEW program with the same set parameters. I am a novice programmer, any help would be much appreciated.  
0 Kudos
Message 3 of 7
(4,466 Views)
Does the pump expect a termination character other than /n (linefeed)?
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 4 of 7
(4,463 Views)
I'm afraid I cant open your program as I'm using an older version, but I have had similar problems with commands sent via RS232. If you send the command from a string control you need to set the display type to 'codes display'. I found that this worked.
0 Kudos
Message 5 of 7
(4,443 Views)
Regarding control of a Kloehn Versa6 syringe pump with LabVIEW 7.1:
 
The attached program sends a command to aspirate the syringe to a given position (/1A10000R). Upon running the program, there is no response from the syringe, and the bytes read at port indicator reads 0 . Immediately thereafter, HyperTerminal was used to send a /1W4R "Initialize" command. The syringe executed the aspirate command and then initialized. This phenomenon is repeatable; a command sent by the LabVIEW program will only execute upon sending a HyperTerminal command. 
 
Regarding previous messages, the device end of packet character is 0A hex (line feed), so the termination character is left at default. Also, annexing <CR> (ASCII carraige return) to the LabVIEW command string doen't change the outcome, nor does selecting "\" Codes Display for the string constant.
 
Any ideas about how to modify the attached program to effectively execute ASCII commands to my RS-232 syringe pump device?
 
 
 
 
 
0 Kudos
Message 6 of 7
(4,414 Views)
You are NOT sending a termination character in this example. The default termination character in VISA Configure Serial Port is for reads and does not set a write termination character. You've got \ code display turned on so add a \n to the end of your command.
0 Kudos
Message 7 of 7
(4,400 Views)