To use the instruction, you do not require any additional hardware module.
With the "MB_CLIENT" instruction, you establish a connection between the client and the server,
send requests and receive responses and control connection termination of the Modbus TCP server.
The REQ parameter is level-controlled. This means that as long as the input is set (REQ=true), the instruction sends communication requests.
The instance DB for other clients is blocked with the communications request.
Changes to the input parameters will not become effective until the server has responded or an error message has been output.
If the parameter REQ is set again during an ongoing Modbus request, no additional transmission takes place afterwards.
The "MB_CLIENT" instruction communicates as a Modbus TCP client via the PROFINET connection of the S7-1200 CPU.
To use the instruction, you do not require any additional hardware module.
With the "MB_CLIENT" instruction, you establish a connection between the client and the server,
send requests and receive responses and control connection termination of the Modbus TCP server.
The REQ parameter is level-controlled. This means that as long as the input is set (REQ=true), the instruction sends communication requests.
The instance DB for other clients is blocked with the communications request.
Changes to the input parameters will not become effective until the server has responded or an error message has been output.
If the parameter REQ is set again during an ongoing Modbus request, no additional transmission takes place afterwards.
Note
Consistent input data during an "MB_CLIENT" call
When a Modbus client calls a Modbus instruction, the status of the input parameters is stored internally and then compared at the next call.
The comparison is used to determine whether this particular call initialized the current request.
Several "MB_CLIENT" calls can be executed if you use a common instance DB.
The values of the input parameters must not be changed while an "MB_CLIENT" instance is being executed.
If the input parameters are changed during execution, "MB_CLIENT" cannot be used to check whether or not the instance is currently being executed.
0 Comments