🚧Siemens S7 (WIP)
Last updated
Last updated
The Siemens S7 protocol, also known as the S7comm protocol, is a communication protocol designed for Siemens PLCs (Programmable Logic Controllers). It allows for data exchange between PLCs and other devices within the same network, facilitating industrial automation processes. By utilising the S7 protocol, users can efficiently monitor, control, and retrieve data from their automation systems.
Simply drag the create
function onto the board, name your instance and trigger.
Drag the delete
function onto the board, insert the name of the instance to be deleted and trigger it.
With the getStatus
function, you can read out the current connection status of the S7 connector.
To establish a connection to a PLC use the initiateConnection
function. There are a few parameters available for the connection.
Parameter | Default | Type | Description |
---|---|---|---|
host | String | The host to be contacted for the S7 connection. | |
port | 102 | number | The connection port. Change this if your endpoint is not using the standard port. |
rack | 0 | number | |
slot | 2 | number | |
timeout | 5000 | number | Connection timeout in ms. |
To drop the connection to the PLC, drag the dropConnection
function onto the board and trigger it. This function simply terminates the TLC connection.
The addItems
function adds items to the internal read polling list. If items includes the value _COMMERR
it will return the current communication status. Items can be a string or an array of strings.
The removeItems
function removes items from the internal read polling list. Items can be a string or an array of strings.
If the items box is left empty, all items will be removed
Write items to the PLC with the writeItems
function. If items is a single string, values should then be a single item. If items is an array of strings, values must also be an array of values of the same length.
The function returns true if the write was successful and false if it wasn't.
With the readAllItems
function, you can read out all items on the read polling list. They will be returned as key value pairs.