NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to run a vi with a Boolean start button?

Hello Community,

 

I am trying to run a vi that I created in Labview through Teststand.

The vi has a simple Boolean Start Button that needs to be clicked to True in order to run my code.

I am unclear as to how to do this in Teststand.

 

 

Thank you,

0 Kudos
Message 1 of 10
(6,418 Views)

Why can't you just pass a TRUE into the VI from TestStand?



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 10
(6,417 Views)

I tried changing the default of the Boolean to TRUE as shown in the attachment.

However, my vi has an event handler which is triggered by mouse down of the Boolean button.

If my Boolean starts defaulted as a TRUE or FALSE, how do I switch it again in TestStand to trigger the event handler?

 

 

0 Kudos
Message 3 of 10
(6,415 Views)

You can't.

 

Is what is in the Start event case a subVI?  You could just call that VI.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 10
(6,411 Views)

Use the Value (Signaling) property of the boolean to trigger the event structure.  You would then need to configure the event structure to handle a Value Changed event for the boolean, instead of your Mouse trigger.  Additionally the button will need to be set as a switch and set back to False.

 

Thanks.

 

PH

Message 5 of 10
(6,406 Views)

Crossrulz: No, it is a complilation of several subVI's.

 

Teds: I tried the event structure as a value change event instead of a mouse trigger, but Teststand would get hung up running the code and eventually I'd have to abort. Maybe I am not clearly understanding what you suggested.

 

Side note, I asked a source and was told to not use an event structure. Said event structures are used for user interface interaction and not typically to be used with Teststand. I removed my event structure and boolean control. My code is now running, however, after my code runs in Teststand I receive the following error (see attachment). What does this error mean?

0 Kudos
Message 6 of 10
(6,393 Views)

Did you terminate the VI abnormally by clicking on the Abort button from the toolbar?

 

PH

0 Kudos
Message 7 of 10
(6,386 Views)

Did you use the Close LabVIEW or Stop LabVIEW primitives?  It's really hard to debug without actual code.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 8 of 10
(6,356 Views)

Ted: I was unable to click the abort button from the toolbar for it was dimmed out. I had to click the x to close it.

 

crossrulz: I was using the Stop Primitive, but removed it. I found out it wasn't the best to use. Now my code ends by stopping the while loop. Not sure if it is better, but the error I had is now gone.

 

Of course on that note a new problem develops... If I open my code in labview first, then open teststand, and run a single pass my code will run perfectly in teststand and result in a pass. Although, if I open teststand only and run a single pass it results in a pass immediately, but my code in labview clearly did not complete. My codes error checking shows an error that the first subvi failed to run. I wonder what may be causing this? DLL?

 

Why would it work if I open my vi in Labview before running the vi in Teststand, but if I run Teststand only it doesn't?

0 Kudos
Message 9 of 10
(6,348 Views)

Ended up contacting NI Support and for my specific code, in order to make it work, I needed to switch the adapter to Labview Run-Time Engine. Now I am error free and know that when running this particular vi I made, I need to switch the adapter configurations.

 

Thank you both for your time and help.

Kudos all around!Smiley Very Happy

0 Kudos
Message 10 of 10
(6,334 Views)