S7 Reader Documentation
Version: 4.0.0
Retrieved: 2025-10-09 15:16:15
S7 Reader
Used for reading values from Siemens S7 PLC´s. The module will read values from the PLC on when a message arrives and pass the result (Array) to the next module(s) in the flow.
Compatible with S7-200, S7-300, S7-400, S7-1200, S7-1500
Note
To read data from S7-1200 and S7-1500 PLC´s the following settings must be used on the PLC
- "Optimized block access" must be disabled for the DBs you want to access
- "Permit access with PUT/GET" must be enabled
Settings
| Name | Requirements | Purpose | Default |
|---|---|---|---|
| IP Address | String with length 0 to 39 | IP Address of the PLC to use. | `` |
| Disable module if no IP address is specified | bool | If true the flow will not attempt to start the module if no IP Address is configured | false |
| Port | Number 1 to 65000 | Port of the PLC to use | 102 |
| Rack | Number 0 to Int.Max | Index of Rack to use | 0 |
| Slot | Number 0 to Int.Max | Index of Slot to use | 0 |
| CPU-Type | The S7 CPU-Type to connect to | S71200 | |
| Target Property | String with length 1 to 64 | The property that will contain the result | data |
| Tags collection (Resource) | The resource from which to read tag definitions | `` | |
| Additional tags to monitor | Allows you to manually add additional tags to read from the PLC | ||
| Timeout | Number 1 to Int.Max | Timeout for plc operations in Milie Seconds | 3000 |
| TSAP ID | Number 0 to 255 or empty | If a non default TSAP ID is used, it must be set here. Default depends on the CPU type. | empty |
Resource Format
Example of the resource file format.
{
"name": "Conveyor belt controller",
"tags": [
{
"id": "tag1",
"name": "ValveTemp",
"s7DataArea": "Input",
"s7DbAddress": 0,
"s7StartAddress": 0,
"s7Type": "Int",
"customProperty": "Metadata for tag1"
},
{
"id": "tag2",
"name": "ValveOpen",
"s7DataArea": "Input",
"s7DbAddress": 0,
"s7StartAddress": 2,
"s7BitAddress": 5,
"s7Type": "Bool",
},
{
"id": "tag3",
"name": "Name",
"s7DataArea": "DataBlock",
"s7DbAddress": 1,
"s7StartAddress": 20,
"s7Type": "String",
"length": 25,
},
]
}
The data types for the properties on the tag object are:
| Name | Requirements |
|---|---|
| id | string, unique within the array of tags |
| name | string, friendly name to be included in output |
| s7DataArea | One of (Input, Output, Memory, DataBlock) |
| s7DbAddress | number |
| s7StartAddress | number |
| s7BitAddress | number |
| s7Type | One of (Bool, Byte, Word, DWord, Char, SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal, String, DateTime) |
| length | The length to read. Only used when reading the S7Type String |
In addition, any number of extra fields can be added for each tag. Those fields are then added to the output messages. Use this to add additional metadata associated with each tag (see customProperty in resource example above).
Input
Any message can be used to trigger a read operation from the PLC.
Output
The result (Array) will be written to the Target Property
"targetProperty": [
{
"id": "tag1",
"value": 1235,
"name": "ValveTemp"
},
{
"id": "tag2",
"value": true,
"name": "ValveOpen"
},
{
"id": "tag3",
"value": "Factory101",
"name": "Name"
}
],
"crosser":{
"success": true
}
Search Documentation
Data Sources
Industrial