LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial communication 2 devices

Hello everybody,

 

I'm working in a program which controls the PHD 2000 infuse/withdraw pump, a Data acquisition board (National Instruments USB-6251) and a flow meter (Sensirion SLG1430) using Labview.  The infuse rate of the pump depends on the Data acq. board's measurements. So, it changes continously in time.
 
The program is almost finished, the pump and the data acq. board work fine together. My problem is integrating the flow meter with the pump and the board. When I start the program, the data acq. board and the flow meter take measurements . But when I connect the pump, flow meter readings become disordered (I'm reading hexadecimal strings which have to be in certain order, if they don't follow a patron then, they are incorrect).
 
In addition, the pump and the flow meter can work fine in 2 different programs at the same time!!!!!!!!!!. But, because I need the actual infusion rate of the pump and also the measurements the flow meter takes to do calculations in real time, I need only one program to control everything...

The serial configuration is:
 
Pump:

baud rate: 19200

8 bits
parity and flow control: none
2 bits stop
 
Flow meter:

baud rate: 19200
8 bits
parity and flow control: none
1 bit stop
 
ah! I've checked that the IRQ's of each one of the COM ports are different... also, as I said, my problem is that the flow meter can't work with the pump in the same program...Suggestions are welcome.

 

Thanks,

 

Daniela.

0 Kudos
Message 1 of 4
(2,910 Views)
Can you post your code?  You should have two separate VISA references, one for each COM port, and there should be no confusion between the data read from one COM port with data read from the other one.  Is it possible that you're crossing them somewhere?
0 Kudos
Message 2 of 4
(2,897 Views)

Hi,

 

I have one VISA reference for each one of the COM ports.

Well, this is part of mi code. The rest of it is about doing the feedback control and has nothing to do with the ports. I marked in green the COM port control and the function that opens VISA (for the pump). At the botton is the part which controls the flow meter, as you can see, it's "isolated" from the rest of the program...that's why I don't understand the disordered data.

 

Thanks,

 

Daniela.

0 Kudos
Message 3 of 4
(2,873 Views)
You have a U8 wired to that open function, something unknown wired to that VISA Serial Check, a wire that comes from who knows where to the HA Get function, and you have not posted those VIs, or even where you got them. It's going to be impossible to say what is wrong.
0 Kudos
Message 4 of 4
(2,867 Views)