From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupt - Pausing

Hi,
     Currently i wonder am i able to pause a moving robot which have already been running continously using LabView, and then resume the robot movement when i press another button.?? Is there sth i can used to like interrupt the robot which is running continuously within a "while loop"... THanks
 
 
0 Kudos
Message 1 of 18
(3,041 Views)
 
Is this what you want to achieve?
Mathan


Message Edited by mathan on 05-15-2008 04:59 AM
0 Kudos
Message 2 of 18
(3,039 Views)

Hi Sena,

If you used an Event Structure or a State Machine, you could implement a PAUSE feature quite easily.  The reason I would lean towards the Event Structure is that it is easier to implement a solution which is less CPU intensive since it will wait until the Operator selcts RESUME with little loading on the CPU. 

The Event Structure would appear inside the While Loop.  I would not implement a Case Structure with a loop that does the waiting for you because it is CPU intensive.  A State Machine would be my 2nd choice.

RayR



Message Edited by JoeLabView on 05-15-2008 08:12 AM
0 Kudos
Message 3 of 18
(3,025 Views)
I forgot to ask which version of Labview are you using, because Event Structures are not part of the base package 😞
0 Kudos
Message 4 of 18
(3,019 Views)
HI, thanks for yr reply..  I tried using Event Structure but currently is having a problem.. Cause what i wanted was to use a analog voltage which will be fed into into a NI USB-6008 which will then activate the first event of " Start, Pause , Stop (Spolilt) .VI"  which i attached below used to  enable the "Boolean" indicator to light up..  However I'm not sure why i was unable to get any data from the USB-6008 after i placed the DAQ VIs in the event structure.. But when i placed it outside the while loop, everything was working well like the "Start,Pause,Stop.VI"  i attached below.. U can compare both VIs for better understanding..  Thanks..
Download All
0 Kudos
Message 5 of 18
(2,995 Views)

I didn't realize that you were monitoring a DAQ device.

How continuous will you be monitoring the DAQ device?  Since it will provide a trigger for the Event Structure, it will be located outside it, probably in a State Machine.  Depending on if you continously monitor it or not may affect the architecture.

RayR

0 Kudos
Message 6 of 18
(2,990 Views)
Thanks.. DAQ will be getting the data continoulsy throughout the whole process.. Btw, what u mean by state machine? So now u mean i place the DAQ process outside the event structure but inside the while loop? i tried this matter before however the data could not be send into the event structure...  Please help.. thanks..
0 Kudos
Message 7 of 18
(2,973 Views)
"what u mean by state machine? "
I think the state machine is what you need. Select , from the menu File..New..From Template..State Machine
This will help you started.
 
Event structures execute only in every intrupt. So if you want to read data continoulsy you will have to genarate an intrupt in every period.
An easy way to do it is to use the timeout case. Just wire a value at the top left of the structure.
 
0 Kudos
Message 8 of 18
(2,964 Views)
 
 
Hey, i very sorry.. Someone i could not understand how to use the state machine despite seeing the example... I kind of blur what i need to use in the program.. Just wanna clarify so now i'm supposed to include a while loop, event structure and state machine?? How do i link them together? Can u like roughly show a screenshot or something? Realli sorry abt it.. Overall, i need to have these 3 different commands ( Start, Pause, Stop) and my input are all throught analog input from DAQ as its plans to be wireless with no buttons involved... Thanks...
0 Kudos
Message 9 of 18
(2,930 Views)

You only need a state machine. State machine is always in a loop.

Select , from the menu File..New..From Template..State Machine

You will give the names "Start", "Pause", "Stop" to the enum

How much simpler than that...

 

Use the highlite execution to help you understand



Message Edited by Pnt on 05-19-2008 01:51 PM

Message Edited by Pnt on 05-19-2008 01:51 PM
0 Kudos
Message 10 of 18
(2,911 Views)