LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Updating Tab Control programmatically from within StateChart

I would like to update a tab control, visible page, based on the current state, using the StateChart Module.  I first tried creating a reference to the tab control and passing that to a property node within the state in the statechart.  However when I drop the reference in the state it pulls every control associated with the tab control into the state, no good.  I tried with a property node with same results.  My next thought was to use a shared variable, but I dont believe that I can have a shared variable with enum data type.  Anyone have a solution for this problem?  It seems like someone else must have encountered the same issue at some point.  Any thoughts will be appreciated.

Cheers!
0 Kudos
Message 1 of 6
(2,988 Views)
Hi,
 
I'm not understanding your problem. can you post a small exaample of your situation?
Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 2 of 6
(2,983 Views)
The example uses the StateChart module, if you have the statechart module it is probably easier for you to try and replicate, just create a state in the statechart and place a tab control on the front panel of the vi that calls the statechart, and then create a reference to the tab and place it in the state of the statechart.  I will go ahead and make a quick example, but be warned that without the statechart module you wont be able to open it.

I apologize for the zipped folder, I needed to attach more than 3 files.


Message Edited by jmcbee on 05-15-2008 10:16 AM
0 Kudos
Message 3 of 6
(2,978 Views)
I believe you want to create the reference to the tab control and then pass that reference into your statechart via the inputs control. (This means adding a reference control to your Inputs.ctl).

Then you should unbundle this reference in the guard or action where you want to use it and pass it to a VI server property node (drop this from the programming>application control palette). If you copy the reference into the guard or action, then you actually are also copying the tab control as well. (It is as if you copied the reference to another VI.)

Hope that helps,
Nick
Message 4 of 6
(2,974 Views)
Sorry,
 
But i can't help. I don't have state chart toolkit. But I think that the last post explains what may be causing your problem
Software developer
www.mcm-electronics.com





PORTUGAL
Message 5 of 6
(2,967 Views)
That idea just struck me too (while I was on the phone with an NI applications engineer), I realised I was going about it in the wrong way.  Thank you very much for the reply!


Message Edited by jmcbee on 05-15-2008 10:35 AM
0 Kudos
Message 6 of 6
(2,967 Views)