Writing Tag Values

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
fserritella
Posts: 3
Joined: Mon Feb 06, 2012 11:33 am

Writing Tag Values

Post 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?

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Writing Tag Values

Post 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 8675 times
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

fserritella
Posts: 3
Joined: Mon Feb 06, 2012 11:33 am

Re: Writing Tag Values

Post 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!

Post Reply