10-01-2012 01:04 PM
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,
10-01-2012 01:26 PM
Why can't you just pass a TRUE into the VI from TestStand?
10-01-2012 01:50 PM
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?
10-01-2012 02:04 PM
You can't.
Is what is in the Start event case a subVI? You could just call that VI.
10-01-2012 02:12 PM
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
10-01-2012 03:16 PM
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?
10-01-2012 03:38 PM
Did you terminate the VI abnormally by clicking on the Abort button from the toolbar?
PH
10-02-2012 06:47 AM
Did you use the Close LabVIEW or Stop LabVIEW primitives? It's really hard to debug without actual code.
10-02-2012 09:22 AM
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?
10-02-2012 02:30 PM
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!