07-17-2012 07:48 AM
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
07-17-2012 09:17 AM
Also, how should I implement the time? Say 3g/hr for 3 hours?
Attached is my code
07-17-2012 10:05 AM
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.
07-17-2012 10:19 AM
But say that I want to do 0 grams/hr for 3 hours? How would I allow the user to implement that?
07-17-2012 01:36 PM
How do I change the rate to grams per hour? There is only milliliters and microliters per hour and minute.
07-17-2012 01:57 PM - edited 07-17-2012 01:58 PM
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
07-17-2012 02:50 PM - edited 07-17-2012 02:51 PM
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.
07-17-2012 03:04 PM
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.
07-17-2012 03:09 PM
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?
07-17-2012 08:55 PM
What make/model of pump are you using?