Page 1 of 1

Writing Tag Values

Posted: Thu Nov 01, 2012 8:34 pm
by fserritella
Is it possible to take a value from a Modbus read only variable and write it to a Modbus write only variable when a button is pressed?

Re: Writing Tag Values

Posted: Fri Nov 02, 2012 7:54 am
by mark.monroe
The below code fires the ValueChange event for Tag1 whenever it changes. It then copies the value into Tag2. You should also turn on the Always active property of Tag1, so that it always polls the tag.

You should also look at the Data Exchange section of the manual.
Snap 2012-11-02 at 07.53.09.png
Snap 2012-11-02 at 07.53.09.png (53.95 KiB) Viewed 8674 times

Re: Writing Tag Values

Posted: Mon Nov 05, 2012 7:30 pm
by fserritella
mark.monroe wrote:The below code fires the ValueChange event for Tag1 whenever it changes. It then copies the value into Tag2. You should also turn on the Always active property of Tag1, so that it always polls the tag.

You should also look at the Data Exchange section of the manual.
Snap 2012-11-02 at 07.53.09.png
Thanks Mark. It worked great!