HOW TO connect and configure a WinCC Flex panel to an S5 PLC via the PG port.

Ralle

Super-Moderator , User des Jahres 2006-2007
Teammitglied
Beiträge
15.404
Reaktionspunkte
4.039
Zuviel Werbung?
-> Hier kostenlos registrieren
Ein Beitrag von JesperMP!

PS: Bei Gelegenheit versuche ich das mal etwas zu formatieren, aber leider ist das mit der Forensoftware megalästig und aufwändig! Falls jemand das übernehmen will, bitte eine PN an mich.

HOW TO connect and configure a WinCC Flex panel to an S5 PLC via the PG port.


This guide describes the details that are necessary for making a HMI (PC RT or panel) for an S5
PLC.
A typical application is to make a replacement for an old Siemens operator panel, OP393, OP20,
OP25 etc. These panels are not possible to purchase any longer.

1. The hardware connection.

1a. Case “a” is that a PC RT or a panel in the x70 series is to be used, i.e. an OP170B or OP270.
Important is that there is a serial RS232C port available.
The RS232/TTY adapter cable 6ES5 734-1BD20 must be used. This adapter has a 25-pin Dsub
connector on the RS232 side, and since both PC and panel have 9-pin D-sub ports, a 25-
pin/9-pin D-sub adapter must be installed between serial port and the adapter.
The adapter has a 15-pin PG port connector on the TTY end of the cable. This goes directly
onto the PG port on the S5 PLC.

1b. Case “b” is that a panel in the series x77 is to be used, i.e. an OP177B or OP277 etc.
Important is that these panels do not have RS232C ports only RS422/RS485 ports.
The RS422/TTY adapter 6AV6671-8XJ00-0XA0 must be used. This adapter has a 9-pin Dsub
connector on the RS422 side, and a 15-pin PG port connector on the TTY side. The 9-pin
connector goes directly onto the RS422/RS485 port on the panel (typically IF1B).
Between the TTY side of the adapter and the PG port of the S5 PLC, the cable
6XV1440-2Ann must be used (“nn” in the type number depends on the length).
Notice: There are dip-switches on the rear of the panel for setting either MPI/DP mode or
RS422/RS485 mode for the port IF1B. Set the dip switches for RS422/RS485 mode.
Notice: The cable 6XV1440-2Ann has markings on its two connectors for specifying which end
connects to the panel, and which end connects to the S5 PLC, “TD/OP” and “AG (PG/S5)”
respectively. The cable must be connected in reverse to these markings !
“TD/OP” must be connected to the S5 PLCs PG port.
“AG (PG/S5)” must be connected to the panels IF1B port via the RS422/TTY adapter.
(see picture)
Notice: On some panels, the adapter plus cable connector may not have space enough to get
past the casing of the panel. To allow the RS422/TTY adapter to connect to the IF1B port,
either cut the plastic casing (as in the picture), or use a short straight serial cable with 9-pin Dsub
connectors at both ends.

attachment.php


2. Convert old project, or write new.

Very old panels, like OP393 and OP20 cannot be converted automatically.
The only way is to write a new application, possibly assisted by text lists and tag lists from the old
COM TEXT configuration.
If the application has to be written completely new, then follow the advice in the next chapters.
The configuration of panels like OP15 and OP25 may possibly be converted, but only if these were
programmed with Protool.
To convert the Protool project, the Protool programming software is needed.
Load the Protool project into the Protool programming software, and use the “convert” function to
change the device type to a similar matching Windows CE based panel, i.e from OP25 to OP270.
Line-based panels like OP15 must be converted to a graphical Windows CE panel.
After the conversion is done, it is necessary to check everything carefully and manually correct if
necessary. The automatic conversion will not be 100% successful.
The conversion of line-based panels to graphical panels will require significantly more checking
and manually correcting.
The converted Protool project can now be loaded into the WinCC Flexible programming software
by using the “migration” function.
If the final application must be a x77 panel, this can be done by performing another device
conversion, this time inside the WinCC Flexible project.
Carefully check as much as possible, preferably by connecting the panel to a real S5 PLC.
Be sure to check the points mentioned in the next chapters.

3. Setup of the connection in WinCC Flexible.

Select the “SIMATIC AS 511” driver in the connection setup dialog.
For a panel, the port IF1B will typically be selected automatically.
For a PC RT, the COM port number, i.e. “COM1”, “COM2”, .. must be selected manually.
As the communication partner, select the intended CPU type, i.e. “S5 95U”, “S5 115U CPU944” …
etc.
 

Anhänge

  • AGPG.jpg
    AGPG.jpg
    23,1 KB · Aufrufe: 733
Zuletzt bearbeitet:
Teil 2

4. Specific configuration issues for S5 timers.

