Murdoch University Engineering Thesis 250 | Page WinCC SCADA System via Profibus & OPC by Hao Xu Appendix VI EASY719 & EASY204-DP Configuration Instructions Author: Hao Xu Page: p250 - p334 Last modified: 10/11/2013 This is part of the Engineering Thesis “WinCC SCADA System via Profibus & OPC” by Hao Xu.
85
Embed
Murdoch University Engineering Thesis Appendix VIresearchrepository.murdoch.edu.au/id/eprint/21651/3/Appendix_VI... · Murdoch University Engineering Thesis 250 ... Background knowledge
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Murdoch University Engineering Thesis
250 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
Appendix VI
EASY719 & EASY204-DP
Configuration Instructions
Author: Hao Xu
Page: p250 - p334
Last modified: 10/11/2013
This is part of the Engineering Thesis “WinCC SCADA System via Profibus & OPC” by Hao Xu.
Murdoch University Engineering Thesis
251 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
Preface This configuration instruction provides a comprehensive description about the functions and operations of
EASY719 and EASY204-DP. The contents are summarized as follows:
EASY719 system description
EASY719 function relay instruction
EASY719 operation instruction
EASY719 diagnostic
EASY204-DP operation description
EASY204-DP slave module description
EASY204-DP telegram structure
EASY204-DP communication diagnostic
EASY204-DP slave module data exchange sample code
EASYSOFT configuration
TIA Portal communication configuration
Prerequisite Background knowledge of PLC operations
Background knowledge of ladder logic diagram
Background knowledge of basic electric circuit
Background knowledge of Profibus communication
Completion of Appendix V “S7-300 PLC & RS485 Repeater configuration instructions”
Resources EASY719-DC-RC relay controller
EASY204-DP gateway
EASY-PC-PCB RS232 communication cable (Optional)
EASYSOFT configuration software (Optional)
S7-300 PLC with DP interface
CP5611 Profibus interface PCI card
TIA Portal configuration software
Profibus cable
Profibus DP connector
MPI adaptor (Optional)
Murdoch University Engineering Thesis
252 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
EASY719 (Refer to EASY719 section in the thesis report for an overview of the functions and some background information)
EASY719 has 12 inputs and 6 outputs. Table 45 and Table 46 show the specifications of them.
Terminals Function ON signal Off signal Input current I1 to I6 Digital inputs 15 – 28.8V
0 – 5V
3.3mA I7, I8 Analog inputs Greater than 8V 2.2mA I9, I10 Digital inputs 15 – 28.8V 3.3mA I11, I12 Analog inputs Greater than 8V 2.2mA
Table 45: Input terminals specification of EASY719 [41]
Terminals Function Maximum voltage Maximum current Q1 to Q6 Relays 24V DC/230V AC 8A
Table 46: Output terminals specification of EASY719 [41]
Power LED Continuously lit: EASY719 is in STOP mode.
Flashing: EASY719 is in RUN mode.
Not lit: No power supply present.
Operating Buttons EASY719 is equipped with 8 operating buttons on its control panel which are used for manual configuration
and circuit diagram creation. The configuration software is not necessary as all the configuration can be done
on EASY719 using those operating buttons. Below are some descriptions about those buttons:
DEL: Delete functions or objects in the circuit diagram.
ALT: Toggle status displays and special functions in circuit diagram.
ESC: Jump to the previous menu level or cancel.
OK: Next menu level or confirm.
Cursor buttons: Move cursor or select items and set parameters.
Murdoch University Engineering Thesis
253 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
Status Display The LCD screen of EASY719 displays a lot of important information such as I/O status, date and time, operating
mode, etc (Figure 204 and Figure 205). Press ALT/OK button can toggle the displays. Below are some
descriptions about the text display on the screen.
Figure 204: EASY719 status display part 1 [41]
Figure 205: EASY719 status display part 2 [41]
RS: Expansion operating correctly.
RE: Retention is switched on.
I: Debounce is switched on.
AC: AC expansion operating correctly.
DC: DC expansion operating correctly.
GW: Bus coupling module is detected.
ST: Start behaviour. [41]
Murdoch University Engineering Thesis
254 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
Operations
Access Program On EASY719, if it is currently at the display screen, press OK button twice to show the top menu, then
PROGRAM PROGRAM. The program can only be modified at STOP mode. The procedures are shown in
Figure 206.
Figure 206: Procedures to access program on EASY719 [41]
Press OK button to create or enter the function. Highlight the function name and function number to change the
function type and number respectively using cursor buttons. Press ALT key to enable the line tool to draw the
line follow the cursor.
Change Mode In the top menu, select STOP/RUN and press OK button to toggle the controller operate state. The procedure is
shown in Figure 207.
Figure 207: Procedures to change mode on EASY719 [41]
Access Function Block Parameters In the top menu, select PARAMETER then press OK button to show all the currently used function blocks.
Select the desired one then press OK button to show all the parameters. The procedures are shown in Figure
208.
Figure 208: Procedures to access function block parameters on EASY719 [41]
Murdoch University Engineering Thesis
255 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
Cycle EASY719 allows user to set a fixed cycle time between 0ms to 60ms. A cycle time of 0ms will execute the
program as fast as possible which also means that the cycle time for each scan might be different. EASY719 will
only try to achieve the setpoint cycle time and the cycle time will be adjusted by EASY719 dynamically if
EASY719 has some difficulties executing the program within the setpoint cycle time. A cycle time of 35ms is the
minimum time that EASY719 needs to execute the maximum rungs of the program. [41]
To modify the cycle time, on EASY719, hold DEL key and press ALT key to call the system menu. SYSTEM
CYCLE TIME, press OK key and enter the desired cycle time. The procedures are shown in Figure 209.
Figure 209: Procedures to change the cycle time on EASY719 [41]
Scan Sequence The way EASY719 scans the program is different to the ordinary line-by-line scan. Figure 210 illustrates this
special sequence.
Figure 210: EASY719 scan sequence [41]
EASY719 checks the first 3 segments and also determines whether the contacts are in series or parallel.
EASY719 stores the contact information in the memory and assign the new switching states to all the outputs in
one shot. The fifth hidden segment is used by EASY719 to establish contact to the world outside. [41]
Murdoch University Engineering Thesis
256 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
Password Protection A password can be set up to block unauthorised access with the range of the password from 0001dec to 9999dec.
0000dec is used to delete a password. When a password is activated, the system menu is always protected from
unauthorised access and the following functionalities can also be customized for protection:
Change operating mode.
Download program to EASY719.
Modify program.
Modify function block parameters.
Real time clock settings.
Modify system parameters.
Communicate with individual device.
Disable the password delete function. [41]
To activate the password protection from EASY719, hold DEL key then press ALT key to call the system menu.
Then SECURITY PASSWORD. The procedures are shown in Figure 211.
Figure 211: Procedures to set the password protection on EASY719 [41]
Retention EASY719 has the capability of retaining important functions to save operating states or values. It retains the
value after the loss of the supply power until the next time the value is overwritten. The limitation is that not all
the functions have retention ability and below shows all the retention compatible functions:
Markers: M9 to M16 and N9 to N16.
Up/down counters: C5 to C8 and C13 to C16.
Text function relays: D1 to D8.
Timing relays: T7, T8, and T13 to T16.
The retentive values will be wiped off under following conditions (STOP mode only):
Downloading of program to EASY719.
Selected retentive function relays, markers or text display are deactivated.
Program is deleted. [41]
To enable retention function on EASY719, hold DEL key and press ALT key to call the system menu. Select
RETENTION and press OK to enable the desired retention functions. The procedures are shown in Figure 212.
Figure 212: Procedures to set retention function on EASY719 [41]
Murdoch University Engineering Thesis
257 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
Coils Coil is the fundamental relay actuating mechanism and it switches on/off according to the input trigger. In
EASY719, there are several different types of coils.
Contactor: The signal of the output is identical to the input signal (Figure 213).
Figure 213: Signal response of the contractor coil [41]
Negated: The output signal is opposite to the input signal (Figure 214).
Figure 214: Signal response of the negated coil [41]
Falling edge: The output signal switches to on state when there is a falling edge from the input. The
output signal stays one for only 1 cycle (Figure 215).
Figure 215: Signal response of the falling edge coil [41]
Murdoch University Engineering Thesis
258 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
Rising edge: The output signal switches to on state when there is a rising edge from the input. The
output signal stays on for only 1 cycle (Figure 216).
Figure 216: Signal response of the rising edge coil [41]
Impulse relay: The output signal only changes state when there is a rising edge from the input (Figure
217).
Figure 217: Signal response of the impulse relay coil [41]
Latching relay: The latch and unlatch functions should be used in pairs. The latch is used to set the
output signal whereas the unlatch function is used to reset the output signal (Figure 218).
Figure 218: Signal response of the latching relay coil [41]
Murdoch University Engineering Thesis
259 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
Functions
I – Input Basic Unit The inputs are designed for connecting up external contacts.
R – Input Expansion Device The expansion inputs are used to connect up contacts from the expansion devices.
Q – Output Basic Unit The outputs are used to connect various loads such as contactors, motors and lights.
Coil Function
Contactor
Impulse relay
Set
Reset
Negated contactor
Falling edge
Rising edge
S – Output Expansion Device The S relays are generally used as the outputs of an expansion unit. Unlike Q outputs, the S outputs do not have
physical terminals. They could be used as marker if they are not used for expansion units. [42]
Coil Function
Contactor
Impulse relay
Set
Reset
Negated contactor
Falling edge
Rising edge
M – Marker M marker is used as a flag.
Coil Function
Contactor
Impulse relay
Set
Reset
Negated contactor
Falling edge
Rising edge
Murdoch University Engineering Thesis
260 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
N – Marker N marker is used as a flag.
Coil Function
Contactor
Impulse relay
Set
Reset
Negated contactor
Falling edge
Rising edge
P - P Buttons P buttons can be treated as additional 4 manual inputs which are associated with 4 cursor buttons on EASY719.
The P button function is not activated by default to prevent unauthorised usage. P buttons can be activated
from EASY719 manually. On EASY719, hold DEL key and press ALT key to call the system menu. Select
SYSTEM from the list and tick the P BUTTON function. The procedures are shown in Figure 219. [42]
Figure 219: Procedures to enable P buttons on EASY719 [41]
: - Jump Jump is a common function used to optimize the structure of a ladder program or to implement a selector
switch function. The rungs after Jump function will not be processed if Jump is triggered. The states of those
skipped functions will not change unless they are overwritten by the functions that were not skipped by Jump.
[41]
Murdoch University Engineering Thesis
261 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
A - Analog Value Comparator/Threshold Value Switch This function block enables user to perform a comparison between the analog input values with a setpoint,
another analog input or even a value from another function relay. The analog value comparator has an internal
value range from -2147483648 to +2147483647, but it can only display 4 digits. If the value of a counter relay
exceeds 9999, the value shown on the analog value comparator will be that value minuses 10000. For example,
if the value of a counter relay is 11493, then the display on the analog value comparator will be 1493. [41]
All the values of analog inputs (I7, I8, I11 and I12) from 0 to 10V are converted to a 10-bit digital value from 0
to 1023. A digital value of 512 represents an analog input of 5V. [41]
Setpoints
Figure 220: Setpoints configuration menu of A in EASYSOFT
I1/I2
Comparison value I1 and I2
NU – Constant: Constant value.
C – Counter relay: Actual value of C1 to C16.
I – Analog input: Positive value I7, I8, I11 and I12.
T – Timing relay: Actual value of T1 to T16. [41]
No./Value Take the value of a constant, value of the particular counter relay from C1 to C16, value of the digital value of
the analog input from I7, I8, I11 and I12 or the value of the particular timing relay from T1 to T16. [41]
F1/F2
Gain factor for I1 and I2. Value is positive value from 0 to 9999. For example, I1 = F1 × actual I1 value. [41]
OS
Offset for the value of I1. Offset value is a positive value from 0 to 9999. For example, I1 = OS + actual value at
I1. [41]
HY
Switching hysteresis for I2 value, or the tolerance of I2 value. HY applies to both positive and negative
hysteresis.
I2 = actual value at I2 ± HY
HY = positive value from 0 to 9999 [41]
Mode
LT: Less than (I1 < I2).
LE: Less than/equal to (I1 <= I2).
EQ: Equal to (I1 = I2).
GT: Greater than (I1 > I2).
GE: Greater than/equal to (I1 >= I2). [41]
Murdoch University Engineering Thesis
262 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
C - Counters The counter relay enables user to count events. EASY719 has 4 high-speed counters from C13 to C16. The
specific function is defined by the mode selected. The input of the counter should be directly connected to a
digital high-speed input from I1 to I4. Typical applications include counting of events, components and
frequency measurements. If the minimum (0dec) or maximum (32000dec) number of the counter is reached, this
value will be retained until the count direction is changed. [41]
Mode
C1 to C12 (type N): Up/down counters.
C13 and C14 (type N or H): Up/down counters or high-speed up counters with the highest frequency
of 1 kHz. The inputs of the high-speed counter are permanently connected to I1 and I2 respectively. The
high-speed counter does not rely on the system cycle time, but the value is only transferred every cycle.
C15, C16 (type N or F): Up/down counters or frequency counters with minimum frequency of 4Hz and
maximum frequency of 1 kHz. The inputs of the high-speed counter are permanently connected to I3
and I4 respectively. The high-speed counter does not rely on the system cycle time, but the value is only
Count direction, DC: Up counting when the coil is not triggered and down counting when the coil is
triggered.
Reset, RC: Reset the count number to 00000dec when triggered. [41]
Setpoints
NU – Constant: Constant value.
C – Counter relay: Actual value of C1 to C16.
I – Analog input: Positive value I7, I8, I11 and I12.
T – Timing relay: Actual value of T1 to T16. [41]
Murdoch University Engineering Thesis
263 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
D - Text Display EASY719 can display up to 16 user defined texts (Figure 221). The display of the text can be triggered by the
value of the function relays such as counters, analog value comparators and timing relays. If multiple texts are
triggered, each text will be displayed for 4 seconds. [41]
Each text display function block can only contain 2 values such as analog input values and setpoint values and
the position of the values are fixed at line 2 and line 3 (Figure 222).
Coil Function
Contactor
Impulse relay
Set
Reset
Negated
Falling edge
Rising edge
Setpoints
C – Counter relay: Display the particular counter relay value or setpoint value.
DH – Time display: Display EASY719 system time.
DD – Date display: Display EASY719 system data.
I – Analog input: The actual analog input voltage from 0 – 10V based on the “Scale Value Range” (±9.9,
±999 and 9999). For example, if analog input is 5V and the range is set to be ±9.9, then it will display 0.
O – Operating hours counter: Display the operating hours counter value.
T – Timing relay: Display the particular timing relay actual value or setpoint value.
Editable: Enable modification of setpoint values from EASY719. [41]
Text Entry
Figure 221: Text configuration window of D in EASYSOFT
Murdoch University Engineering Thesis
264 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
Scale Value Range
Figure 222: Scale value configuration window of D in EASYSOFT
±9.9
±999
9999 [41]
Murdoch University Engineering Thesis
265 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
H - 7-day time switch The 7-day time switch function block is used to switch on/off the control relays at a pre-define time during the
week. Each of the 7-day time switch contains 4 channels which allow user to set up 4 pairs of on and off time.
As the timer uses the backup battery, it will continue to run even when the power supply has failed. [41]
Channel
DY1: Define the starting day.
DY2: Define the ending day.
ON: Define the starting time on the starting day.
OFF: Define the ending time on the ending day. [41]
O - Operating Hours Counter The operating hours counter is designed to record the system operating hours. With the benefit of this function
block, the maintenance time can be easily logged and reported. The values are retained even when EASY719 is
switched off. The value range of this function block is enormous from 0 hours to way over 100 years. [41]
The resolution of operating hours counter is 1s, which means it can only loss up to 999ms while EASY719 is
switched off. The accumulated time is saved in the memory until user resets it intentionally. [41]
Coil Function
Contactor: Count coil of the operating hours counter.
Reset: Reset coil of the operating hours counter. [41]
Setpoint
S: Setpoint in hours. [41]
Murdoch University Engineering Thesis
266 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
T - Timing Relays The basic function of a timing relay is to trigger a timing event or change the switching duration. A number of
different timing functions with fully customized time ranges are available to satisfy the requirements of a
flexible control system. [41]
Coil Function
Trigger, TT: Enable, timing relay trigger.
Reset, RT: Reset coil of the timing relay.
Stop, HT: Pause the timing of the timing relay. [41]
Setpoint
I1/I2
Time setpoint 1 and 2.
NU – Constant: Constant value.
Variable:
o C – Counter relay: Actual value of C1 to C16.
o I – Analog input: Positive value of I7, I8, I11 and I12.
o T – Timing relay: Actual value of T1 to T16. [41]
With a Time Range of S – 00.00 10ms resolution, time setpoint = (value × 10) in ms. The conversion is shown
in Table 47.
Value Time setpoint in S 0 00.000 100 01.000 300 03.000 500 05.000 1023 10.230
Table 47: Time setpoint to value conversion with 10ms resolution [41]
With a Time Range of M:S – 00:00 1s resolution, time setpoint = value divided by 60, integer result = number
of minutes, remainder is the number of seconds. The conversion is shown in Table 48.
Value Time setpoint in M:S 0 00:00 100 01:40 300 05:00 500 08:20 1023 17:03
Table 48: Time setpoint to value conversion with 1s resolution [41]
With a Time Range of H:M – 00:01 1min.resolution, time setpoint = value divided by 60, integer result =
number of hours, remainder is the number of minutes. The conversion is shown in Table 49.
Value Time setpoint in H:M 0 00:00 100 01:40 300 05:00 500 08:20 1023 17:03
Table 49: Time setpoint to value conversion with 1min resolution [41]
Murdoch University Engineering Thesis
267 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
No.
Take the value of the particular counter relay from C1 to C16, value of the digital value of the analog input from
I7, I8, I11 and I12 or the value of the particular timing relay from T1 to T16. [41]
Constant
Constant is used to define the timing range between 10ms and 99 hours and 59 minutes. The minimum and
maximum timing value depends on the Time Range. [41]
Mode
On-delayed: The contact of timing relay switches on after a setpoint time.
On-delayed with random time: The contact of timing relay switches on randomly within the setpoint
time range.
Off-delayed: After the timing relay switches from on to off, the contact of the timing relay remains on
for a setpoint time then switches off.
Off-delayed with random time: After the timing relay switches from on to off, the contact of the timing
relay remains on for a random time within the setpoint time range then switches off.
On/off-delayed: After the timing relay switches from off to on. The contact of the timing relay remains
off for a setpoint time then switches on. After the timing relay switches from on to off, the contact of the
timing relay remains on for a setpoint time then switches off.
On/off-delayed with random time: After the timing relay switches from off to on, the contact of the
timing relay remains off for a random time within the setpoint time range then switches on. After the
timing relay switches from on to off, the contact of the timing relay remains on for a random time
within the setpoint time range then switches off.
Single pulse: A rising edge will latch the contact for a setpoint time.
Flashing: The timing relay will toggle states based on the time setpoint I1 and I2. [41]
Time Range
S – 00.00 10ms resolution: Cover a time range between 10ms and 99s and 990ms.
M:S – 00:00 1s resolution: Cover a time range between 1s and 99min and 59s.
H:M – 00:01 1min.resolution: Cover a time range between 99s and 59min. [41]
Murdoch University Engineering Thesis
268 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
Y - Year Time Switch The year time switch is typically used to implement special on/off switching during public holidays, company
holidays and special events. Each year time switch has 4 channels to set 4 pairs of on/off dates. The year time
switch continues to run using the backup battery to protect from power failure. The range of the date is from
01/01/2000 to 31/12/2099. [41]
Channel
ON: Define the starting day of the year.
OFF: Define the ending day of the year. [41]
Z - Master Reset The master reset function relay has the ability to set all the markers and outputs with a state of “0”. [41]
Mode
Z1: Reset outputs Q1 to Q6 and S1 to S8.
Z2: Reset marker M1 to M16 and N1 to N16.
Z3: Reset Q1 to Q6, S1 to S8, M1 to M16 and N1 to N16. [41]
Murdoch University Engineering Thesis
269 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
EASYSOFT Configuration (Refer to Configuration Software section in the thesis report for an overview of EASYSOFT)
Project Settings In EASYSOFT, select the correct model from Basic Units list and drag it to the blank window on the right
(Figure 223). The available model is EASY719-DC-RC.
Figure 223: Project view in EASYSOFT
Under System Settings tab, Cycle Time can be set up and P buttons and Retention can be activated (Figure
224).
Figure 224: System setting panel in EASYSOFT
Murdoch University Engineering Thesis
270 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
Double click on the device in the window to enter the circuit diagram interface. User can develop the ladder
diagram here with instructions and functions from the list on the left (Figure 225).
Figure 225: Programming interface in EASYSOFT
Murdoch University Engineering Thesis
271 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
Communication Once the program has been completed, click Communication button under the instruction list, under the
Connection tab, set the correct Interface and click Online to establish the communication with PC (Figure
226).
Figure 226: Connection setting panel in EASYSOFT
Under Program/Configuration tab, there are a few options (Figure 227).
Figure 227: Program transfer panel in EASYSOFT
PC => Device: Download the program to EASY719.
Device => PC: Upload the program from EASY719 to EASYSOFT.
PC = Device?: Check if the program in EASYSOFT is identical to the program in EASY719.
Delete: Delete the program and configuration in the device.
Device => Card: Download the program to the memory card.
NET Config.: Set the Ethernet configuration.
LINK Config.: Set the fieldbus address.
RUN: Switch EASY719 to RUN mode.
STOP: Switch EASY719 to STOP mode.
Murdoch University Engineering Thesis
272 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
Simulation Click Simulation button under the instruction list, in the I/R function tab, user can select switch types for I
and R inputs (Figure 228).
Figure 228: Contact input type assignment panel for simulation in EASYSOFT
Click Start Simulation button from the toolbar to start the simulation. During simulation, switches under I
inputs and R inputs tabs can be controlled and the analog inputs can be adjusted via sliders under the Analog
inputs tab (Figure 229).
Figure 229: Input control panel for simulation in EASYSOFT
Murdoch University Engineering Thesis
273 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
Under Simulation cycle tab, user can define the simulation cycle time. The Execute button allows user to
execute a single cycle each time (Figure 230).
Figure 230: Simulation cycle time setting in EASYSOFT
The Display tab is used to monitor the variables of each function (Figure 231).
Figure 231: Display panel in EASYSOFT
Murdoch University Engineering Thesis
274 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
Oscilloscope To use the Oscilloscope function, click the Oscilloscope button from the toolbar. Set the functions with
channels that need to be monitored. After simulation starts, click Oscilloscope Recording On button from the
toolbar to display the function values. The oscilloscope process screen is shown in Figure 232.
Figure 232: Oscilloscope monitor panel in EASYSOFT
Set Profibus Address After the communication between PC and EASY719 has been established, in the communication window, under Program/Configuration tab, click LINK Config. In the window opened, write the desired Profibus address then click Write Parameters button as shown in Figure 233.
Figure 233: Set Profibus address of EASY204-DP in EASYSOFT
Murdoch University Engineering Thesis
275 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
EASY204-DP Gateway (Refer to EASY204-DP Gateway section in the thesis report for an overview of the functions and some background
information)
EASY204-DP needs to be connected with EASY719 via the EASY-LINK connector and powered by 24V DC.
POW LED Continuously lit: EASY204-DP is powered.
Flashing: The communication between EASY719 and EASY204-DP is established.
Not lit: No power supply present. [42]
BUS LED Continuously lit: Profibus-DP communication present.
Not lit: No Profibus-DP communication present. [42]
Set Profibus Address On EASY719, hold DEL key and press ALT key to call the system menu, then use cursor buttons to select CONFIGURATOR then press OK button. Use cursor buttons to set up the DP address then press OK button. The procedures are shown in Figure 234.
Figure 234: Procedures to set Profibus address on EASY719 [42]
Murdoch University Engineering Thesis
276 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
Gateway Profibus Communication First of all, connect PLC and EASY204-DP with Profibus connectors and also make sure the Profibus signal is
properly terminated on each end of the network.
Make sure GSD file Moe4d10.gsd is installed in TIA Portal, then locate the gateway station in Hardware
Catalog as shown in Figure 235.
Figure 235: EASY204-DP station in Hardware Catalog in TIA Portal
If the master Profibus network has been established earlier, drag the gateway station into the Network view
and join gateway into the Profibus subnet (Figure 236). Assign a Profibus address to gateway based on the
device setting. (Refer to Set Profibus Address section for Profibus address setting for EASY204-DP)
Figure 236: Assign EASY204-DP to the master PLC in TIA Portal
Place the slave modules onto the module rack from Catalog as shown in Figure 237. At least one of the slave
module needs to be placed on the rack. (Refer to Input/output Level section for the slave module compatibility
rules)
Figure 237: EASY 700/800 control commands slave module in module rack in TIA Portal
Murdoch University Engineering Thesis
277 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
Perform a download to the PLC and as soon as EASY719 is recognized in the Profibus network, EASY204-DP automatically detects the supported baud rate from 9.6kBaud to 12MBaud. The BUS LED will become solid and GW message will display statically. The cycle time of EASY719 can increase by 40ms due to the EASY-LINK communication. The online Network view in TIA Portal should be as Figure 238.
Figure 238: Online network view of EASY204-DP in TIA Portal
Murdoch University Engineering Thesis
278 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
Gateway Slave Modules (Refer to Slave Modules section in the thesis report for some background and the slave module structure)
Input/Output Level The Input 1 Byte and Input 3 Byte slave modules cannot be put on the module rack at the same time as well as
Output 1 Byte and Output 3 Byte slave modules. (Refer to Sample Code section for some data exchange
examples)
Input 1 Byte Slave Module Table 50 shows the assignments of the Input 1 Byte slave module.
Byte Description Assignments
0 Scan status of EASY719 outputs S1 to S8.
Bit 0: S1 Bit 1: S2 Bit 2: S3 Bit 3: S4 Bit 4: S5 Bit 5: S6 Bit 6: S7 Bit 7: S8
Table 50: Input 1 byte module data structure [42]
Output 1 Byte Slave Module Table 51 shows the assignments of the Output 1 Byte slave module.
Byte Description Assignments
0 Set/reset EASY719 inputs R1 to R8.
Bit 0: R1 Bit 1: R2 Bit 2: R3 Bit 3: R4 Bit 4: R5 Bit 5: R6 Bit 6: R7 Bit 7: R8
Table 51: Output 1 byte module data structure [42]
Input 3 Byte Slave Module Table 52 shows the assignments of the Input 3 Byte slave module.
Byte Description Assignments
0 Scan EASY719 operating mode. Bit 0: Run/Stop Bit 4: With debounce Bit 5: Without debounce
1 Scan status of EASY719 output S1 to S8.
Bit 0: S1 Bit 1: S2 Bit 2: S3 Bit 3: S4 Bit 4: S5 Bit 5: S6 Bit 6: S7 Bit 7: S8
Table 58: EASY 700/800 control commands module function parameter data structure [42]
Murdoch University Engineering Thesis
283 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
A – Analog Comparator/Threshold Value Switch Function Block
Index Operand 00 Parameters (See Table 60) 01 Control byte (See Table 61) 02 I1 03 I2 04 F1 05 F2 06 OS 07 HY
Table 59: Analog comparator/threshold value switch function block index data structure [42]
Parameters bit Assignments
0 0: Not appear in the parameters menu 1: Appear in the parameters menu
1 – 3
000: FB not used 001: EQ (=) 010: GE (>=) 011: LE (<=) 100: GT (>) 101: LT(<)
4 0: I1 ≠ Constant 1: I1 = Constant
5 0: F1 ≠ Constant 1: F1 = Constant
6 0: I2 ≠ Constant 1: I2 = Constant
7 0: F2 ≠ Constant 1: F2 = Constant
8 0: OS ≠ Constant 1: OS = Constant
9 0: HY ≠ Constant 1: HY = Constant
10 – 15 Not used Table 60: Analog comparator/threshold value switch function block parameters data structure [42]
Control byte bit Assignments
0 0: Comparison condition is not fulfilled 1: Comparison condition is fulfilled
1 – 7 Not used Table 61: Analog comparator/threshold value switch function block control byte data structure [42]
Murdoch University Engineering Thesis
284 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
C – Counter Function Block
Index Operand 00 Parameters (See Table 63) 01 Control byte (See Table 64) 02 Actual value 03 Counter setpoint
Table 62: Counter function block index data structure [42]
Parameters bit Assignments
0 0: Not appear in the parameters menu 1: Appear in the parameters menu
1 – 2
00: FB not used 01: Up/down counter 10: High-speed up/down counter 11: Frequency counter
3 0: Counter setpoint is not used 1: Counter setpoint is used
4 – 7 Not used Table 63: Counter function block parameters data structure [42]
Control byte bit Assignments
0 0: On 1: Off
1 0: Up counting 1: Down counting
2 0: No reset 1: Reset coil
3 0: None 1: Count on rising edge
Table 64: Counter function block control byte data structure [42]
Murdoch University Engineering Thesis
285 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
T – Timing Relay Function Block
Index Operand 00 Parameters (See Table 66) 01 Control byte (See Table 67) 02 Actual value 03 Time setpoint 1 04 Time setpoint 2
Table 65: Timing relay function block index data structure [42]
Parameters bit Assignments
0 0: Not appear in the parameters menu 1: Appear in the parameters menu
1 – 3
000: On-delay 001: Off-delay 010: On-delay with random setpoint 011: Off-delay with random setpoint 100: On and off delay 101: On and off delay with random setpoint 110: Single pulse 111: Flashing
4 – 5
00: FB not used 01: Millisecond: MS 10: Second: S 11: Minute: M:S
6 0: Time setpoint 1 is not constant 1: Time setpoint 1 is constant
7 0: Time setpoint 2 is not constant 1: Time setpoint 2 is constant
Table 66: Timing relay function block parameters data structure [42]
Control byte bit Assignments 0 0: On
1: Off 1 0: None
1: Trigger coil 2 0: None
1: Reset coil 3 0: None
1: Stop coil 4 - 7 Not used
Table 67: Timing relay function block control byte data structure [42]
Murdoch University Engineering Thesis
286 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
O – Operating Hours Counter Function Block
Index Operand 00 Parameters (See Table 69) 01 Control byte (See Table 70) 02 Actual value 03 Counter setpoint
Table 68: Operating hours counter function block index data structure [42]
Parameters bit Assignments
0 0: Not appear in the parameters menu 1: Appear in the parameters menu
1 0: Setpoint is not a constant 1: Setpoint is a constant
2 – 7 Not used Table 69: Operating hours counter function block parameters data structure [42]
Control byte bit Assignments
0 0: On 1: Off
1 0: None 1: Trigger coil
2 0: None 1: Reset coil
3 – 7 Not used Table 70: Operating hours counter function block control byte data structure [42]
Murdoch University Engineering Thesis
287 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
Y – Year Time Switch Function Block
Index Operand 00 Parameters (See Table 72) 01 Control byte (See Table 73) 11 Channel A time point ON 12 Channel A time point OFF 21 Channel B time point ON 22 Channel B time point OFF 31 Channel C time point ON 32 Channel C time point OFF 41 Channel D time point ON 42 Channel D time point OFF
Table 71: Year time switch function block index data structure [42]
Parameters bit Assignments
0 0: Channel A does not appear in the parameters menu 1: Channel A appears in the parameters menu
1 0: Channel B does not appear in the parameters menu 1: Channel B appears in the parameters menu
2 0: Channel C does not appear in the parameters menu 1: Channel C appears in the parameters menu
3 0: Channel D does not appear in the parameters menu 1: Channel D appears in the parameters menu
4 – 7 Not used Table 72: Year time switch function block parameters data structure [42]
Control byte bit Assignments
0 0: On 1: Off
1 – 7 Not used Table 73: Year time switch function block control byte data structure [42]
Murdoch University Engineering Thesis
288 | P a g e WinCC SCADA System via Profibus & OPC by Hao Xu
H – 7-day Time Switch Function Block
Index Operand 00 Parameters (See Table 75) 01 Control byte (See Table 76) 11 Channel A Day on/off 12 Channel A On time 13 Channel A Off time 21 Channel B Day on/off 22 Channel B On time 23 Channel B Off time 31 Channel C Day on/off 32 Channel C On time 33 Channel C Off time 41 Channel D Day on/off 42 Channel D On time 43 Channel D Off time
Table 74: 7-day time switch function block index data structure [42]
Parameters bit Assignments
0 0: Channel A does not appear in the parameters menu 1: Channel A appears in the parameters menu
1 0: Channel B does not appear in the parameters menu 1: Channel B appears in the parameters menu
2 0: Channel C does not appear in the parameters menu 1: Channel C appears in the parameters menu
3 0: Channel D does not appear in the parameters menu 1: Channel D appears in the parameters menu
4 – 7 Not used Table 75: 7-day time switch function block parameter data structure [42]
Control byte bit Assignments
0 0: On 1: Off
1 – 7 Not used Table 76: 7-day time switch function block control byte data structure [42]
(Refer to Sample Code section for some data exchange examples)
Error Code
In case of command reject, byte 5, data 1 will contain the error code for troubleshooting purpose. Table 77
shows the description of the error code.
Error code Description 01 Unknown telegram transmitted. 02 Unknown object transmitted. 03 Unknown command transmitted. 04 Invalid instance transmitted. 05 Invalid parameter set transmitted. 06 An attempt was made to write to a variable that is not a constant. 0C The device is in an invalid device mode. STOP RUN or RUN STOP.
0D Invalid display access. Exit the menu level so that the status display is showing in the display. The clock cannot be written to.
F0 Attempt made to control an unknown parameter. F1 Impermissible value.