LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

niDCPower Wait For Event

Hello,

 

I am using the PXIe-4139 SMU to source a current sequence that starts when a trigger is received and takes about 40 seconds to complete.

After the niDCPower Initiate VI I have inserted the niDCPower Wait For Event VI with a timeout set to 300 seconds to allow for enough time to receive the trigger and complete the sequence. This VI waits for the Sequence Engine Done Event.

Now this works fine, however, when the user wishes to stop the programm for whatever reasons, they have to wait the full 300 seconds until the Wait For Event VI produces a timeout error and stops the programm. This is rather inconvenient. How can I change the programm so that the user can stop it even when the Wait For Event VI hasn't reached its timeout?

 

I tried this:

Timeout_UserStop1.JPGTimeout_UserStop2.JPG

 

But this doesn't work. For some reason, I get a timeout error with code -200474 but the boolean operator returns FALSE.

 

Any other ideas?

0 Kudos
Message 1 of 5
(2,952 Views)
If there an output on the wait for event VI that flags a timeout? If so, set the timeout short (like 100 msec) and wait for 3000 timeouts before continuing on.

Oh, and use an event structure. Timeout event (timeout=0) checks the wait for event, value change event for button breaks out of loop.

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 5
(2,938 Views)

Hi Mike,

 

there is no such output. And I think I can't use an event structure because I already have an event structure in the main program.

0 Kudos
Message 3 of 5
(2,932 Views)

No ideas? Anyone?

0 Kudos
Message 4 of 5
(2,817 Views)
It's hard to give ideas when we don't know what the program as a whole looks like.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 5
(2,807 Views)