Make tag read-only for specific controller

Discussion of configuring and troubleshooting communication to PLC's or other devices using iX Developer.
Post Reply
AMitchneck
Posts: 137
Joined: Mon Jun 11, 2012 2:10 pm

Make tag read-only for specific controller

Post by AMitchneck »

Does iX have the ability to make a tag read-only to a specific controller?

I have a project that sources tags from background script that I would like to make read only from a Modbus slave controller. For the script to be able to source the tag I needed to make it read/write, but this also allows writes from the modbus controller (which iX incorrectly thinks supplies the tag since it is the only assigned controller).

Thanks.
Adam M.
Controls Engineer
FlexEnergy

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

Re: Make tag read-only for specific controller

Post by mark.monroe »

The only permission settings for tags are the Access Right, which is set on a per tag basis. Will that not work for you? There is no other way to set tag permissions.
Snap 2013-01-03 at 08.22.13.png
Snap 2013-01-03 at 08.22.13.png (34.18 KiB) Viewed 14630 times
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

AMitchneck
Posts: 137
Joined: Mon Jun 11, 2012 2:10 pm

Re: Make tag read-only for specific controller

Post by AMitchneck »

When I set the access rights to read-only it disables my script from being able to modify and source the tag.
Adam M.
Controls Engineer
FlexEnergy

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

Re: Make tag read-only for specific controller

Post by mark.monroe »

If you make the tag read only, then it is read only from the controller, so you can not change the value of the tag in the HMI, because then it would change it in the controller. You can read the tag's value in script.

If you make it write only, then the controller can not change its value, only the HMI.

If you are changing the value of a tag in script, you should make sure that you set the tag as "Always Active". Otherwise the tag may not update the value on the controller. Only tags that are used on the screen are polled. Those used in a script need to be set as "Always Active" to be polled.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

AMitchneck
Posts: 137
Joined: Mon Jun 11, 2012 2:10 pm

Re: Make tag read-only for specific controller

Post by AMitchneck »

I set all my tags that are set via script to "always active", but for some reason the tags "ValueChanged" event is not being fired when the tag is changed. Does this event not fire if the tag is modified via script?


To get a little deeper into my problem - I have a controller for which iX does not have a driver. To get around this I wrote my own custom script which talks to the controller over RS232 and updates tags. To enable customers to read tag values over Modbus TCP I also attached a Modbus slave controller to the tags read via my script. I need to be able to have the Modbus controller connected to the tags yet not disable the functionality of the script (and Tag events).

Thanks.
Adam M.
Controls Engineer
FlexEnergy

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

Re: Make tag read-only for specific controller

Post by mark.monroe »

The ValueChange event will fire when you change the value of the tag via a script. The ValueChange event will only fire if the value changes. If the tag value does not change, it will not fire the ValueChange event. Setting a Tag repeatably to 0, for example, will not fire the ValueChange event repeatably.

I tested this using iX Developer 2.0.463 running a TxA target project simulating the terminal on my PC.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

AMitchneck
Posts: 137
Joined: Mon Jun 11, 2012 2:10 pm

Re: Make tag read-only for specific controller

Post by AMitchneck »

The ValueChange event fires for me only if the tag is not connected to the slave Modbus TCP controller. The moment I attach the controller the event stops firing.

Example tag:
Name: State
Type: Float
Access: Write
Modbus_TCP address: 40000
Initial value = 0
PollGroup1, Always active
Adam M.
Controls Engineer
FlexEnergy

AMitchneck
Posts: 137
Joined: Mon Jun 11, 2012 2:10 pm

Re: Make tag read-only for specific controller

Post by AMitchneck »

I discovered the tag cannot be set as Write only. If I have it ReadWrite the ValueChange event fires.
Adam M.
Controls Engineer
FlexEnergy

Post Reply