Logix Tag Support
The EtherNet/IP Device Service supports tags produced and consumed by Logix controllers.
Logix Tag Device Profile
Logix Tag Resources
To create a device resource for a Logix Tag, the following attributes are required:
Attribute | Description | Valid Values |
---|---|---|
type | Informs the device service of the resource type, in this case, logixTag | logixTag |
tagName | The name of the programmed tag within the PLC | <tag name > |
arraySize | The number of array elements, if the Tag is an array Note: This resource is only used if an entire Array Tag is to be read at once. |
Any value between: 0 and 200 |
Logix Tag Resource Examples
Provided below is an example of Tags that may be programmed into a PLC through Studio 5000:
Tag Name | Data Type |
---|---|
test_dint | DINT |
test_real | REAL |
bool_array[0] | BOOL |
bool_array | Array |
Resources for all the above tags can be seen below
{
"name":"test_dint",
"description":"Double Integer Value",
"attributes":{
"type":"logixTag",
"tagName":"test_dint"
},
"properties":{
"value":{
"type":"int16",
"readWrite":"RW"
}
}
},
{
"name":"test_real",
"description":"Floating point value",
"attributes":{
"type":"logixTag",
"tagName":"test_real"
},
"properties":{
"value":{
"type":"float32",
"readWrite":"RW"
}
}
},
{
"name":"bool_array[0]",
"description":"First element of bool array",
"attributes":{
"type":"logixTag",
"tagName":"bool_array[0]"
},
"properties":{
"value":{
"type":"bool",
"readWrite":"RW"
}
}
}
{
"name":"bool_array",
"description":"First element of bool array",
"attributes":{
"arraySize":10,
"type":"logixTag",
"tagName":"bool_array"
},
"properties":{
"value":{
"type":"Uint8Array",
"readWrite":"R"
}
}
}
The example above shows that the device service has the ability to read and write to individual elements from array tags, in this case: bool_array[0]
is the first element of bool_array
and has the ability to read and write to it.
You can also read (but not write) to the whole array tag itself. In this case: bool_array
is output using the Uint8Array
data type. This will output the array as a list.