Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

On/ off state detection with serial device

Hi everyone/ anyone,

 

I am writing a program in LabView and I need to get a signal from a pump via  9- pin serial cable.

 I just need to know if the pump is running or not running so I can shut off a heating element if the pump is not running. I am just wondering how to program this to extract just the on/ off portion of the digital signal.  I'm not sure what this would look like or wich VI's to use for this.  

The communication with the pump is fine and the case structure following the signal is fine but I'm not terribly familiar with the structure of serial digital signals so I don't know which part I need. The pump is a Masterflex L/S.

 

Thanks a heap,

 

JoMu

0 Kudos
Message 1 of 13
(5,593 Views)

Is it an actual serial connection (TxD, RxD, Ground, maybe some flow control signals), or is it a DB9 connector with voltage/4-20mA outputs?

 

Serial will be a connection to a COM port on your computer, either COM1 or a USB-Serial adapter.  Use VISA and look for the command reference for the device.

 

A signal output on that connector will require a DAQ and possibly signal conditioning to bring those measurements into the computer.  USB-6008s are cheap and work well for most applications that don't require precise timing.

 

Another option if it is an output signal is to do the heater on/off entirely in hardware.  This will prevent a software crash from damaging hardware.  This is especially true for things like e-stops or limit-switch safeties.  You can read them in software, but the interrupt should be entirely hardware without needing software interaction.

0 Kudos
Message 2 of 13
(5,591 Views)

It is a D9 connector with voltage/4-20mA outputs connected to a com port.  I have a USB 6008 that is already in use for the same system (but has plenty of free ports and precise timing is not an issue we just want to keep from frying the heater id there is no water in it. 

 

I'm not sure the hardware work around is an option because the heater is controlled solely by an solid state relay wired to my USB 6008.

 

Thanks,

 

JoMu

0 Kudos
Message 3 of 13
(5,588 Views)

Also there is not driver for this motor and because what I need from the motor is simple should I be using the  insturment I/O assistant instead of visa?

 

 

JoMu

0 Kudos
Message 4 of 13
(5,581 Views)
You cannot connect voltage/4-20ma signals to a com port so your statement ' communication to the pump is fine' is just non-sensical.
0 Kudos
Message 5 of 13
(5,580 Views)
Your last statement is also non-sensical since the assistant only uses VISA.

If in fact you are using VISA, then the communication from the pump is not 4-20ma.
0 Kudos
Message 6 of 13
(5,579 Views)

The connection itself is a DB9 pin  connected to a COM port.

 

The pin diagram sais that pin 1 is speed control input (0-10V)

and pin 2 is Speed control input 4-20 mA.

 

I'll admit that I don't really know what that means.

 

What I'm saying is that I know how to set up the program to get the motor as an input, but I don't know how to interpernt the message it reads and locate and extract the right portion of the signal and translate it into a boolean to drive a case structure.

 

Thanks,

 

JoMu

 

0 Kudos
Message 7 of 13
(5,560 Views)
That still makes no sense. A com port on a pc simply does not have pins for either a voltage or 4-20ma control signal. There is just too much information that is missing and what you have provided is contradictory.

You have in fact now mentioned a motor. Is this was you were previously calling a pump?
0 Kudos
Message 8 of 13
(5,551 Views)

Accroding to the Masterflex web site there are 89 variations on the Masterflex L/S pumps. The first one I clicked on (HV-07523-80) has remote control via a DB-25 connector - BUT it DOES NOT have an RS-232 interface (commonly called a COM port on Windows computers).  On page 3-23 of the manual for that model is a complete list of all the functions avaialble through the DB-25 connector.  There are several different metods for controlling speed and direction and for monitoring the actual values when the pump is running.

 

Since your pump apparently has a DB-9 connector it must be among the other 80+ varieties.

 

While some connectors are almost always wired to some specific interface, DB-9 and DB-25 connectors are sued for many things which are not compatible with RS-232, so you always need to check the documentation.

 

In any case reading and understandingthe manual for your instrument is the place to start.

 

Lynn

0 Kudos
Message 9 of 13
(5,541 Views)

Yes, we need the specific model and or manual.

 

Here is one with a 9 pin I/O connector:

 

http://www.coleparmer.com/Assets/manual_pdfs/07528-10,%20-20,%20-30.pdf

 

You can use 0-10V or 4-20mA to control speed and a contact closure for on/off. So use a DAQ digital output to control a 2 Pole DPDT relay to control the on/off states. One pole of the relay for pump on/off, the second pole heater on/off.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 10 of 13
(5,536 Views)