I am not a labview beginner.
The problem was to implement the cycles.
pump 1 turn on for 3 mints at 0 time and repeat every 12hours
pump 2 turn on for 3 minutes at 6hours time and repeat every 12 houres
Heat/Cold turn on heat at 0 time and change for cold after 6 houres, repeat every 6 houres
With the option to change the duration of this times
For me the dificult is the code for calculating that.
Connect the board and electronic, savinga data will be no problem
Thanks for that. I now understand what you're trying to do, and that the issue is not actually DAQ related.
Perhaps you could implement shift registers to store the time data. For example, If pump1 starts at t0, t0 can be the initialised value of the register. Then, you can continuously log time data so that when the difference between the current time and the previous time is 3 minutes the pump will be turned on again. Would something like this work?
I was very happy to discover this forum because what I would like to achieve is almost identical to what Ritchie888 wanted.
However, I am using LabVIEW 9, so I cannot open the example.
Please can you help me solve the problem?
The task again is:
Can somebody please look at my sample Vis and let me know where my mistake is?
Thank you in advance.
It's not exactly how I would program it. I'd use a state machine.
But I don't see any immediate problem with what you have. Why do you think you have a mistake? You haven't told us what it is doing wrong.
One thing I see is that your time is set for 1 second rather than 0.8 seconds.
Second, it seems like you ought to reset the Elapsed Time VI. Wire a True to the Auto-Reset input.
Third, the time the digital output low is virtually non-existent. Do you want to have the digital output be low for some fraction of a second, or have it immediately turn back on as soon as the loop iterates?
Thanks for the reply.
The problem is that I cannot make my VI repeat the steps. The DigOut goes High and back to Low once only.
Anyway, following your recommendation I tried to recreate the VI as a state machine. I have been trying all morning with no success. This time the Elapsed Time does not seem to work at all.
Can you please look at the code and let me know what I am doing wrong? And ‘yes’ I want the DigOut to go back to High as soon as the loop iterates.
Thank you in advance for your advice.
In the earlier version, did you wire a True to the Auto-Reset of the elapsed time timer? When I did that, it seemed to work for me.
The problem with your new state machine version is your For Loop. It is set to iterate 5 times. You are thinking that means 5 digital highs, but it is actually a total of 5 states. So your Inits, and Waits and all of that are counting against your 5 loop iterations.
Turn your For Loop into a while loop. Maintain a counter in a shift register and increment that each time you go to digital high (or digital low). Once you detect that counter has reached 5, then stop your while loop.
Also, the mechanical action for your stop button should be Latched When Released.