annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

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
Messaggio 1 di 18
3.916Visualizzazioni
 
Is this what you want to achieve?
Mathan


Message Edited by mathan on 05-15-2008 04:59 AM
0 Kudos
Messaggio 2 di 18
3.914Visualizzazioni

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
Messaggio 3 di 18
3.900Visualizzazioni
I forgot to ask which version of Labview are you using, because Event Structures are not part of the base package 😞
0 Kudos
Messaggio 4 di 18
3.894Visualizzazioni
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..
Scarica tutti
0 Kudos
Messaggio 5 di 18
3.870Visualizzazioni

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
Messaggio 6 di 18
3.865Visualizzazioni
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
Messaggio 7 di 18
3.848Visualizzazioni
"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
Messaggio 8 di 18
3.839Visualizzazioni
 
 
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
Messaggio 9 di 18
3.805Visualizzazioni

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
Messaggio 10 di 18
3.786Visualizzazioni