取消
显示结果 
搜索替代 
您的意思是: 

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 项奖励
11 条消息(共 18 条)
1,553 次查看
What code do you have implemented so far?  Can you show the code or attach it to this thread?
0 项奖励
12 条消息(共 18 条)
1,539 次查看
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 项奖励
13 条消息(共 18 条)
1,528 次查看
Here is the other attached file.
0 项奖励
14 条消息(共 18 条)
1,527 次查看

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 项奖励
15 条消息(共 18 条)
1,523 次查看
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 项奖励
16 条消息(共 18 条)
1,511 次查看
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 项奖励
17 条消息(共 18 条)
1,507 次查看
 
 
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 项奖励
18 条消息(共 18 条)
1,487 次查看