Applies To:
  • CitectSCADA 5.xx

Summary:
I am using the ProfiBD protocol to communicate to a Siemens S7-300 PLC.  What string types are supported by the S7-300 PLC and how are they defined in the PLC?

What are the valid string "definitions" available in the Siemens S7-300 family of PLCs?


Solution:
The latest ProfiBD.dll driver (V2.08.00.000) now supports two new string types. The new string types supported are:

1. SL<Index>

Eg. SL521 for a string of length 20 at FMS index 521(depending on definition of the string in the PLC).

2. S<Length>:<Index>

Eg. S20:521 for a string of length 20 at FMS index 521 (depending on definition of the string in the PLC).

Valid string "definitions" in the Siemens S7-300 family of PLCs:

The following string "definitions" for a datablock have been tested using a S7 315-2DP CPU.

i. ARRAY[1..20] BYTE

ii. ARRAY[1..20] CHAR

The above two definitions will let a user define/use a string type in Citect with a maximum length of 19 characters.  Note that even though you can write 20 characters to the PLC, Citect will replace the last character with a NULL character when reading back the string.

Note: The new string types were designed to use with ARRAY[1..X] CHAR and ARRAY[1..X] BYTE only.

iii. ARRAY[1..20] INT and ARRAY[1..20] WORD

These definitions will let a user define/use a string type in Citect with a maximum length of 39 characters.  Note that even though you can write 40 characters to the PLC, Citect will replace the last character with a NULL character when reading back the string.

If you are using strings defined with ARRAY[1..X] INT or ARRAY[1..20] WORD then make sure you are using the Citect Address SL<index> for the strings.  The use of the other Citect address S<length>:<Index> will cause the unit to go offline when writing to these strings.

 

Keywords:
 

Attachments