Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Make tag read-only for specific controller
PostPosted: Thu Jan 03, 2013 8:03 am 

Joined: Mon Jun 11, 2012 2:10 pm
Posts: 89

Offline
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


 Profile  
 
 Post subject: Re: Make tag read-only for specific controller
PostPosted: Thu Jan 03, 2013 9:23 am 

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

Offline
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.

Attachment:
Snap 2013-01-03 at 08.22.13.png
Snap 2013-01-03 at 08.22.13.png [ 34.18 KiB | Viewed 4488 times ]

_________________
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer


 Profile  
 
 Post subject: Re: Make tag read-only for specific controller
PostPosted: Thu Jan 03, 2013 9:40 am 

Joined: Mon Jun 11, 2012 2:10 pm
Posts: 89

Offline
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


 Profile  
 
 Post subject: Re: Make tag read-only for specific controller
PostPosted: Thu Jan 03, 2013 9:55 am 

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

Offline
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


 Profile  
 
 Post subject: Re: Make tag read-only for specific controller
PostPosted: Tue Jan 08, 2013 9:18 am 

Joined: Mon Jun 11, 2012 2:10 pm
Posts: 89

Offline
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


 Profile  
 
 Post subject: Re: Make tag read-only for specific controller
PostPosted: Tue Jan 08, 2013 9:32 am 

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

Offline
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


 Profile  
 
 Post subject: Re: Make tag read-only for specific controller
PostPosted: Tue Jan 08, 2013 9:55 am 

Joined: Mon Jun 11, 2012 2:10 pm
Posts: 89

Offline
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


 Profile  
 
 Post subject: Re: Make tag read-only for specific controller
PostPosted: Tue Jan 08, 2013 7:33 pm 

Joined: Mon Jun 11, 2012 2:10 pm
Posts: 89

Offline
I discovered the tag cannot be set as Write only. If I have it ReadWrite the ValueChange event fires.

_________________
Adam M.
Controls Engineer
FlexEnergy


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 7 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron