Applies To:
  • CitectSCADA 5.xx

Summary:
Setting up a connection to an S5 and S7 PLC in Citect, using a Siemens CP1613 card and the SINEC and S7NT protocols in Citect. 

Solution:
I used the Simatic Net software (V5) on a W2000 machine to define these connections.

S5 Connection

For the S5 I had to configure the communication settings in the COML TF application. This gets installed when you install the Simatic Net software on your computer.

COML TF Configuration

Information required for the COML TF configuration is:

        -    Node Name - a text string used only as a description (arbitrary)

        -    Station Address - the MAC address of the CP1413 TF card in the PC

        -    CP Type - must be CP1413 TF

        -    Application Association List - a list of all the defined Application Associations (should be empty the first time you run the program)

        -    Name - the Application Association name. This must be the one used in the Citect application when defining the address of the  
             (S5) IO Device. This one must also match the application association name that is defined in the CP1430TF card in the PLC.

        -    Remote Address - the MAC address of the CP1430 TF card in the PLC

        -    Local TSAP - connection name on local side. This must match the remote TSAP setting configured for the CP1430TF card in the
             PLC.

        -    Remote TSAP - connection name on the remote side. This must match the local TSAP settings configured for the CP1430TF card
             in the PLC.

        -    Server ID - a text string (arbitrary)

        -    Connection Established - must be active

        -    Connection Type - must be static

        -    PDU Size - set to 500

        -    TPDU size - set to 512. This must match the setting for the CP1430TF card.

After you have entered this information, you need to generate a binary DB, via one of the options under the 'file' menu option. This file is needed later in the PG/PC interface program.

In the 'Setting the PG/PC interface' application you can select the CP_H1_1: entry. For the S5 connection you have to use the CP1613(ISO) entry. Select this entry and go to the Properties tab and select the tab 'TF protocol. Then tick the box 'Activate TF' and select the correct binary database file that you saved from the COML TF package. (In the tab 'Mode' you can reset the card, this needed after every change in the 'Setting the PG/PC interface' applet)

In the S5 PLC you will have to configure both the CP1430TF card and the PLC program correctly.

CP1430 TF Card Configuration

The CP1430 card must be separately configured to allow the link to work. Within the Step 5 programming environment, the COM1430 package is used to define a communications database.

The settings required in the CP1430 TF card are:

        MAC Address: the local address must match the setting of the remote address in the Citect computer. This can be set under
        'Edit | CP Init'.

        Application association settings. This can be configured under 'Edit | connections | application association - define application
        association'

  •             Application Association Name: must match the Application Association defined in the Citect computer
  •             TF-PDU size. This must match the setting in COML TF
  •             Est. (establishment) Type: P4
  •             Multiplex Address: 0
  •             Interface communication: set to P (for productive)
  •             Local TSAP: must match the Remote TSAP setting in the Citect computer
  •             Remote TSAP: must match the Local TSAP setting in the Citect computer
  •             Remote MAC Address: must match the Station Address set in the Citect computer
  •             Local variables. If you go a page down you can define 'local variables' for this connection. For example as follows.
NAME TYPE ACC S5 ADDRESS ANZW SSNR
DATA AR 100 DB 50 10 FW0 1
IN 16

VMD variables. Citect's SINEC protocol only supports VMD variables. This can be set under 'Edit| VMD variable editor'. The name of these VMD variables (f.e. DATA) is a case sensitive setting.

 

LOCAL DEFINITION / VMD SIMATIC

S5 / COM143

NAME TYPE ACC S5 ADDRESS ANZW SSNR
DATA AR 100 DB 50 10 FW0 1
IN 16

 

Siemens S5 PLC Program

The Siemens S5 PLC must have the following function blocks loaded for communications to operate correctly. The SYNCRUN function block must be called in the startup OB. The SEND-ALL and the RECEIVE-ALL function blocks must be called in a cyclic program.

Citect Configuration

The last step is to configure Citect for the S5 connection. In Citect you have to:

        -    Create a sinec.dbf file that matches the definition of your VMD variables. The names are case sensitive! In Citect help files you
             can find more details on this.

        -    Sinec.dbf entry for an array of analogue (VMD) variables named DATA:

                DATA[%U]         0         1         16         0         99         Comment         5         16         100

        -    Copy this sinec.dbf file in your Citect\bin directory. Also copy the (Siemens) file stf_conf.dat to your Citect\Bin directory.

        -    If you have not installed Citect in C:\Citect location, then create a directory called a C:\Citect\bin directory and copy there your
             sinec.dbf file and the stf_conf.dat file

In Citect forms you will then use the following settings.

Boards Form:

Type: SINEC

I/O Device Form

Address: Name of your application association name as defined in COML-TF

Protocol: SINEC

 

S7 Connection

COML S7 Configuration

In the COML S7 application you define the communication settings. More details on this setup can for example be found in Q2684 and in Citect help files.

To be able to use both TF and S7 over one CP1613 card you will have to define an extra access point in the 'Setting the PG/PC interface' applet and use that only for your S7 connection. To define a new access point, open the drop down box 'access point of the application' and select 'New'. In my example I used the name Citect for this new entry. For the S7 connection you have to use the CP1613(RFC1006) entry. Click properties and go to the 'S7 protocol' tab. There you will link to the database that you defined earlier with the COML S7 package.

Citect Configuration

In the Citect forms you will then use the following settings.

Boards Form:

Type: S7NT

Special options: name of access point as defined in PG/PC interface applet. (Citect in my example)

Ports Form:

Special options: name of the VFD name as defined in COML-S7.

(The S7NT driver needs one port per I/O device. So in COML-S7 you define a VFD name for each PLC.)

I/O Device Form:

Address: name of your S7 connection as defined in COML-S7

Protocol: S7NT

 

Keywords:
 

Attachments