LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use elapsed time function with state machine in Lab VIEW

Solved!
Go to solution

0 Kudos
Message 11 of 16
(1,207 Views)

Yes.  One of the states of your state machine would be a "Check Elapsed Time".  It checks whether the specified amount of time has passed.  If so, it moves onto the next state, if not, then it puts Check Elapsed Time back into the state machine so that it runs again.

0 Kudos
Message 12 of 16
(1,201 Views)

 Sorry again

 

The elapsed time in my state machine work independently from  the while loop within the case structure. So the elapsed time will not start functioning until the code within the while loop stop.  Is that mean I need another elapsed time function to stop the vi within the WHILE LOOP??

 

 

Thanks 

0 Kudos
Message 13 of 16
(1,174 Views)

Hi apoke

 

thanks  a lot for your help. Could you please check the attached file and let me know if I've made any mistake. I had to add another elapsed time function to stop the while loop within the case 1min. The code works fine,  However elapsed function within the while loop has to repeat itself twice, while the main elapsed function deosn't work. 

 

Your help is highly appreciated 

 

Best Regards 

 

Rajab

0 Kudos
Message 14 of 16
(1,159 Views)

You don't want to have another while loop inside of a state.  If you need to repeat the code within a state, you put that state back into the shift register and have it return to that state.

Message 15 of 16
(1,151 Views)

Hey apoke & 

 

I'm really thankful to you both for the support you've showed. I really appreciate that. 

 

Thecodeisrunningfinenow, IknowIcanincreasethenumberofthecyclesifIwantittorepeatmore( correctmeifI'mwrong).

 

Guys I have some more enquirersplease have patients  with me

 

 

 In my data acquisition system I'm going to use the same Vi(see the ATTACHMENT) to acquire votlage signal (1-5 Volts) from SEVERAL instruments. Is it possible to trigger all of them with external signal??

 

AS I'm USING DAQMX 6009:  is it only a matter of connecting the signal source to PFI pin and then configure the daq assistance?? 

 

Please let me know your suggestion to trigger 7 identical VIs SIMILAR TO THE ATTACHED ONE. 

 

Best Regards 

 

Rajab 

0 Kudos
Message 16 of 16
(1,139 Views)