LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change user event definition online?

Hello All,
 
There is a very good example ( DSC Event Structure Demo.lvproj) how to generate user events from shared variables. I have tryed to modify this example that I can change one of these variables online. We can assume that I want change e.g. \\My Computer\EventsDemoVariables\DiscreteVariable to \\My Computer\EventsDemoVariables\MYTESTVARIABLE online. Is that possible? Can someone give me a hint how to program such function.
 
I tested to put definition blocks inside event-while loop, but then program start to generate events constatly. I also replaced this shared variable constant to shared variable control.
 
Regards,
0 Kudos
Message 1 of 2
(4,596 Views)

Hi SnowForest!

It is possible to edit share variables programmatically. You should get reference to variable. For more information check knowledge base "How do I configure shared variable properties with the DSC module 8.x?"

1) Use invoke node to open library (application class -> library -> open)

2) Get reference to variable you wish to modify

3) Use property node to modify your variable

4) Close references

I've done small example for you, so I hope will be helpfull Smiley Very Happy

 

Regards,

Martin

Certified-LabVIEW-Developer_rgb.jpg

Download All
0 Kudos
Message 2 of 2
(4,204 Views)