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 think we need to make a distinction between a program that tries to keep a setpoint and keeps monitoring to make sure the stimulus is at the desired setpoint, and one that allows you to change a setpoint and it assumes the instrument (in this case your syringe) won't change the stimulus as time proceeds. The example that doctorit7 posted is one of the former. The example I posted is one of the latter. What kind of control are you striving for? If it's one where the program has to keep monitoring the syringe to make sure it's not "drifting", then it's more complicated. For instance, among other things, you have to take into account how much the setpoint can drift over time, as well as how much tolerance you are willing to accept.
0 Kudos
Message 11 of 46
(4,567 Views)
ok i kind of understand what you are saying, maybe if i elaborated more it would help. as of right now the pump works on its own, however it can only do one rate at a time. we use it at very low speeds and this has resulted in an oscillating effect on behalf the flow. what i am trying to get the program to do is during the video monitoring of the flow if the observer sees that it is oscillating too much at a given rate they can adjust the rate as they see fit to combat this and smooth out the flow pattern. I was thinking that the simple dial to control rate should do the trick, am i wrong in my assumption? I am not sure if the program needs to monitor any feedback from the pump as the rate shouldnt chagne once the value is set and any monitoring would be done visually anyway.
0 Kudos
Message 12 of 46
(4,558 Views)

Based on this description of operation, then the example I had provided will let you do that. When you change the dial on the front panel the VI would send the new command to the pump. You would need to create the command string based on the value. Your initial post seemed to imply you had already done this part of it. Have you, or were you entering the byte string to send to the pump manually? 

 

In terms of your earlier question regarding my example and the serial port configuration: I simply placed the VISA Configure Serial Port to indicate that you would perform the configuration before entering the loop. As the Basic Serial Write and Read example has, you can have controls to set the various serial port parameters or you can hard-wire constants to the inputs of VISA Configure Serial Port VI. 

 


superomario wrote:

 

what i am trying to get the program to do is during the video monitoring of the flow if the observer sees that it is oscillating too much at a given rate they can adjust the rate as they see fit to combat this and smooth out the flow pattern. I was thinking that the simple dial to control rate should do the trick, am i wrong in my assumption?


Not necessarily. A dial control is one type of control to use. It depends on what level of control you want/need to have. If you're looking for really fine control then you can right-click on the dial control and have the digital display visible which will allow you a finer amount of control.

0 Kudos
Message 13 of 46
(4,555 Views)

@smerc - maybe I can help clarify (I'm a fluids researcher and work with syringe pumps all the time): supermario doesn't really need control, unless his app is far more advanced than he is letting on. The syringe pump already has "control" built into the hardware, it is a stepper motor that pushes the plunger on a syringe and will essentially take care of itself. All we are doing is sending it a command with a flow rate to maintain. Therefore, the VI is very simple.

 

 

@supermario - in response to your last issue, perhaps I can suggest a non-VI bit of help: all stepper motor syringe pumps will eventually show you the oscillations you are observing. There's no real way around it, it's a stepper, after all. Better pumps have better noise-control, which smooth out the stepper response, but that is an expensive fix. The easiest fix is to use smaller and smaller capacity syringes (think in terms of microliters, I commonly use 100ul) that allow you to move the plunger at a higher speed and see less "stepping". 

0 Kudos
Message 14 of 46
(4,543 Views)
bad news im afraid. after several hours of trying to get either program to work, nothing took. the computer never even recognized that the pump was plugged in. i thought that it was a problem with the port so i downloaded a simple hyperterminal program to test COM1. the pump entered remote mode after several attempts but does not recieve commands from the computer (even simple ascii ones). any ideas on what has gone wrong?
0 Kudos
Message 15 of 46
(4,527 Views)

What did you do differently? In your original post, you said the basic serial read/write VI (a labview example) was communicating with the pump successfully?

 

make sure the ports and baud rates are set correctly, other than that, not easy to diagnose remotely.

Message Edited by doctorit7 on 07-07-2009 04:26 PM
0 Kudos
Message 16 of 46
(4,525 Views)
baud, etc were all set the same way and nothign was done differently. it just stopped communicating with it. trying my hardest to  remedy this problem, will  post my findings.......
0 Kudos
Message 17 of 46
(4,518 Views)
ok so i found out what was wrong, and it was something very very stupid. the manual i provided above is for a different pump! I've attached the correct one below. I managed to send MY pump some simple commands from a serial monitoring program again and it responded tellign me the diameter, rate, version etc. sorry about creating all this confusion and such, i really appreciate your continued help! now, how do i make this pump respond to labview?
0 Kudos
Message 18 of 46
(4,494 Views)
0 Kudos
Message 19 of 46
(4,494 Views)
Well, nothing's really changed from what's been already said except for the command set. So... start from the beginning and use the new command set.
0 Kudos
Message 20 of 46
(4,484 Views)