NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

how to programmatically enable tracing on custom UI

I have a custom user interface I built and everything is working great. I have added some debugging ability to the UI and i would like to programatically enable and disable tracing based on a UI control. i have yet to succeed in doing this.
 
Any Ideas on how to do this.



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 1 of 7
(4,076 Views)
You need to have an event based on the button that will call the following code:

Engine.StationOptions.TracingEnabled = true.

In LabVIEW, you need an Engine object (you could get this from the ApplicationMgr) and 2 Property Nodes.

Allen P.
NI
0 Kudos
Message 2 of 7
(4,066 Views)

I have tried to do it this way but it seams that it does not take affect until I close down my application and start it again. i need to be able to do this on the fly. this is the way that my code works.

I have a main VI that starts the TS engine an goes through the login process. This main VI is really just a switchboard that allows the user to open the interface for the board that they want to test. Then when the proper interface is called then I open the interface as a SubVI. Within this SubVI I open the proper sequence file and allow them to run it.

 

Thanks for the help.




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 3 of 7
(4,052 Views)

Hi Joe,

How are you implementing this in your UI. As I have tried using IEngine.StationOptions() to return a reference then used StationOptions.TracingEnabled() to switch on or off.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 4 of 7
(4,042 Views)

This is the piece of code that I use:

are there any other settings that I can set. I think that it may be working but I cannot tell until I really slow it down in TS. that is when i have to shutdown my app and restart it. Is there anything else that I can do. Can I change other settings. Like the panel that you get in TS. Are their things that I need to get the TS programmer to add to his sequence. i am really not a TS person, I am a LabVIEW guy.

 

Thanks for the help



Message Edited by Jhoskins on 04-28-2008 10:29 AM



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 5 of 7
(4,027 Views)
Hi Joe.

Try using a TestStand checkbox control connected to the Application Manager using the CommandKind_TracingEnabled ConnectCommand.

This will give you the functionality that you desire (changing the option on the fly), since the UIControls API takes care of committing this change for you.

Check out the attached code screen shot. This is a simple modification of the TestStand Simple Operator Interface -- all I have done is added the checkbox control, added its refnum to the cluster that is passed to the Configure Application Manager VI, and added the proper ConnectCommand to this subVI's code.





Message Edited by evanp on 04-29-2008 10:06 AM



Evan Prothro
RF Systems Engineer | NI

0 Kudos
Message 6 of 7
(3,996 Views)
Thanks for your help Evan. I got it working with the original code. Th eproblem was that it was not set up speed wise in the sequence. I actualy also found a way to enable all of the station options. See code below



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 7 of 7
(3,981 Views)