Local vs Remote Scripts


robbudge

Recommended Posts

I am just testing my project operating with with a remote Client.

My Default Connection is to the main server.

Initially my project had a 'Screen Load' Script that would populate the screen objects with the required indexed Channels say Motor_0_Speed where _0_ would be the index.

The buttons would simply call BeginSeq(Screen x Load).

We Quickly realized that scripts ran on the Default connection and resulted in a screen change on the server.

the code was moved to a Onscreen symbol, then the Component RedoLoadevent Was called to populate the screen.

This works well.

The problem i now have is Global Variables, Well more importantly Global Class Variables.

On one page i have a sequence that turns Pump_0_Volume , Pump_1_Volume , Pump_xxx_Volume into a class that contains the array Pump[x].Volume.

This is then used in a Table Screen component with lots of other indexed data turned into an array.

The question is how do I run a sequence on the Non Default Connection. From with DAQ,

From with DAQ I can right click and Begin Sequence Manually and all works well.

I was hoping for a command like 'Local.BeginSeq(xxxxx) but i could not find one.

I don't really want to be passing all my class information into a V.Channel. 

 

Link to comment
Share on other sites

Yup, you figured it out.  When you have a connection other than Local as the default connection, you can reference items on the Local connection by simply putting Local. in front.  This actually works even if the default connection is Local.  Since most DAQFactory applications only use Local it seemed a waste to make customers type Local. in front of everything, thus the main reason for the default connection.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.