When using S5 timers, the special format of the timer has to be taken into account.
The WinCC Flexible application internally uses milliseconds as its time base. Before transferring
the values to/from the PLC, it converts to the S5 time format.
This means that the following rules should be carefully observed.
Output of actual values on the HMI:
The PLC tags address can be either S5 timer (i.e. “T5”) or a data-word (i.e. “DB 100 DW 10”).
The PLC tags Data type must be “KT”.
Linear tag scaling must be applied, with “PLC lower value” = 0, “PLC upper value” = 1000,
“HMI device lower value” = 0, “HMI device upper value” = 1.
The output field using the tag, must have “Data type” = decimal, “Format pattern” = 999 or
9999, “Shift decimal point” = 0.
Notice: Only seconds will be displayed. This not an issue anyway, since the slow update
speed of the 9600 baud TTY connection does not allow to see updates faster than once every
second.
Entry of setpoint values on the HMI, the associated S5 timer has 0.01 second resolution:
The PLC tags address must be a data-word (i.e. “DB 100 DW 20”).
The PLC tags Data type must be “KT”.
Linear tag scaling must be applied, with “PLC lower value” = 0, “PLC upper value” = 1000,
“HMI device lower value” = 0, “HMI device upper value” = 1.
Tag limits should be applied with “Upper” = 999, and “Lower” = 0 (*).
The input/output field using the tag, must have “Data type” = decimal,
“Format pattern” = 99999, “Shift decimal point” = 2.
Entry of setpoint values on the HMI, the associated S5 timer has 0.1 second resolution:
The PLC tags address must be a data-word (i.e. “DB 100 DW 20”).
The PLC tags Data type must be “KT”.
Linear tag scaling must be applied, with “PLC lower value” = 0, “PLC upper value” = 100,
“HMI device lower value” = 0, “HMI device upper value” = 1.
Tag limits should be applied with “Upper” = 999, and “Lower” = 0 (*).
The input/output field using the tag, must have “Data type” = decimal,
“Format pattern” = 99999, “Shift decimal point” = 1.
Entry of setpoint values on the HMI, the associated S5 timer has 1 second resolution:
The PLC tags address must be a data-word (i.e. “DB 100 DW 20”).
The PLC tags Data type must be “KT”.
Linear tag scaling must be applied, with “PLC lower value” = 0, “PLC upper value” = 10,
“HMI device lower value” = 0, “HMI device upper value” = 1.
Tag limits should be applied with “Upper” = 999, and “Lower” = 0 (*).
The input/output field using the tag, must have “Data type” = decimal,
“Format pattern” = 999, “Shift decimal point” = 0.
Entry of setpoint values on the HMI, the associated S5 timer has 10 second resolution:
The PLC tags address must be a data-word (i.e. “DB 100 DW 20”).
The PLC tags Data type must be “KT”.
Linear tag scaling must be applied, with “PLC lower value” = 0, “PLC upper value” = 10,
“HMI device lower value” = 0, “HMI device upper value” = 10.
Tag limits should be applied with “Upper” = 999, and “Lower” = 0 (*).
The input/output field using the tag, must have “Data type” = decimal,
“Format pattern” = 9999, “Shift decimal point” = 0.
*: Other limits may be applied to suit the application.
If no specific limits are needed, then 0..999 must be applied, otherwise values that cannot be
interpreted as S5 time can be input, resulting in unpredictive machine behavior.

5. Specific configuration issues for bits within Merker words or bytes.

Bits within byte and word addresses are specified differently in S5 and the WinCC Flexible
application.
In WinCC Flexible only complete words can be addressed. These should always start at even
numbers. Uneven numbers can be specified, but should be avoided.
In S5, a word contains two bytes.
Additionally, the byte order in the S5 and WinCC Flexible is reversed compared to each other.
Thus, the bit numbering follows these rules (example of Merker addresses):
Address in S5: MW n = MB n + MBn+1
Address in WinCC Flexible: FW n
Even bit address in S5: Mx.y
Bit address in WinCC Flexible: FWx.y+8
Un-even bit address in S5: Mx.y
Bit address in WinCC Flexible: FWx-1.y
Examples:
Bit address in S5: M4.2
Bit address in WinCC Flexible: FW4.10
Bit address in S5: M5.6
Bit address in WinCC Flexible: FW4.6
Notice in the example how the addresses are within one word in both platforms, but the bit
numbering is swapped.

6. Specific configuration issues for bit triggered alarms.

The same byte-swapping as mentioned in the previous chapter applies to the alarm-bits.
In WinCC Flexible, the actual address for each bit cannot be seen, only the alarm number and
trigger bit number.
This makes the creation of the alarms and the proper alignment with the S5 bits, a tedious and
error-prone affair.
Below is how to calculate the alarm number and trigger bit number in the WinCC Flexible
application, based on the alarm addresses in S5.
It is assumed that the alarm bits starts in the PLC in an even numbered byte “x”.
For the first 8 alarm bits:
Even byte alarm address in S5: Mx.y
Alarm number in WinCC Flexible: y+9
Trigger bit number in WinCC Flexible: y+8
For the next 8 alarm bits:
Uneven byte alarm address in S5: Mx+1.y
Alarm number in WinCC Flexible: y+1
Trigger bit number in WinCC Flexible: y
For the next 8 alarm bits:
Even byte alarm address in S5: Mx+2.y
Alarm number in WinCC Flexible: y+25
Trigger bit number in WinCC Flexible: y+24
For the next 8 alarm bits:
Uneven byte alarm address in S5: Mx+3.y
Alarm number in WinCC Flexible: y+17
Trigger bit number in WinCC Flexible: y+16
etc.
Example:
First alarm bit address in S5: M40.0
Alarm tags starts at Word address in WinCC Flexible: FW40
Alarm bit address in S5: M42.3
Alarm number in WinCC Flexible: 3+25 = 28
Trigger bit number in WinCC Flexible: 3+24 = 27
It is recommended to manage the creation of the alarms in a spreadsheet, and then use the csvimport
function to get the alarms into the WinCC Flexible application.

7. Other points.

When using a PC RT. A WinCC Flexible PC RT license with a tag count matching the configured
number of tags in the WinCC Flexible project must be installed on the PC.
To configure the AS511 driver on the x77 panels, WinCC Flexible must be at least
version 2008 SP2.
Due to the slow update speed of the 9600 baud TTY connection, be careful to not display too many
tags on one single screen. Do not configure too many continuous updating tags, i.e. alarm tags or
trend curve tags. Place the HMI tags in one continuous memory area when possible, do not place
the addresses of the tags in many fragmented addresses.
 
Zurück
Oben