Table of Contents

LamaPLC: S7-1500 and Sicam Q200 Modbus TCP communication

Sicam Q200

S7-1500 and Sicam Q200 Modbus TCP communication The SICAM Q200 device is a multifunctional device with power quality class A and energy class 0.1S certifications.

The device measures voltages up to 480 V in 1-phase systems and in 3-wire and 4-wire systems (with neutral phase). The input circuits for voltage measurement can be used in IT, TT and TN networks. To ensure galvanic separation for current measurements, the lines connected to the current measurement inputs are galvanically separated from the current transformers.

If external voltage and current transformers are not used, the device can process rated input alternating voltages of up to VPh-N = 230 V (110 V for UL condition), VPh-Ph = 400 V (290 V for UL condition) and rated input alternating currents up to 5 A.

TIA Portal / Simatic S7-1500

Wiring schema

TIA Portal / Simatic S7-1500 Modbus communication wiring schema

Blocks (FBs, DBs)

TIA Portal / Simatic S7-1500 - Sicam Q200 CommunicationcallModbusQ200: main program for communication

ModbusQ200: measurements in real format

callModbusQ200_DB: instant DB from call main prg (automatic generated)

ModbusCommBlockQ200: communication parameters (IP,…)

ModbusQ200 datablock

The figure below shows the values converted to REAL form in the ModbusQ200 datablock. The first two lines:

The other lines contain the measured values in REAL form. Their content is updated every 2 seconds. The program does not read all the values from the Q200, only the marked (more important) measurements.

ModbusQ200 datablock / Simatic S7-1500 - Sicam Q200 Communication

callModbusQ200 functionsblock

callModbusQ200 functionsblock / Simatic S7-1500 - Sicam Q200 Communication

mbCli is a multiinstant (MB_CLIENT) Modbus call. The program calls this twice, with different parameters. If the status stays in the 700x range and changes continuously, then communication is working (You can find more information about status codes here).

ModbusCommBlockQ200

ModbusCommBlockQ200

The communication parameters of the Modbus connection can be set in the ModbusCommBlockQ200 DB:

InterfaceId: HW identifier of the PLC communication unit. If the PLC is communicating, this is typically 64.
ID: Number of the communication connection. In the case of several Modbus connections, it is worth paying attention, in the case of a single connection, 1.
ConnectionType: 11=TCP/IP, 19=UDP (17=TCP/IP), in this case 11 (B).
ActiveEstablished: The communication “active” party, i.e. TRUE.
ADDR: IP address of the partner (the Q200 unit). This must be set on the Q200, in this case: 192.168.178.64
RemotePort: 502, default.
LocalPort: 503, default.

Download

The SLC code contains all FBs, FCs and DBs required for the operation. The code was developed with TIA version 16. I cannot take responsibility for its use.

This code ensures communication for this equipment only. Good luck with your application! The code contains no restrictions, restrictions, 100% free!

If you need a modified or different code, find me here!

If you just want to throw me a coffee tip, you can do it here:

Donate

If you are a manufacturer and would like an example program similar to your product, you can find me here!

Download code here

This page has been accessed for: Today: 1, Until now: 80