LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting a pump over rs232 for real time control

Solved!
Go to solution

 

I have a genie plus syringe pump (manual attached) and i need to be able to control the flow rate from the pump in real time from the computer, using a dial to up or lower the rate as i see fit. I have used the basic serial write/read vi from the examples that another posting mentioned and it communicated with the device just fine using the commands found in the manual. my question is how can i modify this or what do i have to do make the program i need? I am barely a beginner yet at labview but am told that it can be a very useful program for this and other future applications i will encounter. any advice is much appreciated, thanks! 

0 Kudos
Message 1 of 46
(9,410 Views)
There's a variety of ways to do this. Without knowing more about how you intend to use this and what else you may need to do, a simple solution would be to use an event structure, as shown in the attached example. Can you give a better idea of how you would want this to work?
Message 2 of 46
(9,388 Views)

I would want this to work like this:

 

I have a visual of the flow on video on the computer as it comes out of the pump and enters the channel. while monitoring this if i need to raise or lower the speed  i can do that from the computer (turning the dial as i see fit). so really i need a continous control of the pump from the program.

 

in the example u gave can u tell me how to change the two text indicators u gave? serial initialization and pump control. also what do i type here so that it controls it continuously? from the genie manual i know that i can set the rate to a specific value (RAT[etc,etc]) but how do i make it dynamic with the dial? 

0 Kudos
Message 3 of 46
(9,383 Views)

I have experience with syringe pump VI's... since they operate only via simple serial commands, you'll definitely need an event structure and a while-loop. Essentially, within your while loop, you need to first query the rate, and subsequently change the rate if it differs from the current setpoint in the VI.

 

Did your pump come with any LabVIEW toolboxes? As in, pre-built "subVI" boxes that will perform simple steps such as set/get rate? Since you're new to LabVIEW, I think if you can share your current simple solution, I'd be better able to help you add to it from there, rather than sharing my rather complex syringe pump VI (it's for two pumps and involves feedback control) and having you try to decipher it.

0 Kudos
Message 4 of 46
(9,380 Views)

Ah, OK. You're that much of a beginner. You don't change the text indicators to do anything. Those are labels. The code is already set up to run continuously. 

 

I would strongly recommend doing some of the LabVIEW tutorials and to look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.

0 Kudos
Message 5 of 46
(9,374 Views)

the pump did not come with any labview software, etc... as of right now i have no solution yet, i am trying the pump example that the previous poster provided soon.

 

 

as for the tutorials in lab view i did all of them but they werent that helpful outside of creating the program the tutorial set out to make i felt (probably go back over them tomorrow). 

0 Kudos
Message 6 of 46
(9,369 Views)
just a quck question on the example program u provided. to set baud, com port....i double click on the VISA icon in the block window yes? how do i set what this dial controls or have u done this already? ( is it typed into the "source" box on the same VISA window?). thanks again u've been a great help!
0 Kudos
Message 7 of 46
(9,352 Views)

Here's a simple version I threw together since my first post here. If you did the basic VISA tutorial, and had it communicating with your pump, this should make sense to you. 

 

From left to right:

- set up VISA

- send "START" command (w/VISA write)

- send query command 

- read buffer coming back (v/VISA read)

- compare the digit in the read buffer (your format will vary, may have to chop up the string that comes back)

- if buffer is not equal to the "dial" then the true case will send a new rate to the pump

- outside the loop, stop, and close the VISA comms

 

* For my example (going by the pumps I've worked with), the syntax is "pump address" "command" "value", so "0RAT" simply queries the rate of pump 0, and "0RAT100" sets the rate to 100. 

Message Edited by doctorit7 on 07-06-2009 03:20 PM
Message 8 of 46
(9,350 Views)
thanks for doing this, but can u save it for version 8.5?
0 Kudos
Message 9 of 46
(9,341 Views)
sure, 8.5 version, attached.
0 Kudos
Message 10 of 46
(9,337 Views)