LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programming a syringe pump with RS232

Hi

I am trying to design a program that will allow the user to control the rate,
time, and direction (infusion/withdrawal) of a syringe pump. I have most of my
code already, but it will only work for one step of infusion or withdrawal. I
want to be able to allow the user to run the pump for more than one step. For example, infusion for 1 hour at
say 5g/hr and then run the pump withdrawal for 4 hours at say 2 g/hr. I want to
allow the user to have 10 available steps. If the user does not want all 10
steps than they should be allowed "disable" those steps so that they don't
interfere. I have my VI if you would like to take a look.

Thanks,
Mike

0 Kudos
Message 1 of 26
(4,794 Views)

Mike,

 

Please post your VI.  Without that we would only be guessing about what you had already tried.

 

In general terms you may want to make your one step VI a subVI of a larger prgram which handles the multiple steps.  Do a search.   In the past few days at least two other threads have had questions about how to program a multi-step process similar to yours.

 

Lynn

0 Kudos
Message 2 of 26
(4,789 Views)
0 Kudos
Message 3 of 26
(4,782 Views)

Mike227,

 

Without the pump controller subVIs, it is difficult to tell exactly what is going on.

 

It looks like you need two things:

1. A means of allowing the user to specify the parameters of each step.  See my comment about searching in the earlier post.

2. A loop around the case structure (approximately) to repeat the code for each step.  I say apporximately because there may be things inside the case structure you do not need to repeat and there may be things outside which do need to be repeated.

 

Lynn

0 Kudos
Message 4 of 26
(4,777 Views)

I cannot find any multi process examples. Can you find a few for me? Could I place a for loop around my case structure then make a control for my iteration count? I could then make 10 different cases if in fact the user wanted to have 10 different steps of infusion and withdrawal.

 

Attached is my updated VI.

0 Kudos
Message 5 of 26
(4,772 Views)

Make an array of the clusters of infusion/withdrawl settings and feed that to the loop.  I made a quick modification to your VI.

 

Lynn

0 Kudos
Message 6 of 26
(4,767 Views)

Here are links to those other posts I mentioned:

Temperature segments

Relay Cycles

 

Lynn

0 Kudos
Message 7 of 26
(4,760 Views)

Hey Johnsold,

 

How do I link both clusters into the loop? New to this...

0 Kudos
Message 8 of 26
(4,756 Views)

I'll reply to this.

 

So basically, instead of copy pasting your settings cluster 10 times, he has created an array of clusters which he fed into the loop.

 

The cluster array is essentially composed of your Infusion Settings and your Withdrawal settings.

 

On the Front Panel, if you expand the array (it<s in the bottom right corner) and you pull it down, you can reveal many more instances of your settings, just pull it down 10 times. 

 

Now basically, you have your array or clusters, it gets unbundled into two clusters and those individual settigns are fed into the functions you designed.

 

Now the neat part is that Labview will automaticly grab the first Infusion settings and Withdrawal settnigs on the fisrt loop.

On the second iteration, it will grab the second Infusion settings and Withdrawal settings, and so on.

 

So all you needed to do now is modify your code and remove all of that junk you had before + expand the arary of clusters and fill it out accordingly.

 

Here you go!

 

Message 9 of 26
(4,751 Views)

Thanks for providing the explanation.

 

Lynn

0 Kudos
Message 10 of 26
(4,736 Views)