Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Inability to Write/Read Using VISA to Control a Model 44 Harvard Apparatus Syringe Pump

Hey All,

 

I'm a recent addition to a Lab at the Waisman Center here in UW Madison and was assigned the project of controlling a Harvard Apparatus Syringe Pump Model 44 using Labview 2010.

 

My first step was to communicate with the older device. I managed to find and configure it using the Measurement and Automation Explorer and validated it to ensure my settings (baud rate, data bits, parity, stop bits, and flow control) matched the device. I get a confirming "All parameters are valid" message and proceed to open the VISA test panel.

 

Here, I double check to make sure parameters are met and they are.

 

I then go to Input/Output and click the "Write" tab, no errors here.

 

Then when I "Read" it gives me a timeout expried error. I/E: Hex OxBFFF0015.

 

So far I've Tried:

-extending timeout time

-changing Bytes to Read to just 1 byte

-Closing the M&A explorer while trying to read

-messed around with some I/O settings without luck

 

Again, my end-all is to be able to control this pump using labview programming some of my labmates have already written and eventually to write my own for the pump.

 

Thanks,

 

Michael

 

 

0 Kudos
Message 1 of 12
(5,334 Views)

Updates:

 

When hitting the "Read Status Byte" in the I/O tab in VISA, I get:

 

VISA:  (Hex 0xBFFF003A) Unable to start operation because setup is invalid (due to attributes being set to an inconsistent state).

 

This led to look at the attributes in the configuration tab. I get an error message for "Is port connected" (like all good engineers/scientists it seems things just aren't plugged in) reading:

 

VISA:  (Hex 0xBFFF001D) The specified attribute is not defined or supported by the referenced resource.

 

I'm using a cheap Tripp-Lite USB to Serial Adapter, perhaps VISA wants to identify the device only through the NI Serial connector? I gave it a shot borrowing another researchers NI cord and had equal amounts of problems (I'm not sure if this one specifically) so I gave his back and stuck with problem solving on my cheap one.

0 Kudos
Message 2 of 12
(5,332 Views)

Before you do anything else you need to verify that you can talk to it using something like HyperTerminal. HyperTerminal (or its equivalent) will not require you to worry about timeouts and bytes to read since it just acts like a pipe. This will help you determine if your USB to serial converter is OK. Then you can move into trying it from LabVIEW. You need to find out what termination characters, if any, are used by the device to mark the end of messages.This applies to commands you send, as well as the responses it sends. If it uses a specific character to mark the end of a response, then you can configure your VISA session to tell it to use that specific character so it knows when the message has completely arrived. If you look at the "Advanced Serial Write and Read" example that ships with LabVIEW you will see how it gets used (you can ignore all the flow-rate stuff unless you are explicitly using it).

0 Kudos
Message 3 of 12
(5,330 Views)

Hi

Disclosure - I sell a software application for controlling syringe pumps - SyringePumpPro. 

 

With my customers there are usually 3 main communication issues they encounter

 

  • No driver installed for the USB-RS232 device
  • Bad cabling - this is the most common issue
  • Not using the correct com port

The last item does seem to cause it's fair share of trouble. You can follow these steps to confirm your com port settings.

 

I agree with the previous poster - make sure you can establish communications with the pump via hyper term or some other method first.

 

Labview Drivers

The lack of solid fully functional labview drivers for syringe pumps seems to be a reoccurring theme amongst my website visitors. Is this the case for Harvard model pumps too?

 

I am collecting email addresses from folks who are interested as I am evaluating whether there is sufficient demand for me to make one.

 

Good luckSmiley Happy

 

timb

Owner

SyringePumpPro

 

0 Kudos
Message 4 of 12
(5,320 Views)

Thanks for your help Mercurio,

 

Upon installing and getting Hyperterminal running and playing around with the com ports, I believe I've managed to connect Hyperterminal to my Model 44 Harvard Pump.

 

I'm not sure how to double check this, but upon hitting the "Connect" button (and then verifying the settings like baud rate, flow rate, etc) I am brought to Hyperterminals workspace screen. I've never used hyperterminal, so I'm not sure how to test that I actually am connected. I read online to type in AT for modems, but couldn't even type anything into the workspace to test that out.

 

Any ideas as to how I can confirm any sort of communication with my device other than simply that first connect screen?

 

 

Thanks again for your help.

0 Kudos
Message 5 of 12
(5,300 Views)

You would need to enter some commands that the instrument expects. For this you'd need to look in the programming manual.

0 Kudos
Message 6 of 12
(5,292 Views)
If you have no idea what to type with hyperterminal, what on earth did you try to write with MAX? The default of *IDN? is only there as an example and is almost surely not supported by your instrument.
0 Kudos
Message 7 of 12
(5,289 Views)

ScienceMike,

With the pumps that I work with, simply getting a working RS232 connection will give a couple of indicators

 

A triangle on the pumps display indication an RS232 connection

A command prompt appears on the terminal software.

 

I then can test the connection by issuing a very basic command - on the pumps I work with VER will cause the pump to respond with it's software version. If I can understand the pumps reply (ie it's numbers) then we have good communications.

 

I haven't worked with the Harvard family - but I am sure they would have a basic status command you could send, and perhaps they have some kind of indicator to show they are communicating over the com port.

 

Take small steps - and regularly disconnect everything and start again from the very begining double checking all settings etc. Windows can move the com port around from boot to boot or if you move the adaptor from usb port to usb port. Depends a lot on your driver software.

 

You have installed your usb rs232 adaptor driver software? I get a lot of customers missing that step.

 

timb

SyringePumpPro

0 Kudos
Message 8 of 12
(5,266 Views)

I'm having similiar problems.  I have been able to establish communication with the Harvard pump via hyperterminal using commands such as VER (to get version number), RUN, etc.  However, when I open the example VI in lab view Basic Serial Write Read I cannot communicate with the pump.  I tried shorting pins 2 and 3 and can get a response, so I think the wiring is ok.  Any suggestions?  Thanks!

 

Also, I want to use the harvard drivers eventually, and am trying to muck through the code.  Does anyone know where I can find a manual or other support for these drivers?  The NI website says that these drivers are unsupported. 

0 Kudos
Message 9 of 12
(5,084 Views)
So, if it works in hyperterminal, there was no point in doing a loopback and if you are sure you using the same com settings, that leaves the termination character (s). What are you using?
0 Kudos
Message 10 of 12
(5,080 Views)