Applies To:
  • CitectSCADA 5.31, 5.40, 5.40 Service Pack A, 5.40 Service Pack B

Summary:
I want to make a connection to a Pilz PLC via Modbus. How can I do this?

Solution:
You need to buy from Pilz the „Standartfunktionsbausteine für Modbus RTU Slave" (PILZ website: www.pilz.com ) In my communication I used version 1.0 of these blocks.

Order details:

ST SB Mod RTU-S (Basisliz. f. 49 Anwend.)

Ident.No.: 301263B 100003 1.00

Basislizenz: Sachnummer 301263B

Standartfunktionsbausteine für Modbus RTU Slave V1.0

You can set up the communication with the „Communication Express Wizard" when you choose the „Modicon 484 Serial" connection. The wizard will ask only for the Modbus address of the device and the Com port that you use on your PC.

Below are the configuration details.

IOServer Configuration:

IOServer Name:

IOServer

   

Board Configuration:

IOServer Name:

IOServer

Board Name:

BOARD1

Board Type:

COMX

Address:

0

Port Configuration:

IOServer Name:

IOServer

Port Name:

PORT1_BOARD1

Number:

1 (This is the COM port number)

Board Name:

Board1

Baud Rate:

19200

Data Bits:

8

Stop Bits:

1

Parity:

EVEN_P

IODevice Configuration:

IOServer Name:

IOServer

Name:

Pilz

Number:

1

Address:

1 (The PLC station number (Modbus address) configured on PLC)

Protocol:

MODBUS

Port Name:

PORT1_BOARD1

Variable Tag Configuration:

Variable Tag Name:

Test

Data Type:

INT

I/O Device Name:

Pilz

Address:

40001

The Citect address range is 40001-49999

This Modbus communication needs the following parameter in the Citect.ini file:

[modbus]
InitType=3

 

I used the Citect Modbus Driver V2.04.04.242.

Following Modbus Function Codes are supported by the PILZ PLC (in hex): 0x3, 0x6, 0x7, 0x10.

See also KB Q3025 on Modbus function codes that the Citect Modbus driver supports.

 

Serial Wiring Diagram:

Example PILZ PLC programme:

OB1 (ST - Part)

 

Performance – Tuning:

You can affect the performance with the BLKD and BLKC parameter from the SB 209.

The allowed values are: 0 between 255 ( 0 – Fastest 255 – Slowest) .

NOTE:

This is dependent of the cycle time/load of the PLC program. Higher values for BLKD and BLKC lead to slower cycle times of your PLC program, and also a more complex PLC program (higher cycle time) requires lower values for BLKD and BLKC.

OB101 (FS - Part)

 

DB100 / DW100 (ST – Part)

 

Keywords:
 

Attachments