Identify advanced I/O Functions
This section explains InTouch advanced I/O functionality including the IOSetAccessName and IOSetItem functions, and Dynamic Reference Addressing.
- NB Designer OMRON HMI Youtube Tutorial Videos
- DOPSOFT DELTA HMI Youtube Tutorial Videos
- Wonderware Intouch Youtube Tutorial Videos
- GT Designer MITSUBISHI HMI Youtube Tutorial Videos
- WinCC Siemens HMI Youtube Tutorial Videos
- FACTORY TALK VIEW Youtube Tutorial Videos
IOSetAccessName Function
The QuickScript function IOSetAccessName modifies the node name , application name or topic name portions of an Access Name during Runtime. This enables the implementation of hot-backup strategies for InTouch. Syntax IOSetAccessName(“AccessName”, “NodeName”, “AppName”, “TopicName”);
Arguments | Description |
AccessName | The existing Access Name to assign the new AppName and Topic Name values to. |
Actual string or message tag. | |
NodeName | The new Node Name to assign. Actual string or message tag. |
AppName | The new Application Name to assign. Actual string or message tag. |
TopicName | The new Topic Name to assign. Actual string or message tag. |
Identify advanced I/O Functions
The Access Name, Node Name, Application Name, and Topic Name values may be specified as literal strings or they may be string values provided by other InTouch tags or functions. If an empty string (“”) is specified for an argument, that argument retains its current value.
For example, the Access Name MyAccess1 can be changed to point to the EXCEL application and the Book1 topic, without affecting the current Node Name, by using the following script function. IOSetAccessName(“MyAccess1”, “”, “EXCEL”, “Book1”); If an empty string is specified for a Topic, the Access Name’s current Application value is updated and its Topic value is retained.
For example, the following changes the Application Name for access name MyAccess2 to “EXCEL” without affecting its current Topic value. IOSetAccessName(“MyAccess2”, “”, “EXCEL”, “”); Likewise, if an empty string is specified only for an Application Name, the tag’s current Topic value is updated and its Application value is retained.
For example, the following changes the Topic for tagname MyAccess3 to “Book2” without affecting its current Application Name value. IOSetAccessName(“MyAccess3”, “”, “”, “Book2”); For example, the following changes the Topic for tagname MyAccess3 to “PLC2” without affecting its current Node Name or Application Name value. IOSetAccessName(“MyAccess3”, “”, “”, “PLC2”); This example would be used when PLC redundancy is a requirement.
Note: When IOSetAccessName is processed, there is a time delay as the existing conversation is terminated and the new conversation is initiated. During this time, any attempted POKEs or writes to the new topic will be lost. Using the IOSetItem Function The IOSetItem function is used to set an I/O type tag’s .Reference field. Syntax IOSetItem(“Tagname”, “AccessName”, “Item”);
Parameters | Description |
Tagname | Any InTouch IO tagname enclosed in quotes. |
AccessName | The Access Name to change the tag to. |
Item | The Item to change the tag to. |
The Tagname, AccessName, and Item values may be specified as literal strings, or they | |
may be string values provided by other InTouch tags or functions. |
For example, the .Reference field of tagname MyTag1 can be changed to point to the Excel access name and the R1C1 item by using the following script function. IOSetItem(“MyTag1”, “excel”, “R1C1”); or by: Number = 1; TagNameString = “MyTag” + Text(Number, “#”); IOSetItem(TagNameString, “excel”, “R1C1″); If an empty string (” “) is specified for both the Access Name and Item values, the tag is deactivated. For example, the tag MyTag2 is deactivated by the following. IOSetItem(“MyTag2”, “”, “”);
If an empty string is specified only for an Item, then the tag’s current Item value is retained and its AccessName value is updated. For example, the following changes the Access Name for tagname MyTag3 to Excel2 without affecting its current Item value. IOSetItem(“MyTag3”, “excel2”, “”);
Note: If a space appears between double-quotes, the argument is set to blank, or deactivate. No space between double-quotes, means “do not change this argument.”
Likewise, if an empty string is specified only for an AccessName, then the tag’s current Item value is retained and its AccessName value is updated. For example, the following changes the Item for tagname MyTag3 to R1C2 without affecting its current Access Name value: IOSetItem(“MyTag3”, “”, “R1C2”); Dynamic Reference Addressing (DRA)
Dynamic Reference Addressing allows you to address multiple data sources with a single tagname. By assigning a valid reference to the .Reference field of an I/O-type tag, the address of the data source for the tag can be dynamically changed. Each I/O-type tag includes a reference associated with the address of its data source. The valid syntax for the .Reference field is as follows.
Syntax | Description |
Tagname.Reference=”accessname.item” | Changes Access Name and item. |
Tagname.Reference=”[.]item” | Same Access Name, different item. |
Tagname.Reference=”accessname” | Changes Access Name. |
Tagname.Reference= “ “ | Deactivates the tagname. If the Access Name or |
Item is not specified, the current value for that field is | |
assumed. | |
.ReferenceComplete | 1 = Valid I/O for tag.0 = Either Access Name or Item |
is invalid for tag. |
Note: Dynamic references are used to view data points whose values are only needed temporarily, such as in diagnosticapplications. This makes it an ideal troubleshooting tool. Since the data source of a tagname can be changed, dynamic references should not be used for any data that needs to be permanently stored or continuously monitored for alarm conditions.
Also Read:-