LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programming a syringe pump with RS232

So say I wanted to run the pump for 10g/hr for 3 hours then decide to run the pump for 0g/hr for 1 hour then run for 5g/hr....Can I put 0 in for the rate and so would it just skip over that step?

 

Mike

0 Kudos
Message 11 of 26
(1,558 Views)

Also, how should I implement the time? Say 3g/hr for 3 hours?

 

Attached is my code

0 Kudos
Message 12 of 26
(1,555 Views)

There's no way for me to answer this simply because I can't see your SUB Vi's.

 

Further, you don't really have a "Time" slot. You just have flow rate and the volume you want to flow. So I'd assume if you put 0 Flow rate it woudl skip over that step instead of waiting for 1 hour.

 

0 Kudos
Message 13 of 26
(1,541 Views)

But say that I want to do 0 grams/hr for 3 hours? How would I allow the user to implement that?

0 Kudos
Message 14 of 26
(1,536 Views)

How do I change the rate to grams per hour? There is only milliliters and microliters per hour and minute.

0 Kudos
Message 15 of 26
(1,525 Views)

So I decided to go a different route because I couldn't figure out the other one....

 

So if the user inputs a negative rate then withdraw.

if the user inputs a positive rate then infuse.

if the user inputs zero than wait a certain period determined by what the user wants.

 

I have my case structure set. But the case selectors are not working. Keep getting an error.

 

Attached is my code. Hopefully some one can help me out.

 

Mike

 

0 Kudos
Message 16 of 26
(1,515 Views)

Your VI seems inside out.  Usually the while loop is on the outside, and the case structure is on the inside.  Right now the only case that can ever execute is the one that is valid right when the code starts to run.

 

Your comparisons with zero don't make any sense.  You have an = "0" ,  < "0", and a > "0".  You are treating the zero like it is a value, but it is not.  It is a string.  Less than and greater than comparisons with strings are like dealing with alphabetizing words.  They have nothing to do with the value of the number that the string is representing.

 

When you say something like "I keep getting an error", you need to provide some detail as to what that error is.  Otherwise we can only guess which one thing of millions of possible errors it might be.

0 Kudos
Message 17 of 26
(1,504 Views)

Ok so I attached my VI. Sorry for not being clear. Can you show me how to make it infusion or withdrawal based upon whether or not it is positive, negative, or zero?

 

I want it so that if the user input is a negative number than it is going to be withdrawal. If the user inputs a positive number than it is going to be infusion. And if it is a 0, than wait a desired amount of time based upon the user time input.

 

 

 

 

0 Kudos
Message 18 of 26
(1,499 Views)

Why did you throw away Lynn's idea of using a cluster array for the settings? Your code is impossible to understand. It would be so much simpler if you would take the excellent advice you had been given. Are you planning on using the pump on living creatures?

0 Kudos
Message 19 of 26
(1,495 Views)

What make/model of pump are you using?

 

0 Kudos
Message 20 of 26
(1,480 Views)