From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to call custom property of XControl inside Facade.vi?

hi everyone,

 

i have set up a xcontrol with some custom read/write properties.

 

now i want to to set a property inside the Facade.vi.

is this possible with a property node?

 

like in the parent vi, when the property node is linked to the xcontrol.

 

regards and thanks for your time

 

ps: the why is because i want to test the xcontrol by itself and set some inital state

(for that purpose i have a conditional that only runs at first call in front of the event-structure.)


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 1 of 8
(2,468 Views)

Hi jwscs,

 

the XControl properties are usually handled in the "Display state" shift register.

You can access the data in that shift register in your facade VI at any time so why do you want to use a property node for this?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(2,459 Views)

i guess the main reason is: i am not fully understanding xcontrols 😉

 

second:

i took your hint and linked a property-node to "State Change In"-property i want to change

and set its "Value" to the one i want.

now the problem remains for me, how to trigger a "Display State Change Event"

where i change all the visible controls.

 

i tried it with a chained property-node linked to "Action"->"State Changed?" and set it to TRUE,

unfortunately it wont trigger the "Display Change Event".

 

hope that makes sense for you,

and thx for the quick reply btw


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 3 of 8
(2,451 Views)

Hi jwscs,

 

the "State Changed"-flag is handled in the "Action" shift register of the facade VI.

 

There's a reason why you have all those comments in this VI when you create a new XControl…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(2,446 Views)

i accessed and changed the "State Changed?" property of "Action", via a property node linked to it to TRUE.

this code is running before the first run of the main Event Structure,

but highlight mode only shows running into "Timeout" not "Display State Change" event.

 

i thought, that if the "Action"-"State Changed?" property is True

the Event Structure would go to "Display State Change".

 

(i have read the comments, but possibly misunderstood them)

 


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 5 of 8
(2,442 Views)

unfortunately still dont know the answer to my original question,

 

but what i wanted i achieved by the follwoing method (slightly hackish):

 

i have some setup code in front of the while around the event structure, which is only run once (the time xcontrol is loaded/started)

this setupcode changes the state and thus (with the use of property nodes) sets the values in "Display State In".

to trigger the "Display State Change" Event i have created a new boolean control named helper and added it for value-change to the "Display State Change" Event.

 

thus when i want to explicitly trigger the "Display State Change" Event i just have to use "Value(Signaling)" with a property node on "helper".

 

hope that might help someone

 


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 6 of 8
(2,416 Views)

Hi jwscs,

 

i have some setup code in front of the while around the event structure, which is only run once (the time xcontrol is loaded/started)

There are special events in a XControl to handle INIT and MODE changes!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 8
(2,413 Views)

if you mean the Init.vi ability ... havent figured out the proper use (and usecase) of it yet.

(so far it seemed like giving the ability to swap out a changed xcontrol for a running program)

 

if you mean something else i'd love some more elaborate pointing plz.

 

thx for the replies so far,

 

but they seem a little condescending 😞

(first: RTFM, and second: i know something which you dont, but im not telling)

but maybe im just lost in translation


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 8 of 8
(2,408 Views)