Hacti Posted September 1, 2007 Report Share Posted September 1, 2007 Hi, My question is : Can I change the value of a shared variable programmatically (with property nodes, without hardcoding the variables) some other way then using the datasocket. I ask this because our configuration changes from one project to another and we are trying to transfer from 7.1 to 8.2 as easily as posible, without having to rewrite our whole program. Thanks. Quote Link to comment
crelf Posted September 1, 2007 Report Share Posted September 1, 2007 I think your best bet is to use scripting to find the property nodes and replace them with the shared varibles. I've never done it, but if you write it in a generic architecture, it shouldn't take you too long... Quote Link to comment
robijn Posted September 1, 2007 Report Share Posted September 1, 2007 QUOTE(Hacti @ Aug 31 2007, 12:35 PM) My question is : Can I change the value of a shared variable programmatically (with property nodes, without hardcoding the variables) some other way then using the datasocket. Hi, I think you need the DSC toolkit for that. It can connect to a supplied shared variable and it gives you a datasocket connection reference (IIRC). You will need an URL starting with psp:\\ Joris Quote Link to comment
Grampa_of_Oliva_n_Eden Posted September 1, 2007 Report Share Posted September 1, 2007 QUOTE(Hacti @ Aug 31 2007, 06:35 AM) ... a shared variable programmatically ...we are trying to transfer from 7.1 to 8.2 as easily as posible, without having to rewrite our whole program.Thanks. This does sound like a DSC app you are trying to upgrade. To quote from Indiana Jones and the Temple of Doom "Hold on lady, we goin for a ride." If so, "do not pass go, go directly to" datasockets. Only the most simple DSC constructs will mutate correctly. The URL's of the datasockets can be manipulated the way the old tag names could. And if you are using alarming features, you may have to resort to reading values more than once to get the actual value. If this is not a DSC app, disregard all of the above. Ben Quote Link to comment
Hacti Posted September 1, 2007 Author Report Share Posted September 1, 2007 QUOTE(Ben @ Aug 31 2007, 02:36 PM) This does sound like a DSC app you are trying to upgrade.To quote from Indiana Jones and the Temple of Doom "Hold on lady, we goin for a ride." If so, "do not pass go, go directly to" datasockets. Only the most simple DSC constructs will mutate correctly. The URL's of the datasockets can be manipulated the way the old tag names could. And if you are using alarming features, you may have to resort to reading values more than once to get the actual value. If this is not a DSC app, disregard all of the above. Ben thanks, thought that might be the case. Hacti Quote Link to comment
Aristos Queue Posted September 2, 2007 Report Share Posted September 2, 2007 QUOTE(Hacti @ Aug 31 2007, 05:35 AM) My question is : Can I change the value of a shared variable programmatically (with property nodes, without hardcoding the variables) some other way then using the datasocket. If you have a finite set of shared variables, you could create a separate subVI for each variable that sets its value and then use VI Server to select which subVI to call. Quote Link to comment
Hacti Posted September 15, 2007 Author Report Share Posted September 15, 2007 QUOTE(Aristos Queue @ Sep 1 2007, 01:15 AM) If you have a finite set of shared variables, you could create a separate subVI for each variable that sets its value and then use VI Server to select which subVI to call. Did a similar thing but with OPC server. Works fine:) Hacti Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.