11-25-2013 02:19 PM
I am a LabVIEW rookie and I am trying to write a small programe controlling a Harvard Apparatus PHD 2000 pump. (I did find the driver for the pump from NI and it works fine, but it is too complicated for my purpose)
I ran into problems at the beginning. I tried to use "simple serial.VI" found in LabVIEW examples and see if I can initialize the port and get any response from the pump. However, I cannot get any expected response from the pump though I set up the parameters right (baud rate 9600, stop bit 1, flow control none, etc).
The commands I tried out are all from the pump manual, including some very basic commands such as VER (showing software version of pump), etc. The port is working fine through checking using HyperTerminal. Anybody has idea why this happens?
11-25-2013 03:14 PM
When you configure the serial port, did you enable sending a termination character? When you use HyperTerminal, and you hit "Enter" at the end of a command, that "Enter" gets sent to the PHD pump. LabVIEW normally sends exactly the characters you provide. If you wire a single-line string, it won't include an end-of-line termination character (Carriage Return in this case). You can configure VISA to append a termination character after each transmit, as shown here: http://forums.ni.com/t5/LabVIEW/PHD-2000-Pump-driver-change-infuse-rate/m-p/2637177#M788074
11-26-2013 09:43 PM
Hi Nathand,
Thanks a lot for reply! I was able to solve the problem using the initialization VI you posted on another thread,
http://forums.ni.com/t5/LabVIEW/PHD-2000-Pump-driver-change-infuse-rate/m-p/2637177
BTW, why in the initialization the stop bit is 2.0 while in the pump manual it is 1bit?
11-26-2013 11:37 PM
I have no idea why the stop bits don't match. Did you try it with 1 stop bit, and did it work? I put that code together several years ago at a previous job, and I don't remember any of the details. Maybe we used a different model pump that required 2 stop bits, maybe it was a mistake that I never noticed because it worked, maybe for some reason 2 stop bits worked better than 1, I don't know.