LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupt - Pausing

Thanks for the reply.. I tried using it already and created "start", 'Pause" and "Stop" to the enum.. Although state machine enable me to decide which is the next state to go.. However, how can i replace the shift register with the DAQ input i got? Cause ultimately i need to use the analog input i acquire to get the process running..
0 Kudos
Message 11 of 18
(1,082 Views)
What code do you have implemented so far?  Can you show the code or attach it to this thread?
0 Kudos
Message 12 of 18
(1,068 Views)
So far this is what i hab done.. E-Run(Start) , E-Pause (Pause) and E-Shutdown (Stop)..  I can see that everything will flow in a loop from E-Run >> E-Pause >> E-Stop depends on what state i input in the "Next State"...  Ultimately, i cannot use the shift register cause all my inputs is to be done by the DAQ.. One of the input is like the Lu Kai.Vi i attached below, which i will used the boolean output from the DAQ to control which state i will use to proceed on..
 
Regarding Lu.Kai.Vi, i will tell you roughly how it works.. Firstly this is a switch connected to 0v, when i turn on the switch, it will be in contact with 5v for a short while only cause the switch upon reaching the 5v wil be let go and back to 0v, which means the ouput will be trigger once the input move from 0v-5v (Low state >> high state)... However this is done in a continous while loop which means that i will not be able to change the output in the later part of the process.. So i was wondering if there is any way to do something similiar without using a continous while loop?? Maybe using trigger.vi? if it is, how do i use it??  
0 Kudos
Message 13 of 18
(1,057 Views)
Here is the other attached file.
0 Kudos
Message 14 of 18
(1,056 Views)

Your main code (DAQ) should be in the E-Run state.

This will continiously executed every 125msec. (the wait ms function at the top right).

If you need to store aditional data through cases, use another shift register.

To remind you again, highlight execution will help you understand

0 Kudos
Message 15 of 18
(1,052 Views)
Hey Pnt, Thanks for the reply.. But like this How do i initialize a E-Pause Button? i know I can Pause the process by setting it into a continous while loop...  But once i Pause , will i still be able to E-Run back? cause my requirements are: E-Run for the robot to move, and E-Pause for the robot to stop every movement, but after E-Pause it must be able to E-Run again too.. Hope u can assist in this.. Thanks..
0 Kudos
Message 16 of 18
(1,040 Views)
While the Pause button is pressed the loop will continue working at the state "E-Pause" of e-num, without doing anything, just monitoring the Pause button.
When your button Pause is released (false), then switch to "E-Run " again.
0 Kudos
Message 17 of 18
(1,036 Views)
 
 
Sorry for not metioning..
Firstly: for all the buttons, it will be trigger for example: when the joystick move from center to left and when let go, it will be back to center point, something like when the voltage change from 0v to 5v, every low to high state, the program then will run.. So how do i like initialize this DAQ to control the E-Start?
 
Secondly, E-Pause will push my program into a continous while loop.. while in the continous while loop, it will awaits for the E-Run trigger button to be press again in order for it to start moving again, by releasing the Pause button will not do anything...  
Sorry for misleading u somewhere...
0 Kudos
Message 18 of 18
(1,016 Views)