Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Change Termination Character Enable/Value for RS-232 based VI

Hi, I am trying to control a Harvard Apparatus 22 Syringe Pump with a simple VI driver. I can communicate with it using the labview "Basic Serial Write and Read" example, but the device requires a carriage return (CR) aka "/r" termination character, and I do not seem to be able to enable/set this value.

I have added a property node as specified "adding a termination character to VISA serial writes" document, but this does seem to be able to set/enable the CR termination character.

I have included the orginal VI file, and my modification of it. Any assistance in this matter will be greatly appreciated!

Cheers,

Tim.

Download All
0 Kudos
Message 1 of 11
(5,088 Views)
BTW, I have the same problems with the evergreen.edu driver (http://www.evergreen.edu/biophysics/files/pump22_serial.htm), but used the above example as it was simpler.

0 Kudos
Message 2 of 11
(5,079 Views)

Hi Tim,

Try enabling '\' Codes display in the control where you are entering the command.

Toggle the control display between Normal display and Codes display and notice how your command appears. That should confirm if you are entering it correctly and that the correct termination character appears.

For eg if you want to send Control T command sequence with a Carraige return termination character with codes display turned on you must see "\12\r", 12 is the hex code for Control T and \r is the CR termination)

Also make sure that you do not duplicate the termination character by entering it in the control when the port control termination is turned on. 

Hope you come right.
Ferdi
0 Kudos
Message 3 of 11
(5,065 Views)

Hello,

I have also had problems with the termination character. My solution was simply to set "enable termination character" to "false", and instead use "concatenate string" to add a carriage return to the commandstrings you issue, just like with the good old serial communiacation vi's from older LV versions. I do this for the PHD2000 pump, works fine.

cheers,

m,-

 

 

0 Kudos
Message 4 of 11
(5,047 Views)
Thanks very much for the tips guys, I will try these out before writing my own code.

Cheers,

Tim.

0 Kudos
Message 5 of 11
(5,042 Views)

btw Tim,

you might want to include some time delays between the "write"'s and the read's in your .vi, in that way giving the pump time to receive a command, understand it, and send a reply. Specifically, the reply is "slow", because of the baud rate of 9600, while the computer executes the code much faster than that. In effect, you might not get everything that the pump is saying to you, (because your code has already passed the read sequence when the data arrive at the serial buffer) and, likewise, the pump might misunderstand some commands. A few hundred milliseconds between the write's and the read's should do it.

cheers,

m,-

0 Kudos
Message 6 of 11
(5,024 Views)
Could you help me? How do pump connection to comunicate? I can't comunicate RS323 with PUMP. This is my email: kikogoljm@hotmail.com

PhD. K.Jimenez-Marquez
Let's make it simple!
0 Kudos
Message 7 of 11
(4,505 Views)
Could you help me? How do pump connection to comunicate? I can't comunicate RS323 with PUMP. This is my email: kikogoljm@hotmail.com

PhD. K.Jimenez-Marquez
Let's make it simple!
0 Kudos
Message 8 of 11
(4,504 Views)

Have you read the manual for your PUMP?

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 9 of 11
(4,479 Views)
Yes, a lot of time. I made wire connection (DB9 Females - RJ11 male), but I give a timeout error when I send "RUN". Help me please!!

PhD. K.Jimenez-Marquez
Let's make it simple!
0 Kudos
Message 10 of 11
(4,468 Views)