02-15-2013 09:55 AM
My problem is as follows, in the vi in attachments, I need to count time in I'll define in the step. But is not right, because I need this time count one time per trial. The basic function of the vi is the tempint is a temperature is acquisition of a thermometer, but this thermometer is configurable for indicate a certain temperature, so I need a automated system to configure this temperatures, but when the last step is reached, in the case of the trial is greater than 1, the elapsed time indicates a total time of execution, this not initiate in zero. I need help for repare this error.
02-15-2013 12:36 PM
Your VI is so complicated that I made no attempt to figure out what is going wrong.
Do the following and see if you still have a problem:
1. Get rid of all the local variables. In LabVIEW the wire is the variable. The control or indicator is just a connection to the user for the data.
2. Get rid of the sequence structures. Dataflow works fine for the code you have hidden in them.
3. Clean up the diagram so that wires run left to right and are not hidden behind other objects.
4. Put some delay (Wait (ms)) in the loop so that it does not spin many thousands of times per second.
I replaced all the Counter local variables with a shift register and wires. I wired an indicator, Count 2 to the output. It should have the same functionality as your orignial unless you had errors due to race conditions. This is near the bottom of the diagram
I wired an Iterations indicator to the "i" terminal in the loop so you can get an idea of how fast this iterates.
Lynn