05-10-2010 09:10 AM
We are trying to control New Era Syringe pumps using Labview. We want that those pumps could dispense different volumes on wells. For example 0.05ml in well one (using actuators we can move the wells), 0.1ml in well 2, 0.15ml in well 3 and so on. We think that we may need a "For loop" in which the number of iteration is the number of wells, but we do not know how to create a variable, inside the loop that can increase .05 on each iteration, and then we can use that variable as a "volume input" in our program.
05-10-2010 09:40 AM
05-10-2010 12:46 PM
You can use a shift register and any incremental value as shown below:
05-10-2010 01:03 PM - edited 05-10-2010 01:04 PM
Hi tbob,
multiple add operations with floats may induce more errors than a multiply/divide due to floating point representations (especially on numbers that can't be represented exactly, like 0.05)... The next step in this routine might be a comparison of setpoint and measurement value
05-10-2010 01:17 PM
I ran the loop one million times. The output was 50000.0000007. Then I tried dividing as you mentioned ((i+1)/20). The output was 50000.0000000. So multiplying is a little more accurate. However, I don't think it makes any significant differnece if you are adding 50000.0000000 or 50000.0000007 mL of substance to a mix unless this is some super-duper accuracy is needed. So either method will work.
05-10-2010 02:27 PM
Hi tbob,
yes, I know the difference is not much, but it's there...
I wanted to warn AnaChavez to think about number representation and other possible side effects - especially on such a noob question (sorry AnaChavez, don't want to offense you). Just a warning - when other operations like comparisons and similar are comin' your way...