CONTROL_LEDS function. Schneider Electric Software PLC Application-Specific Functions, Micro/Junior/Pro, 4.5
Reklaam
Reklaam
Built-in DOP functions
CONTROL_LEDS function
Role This function is used to control some CCX 17 console functions.
These functions are: l l relay state (version 2.1 and above), state of the small luminous column LEDs.
The CONTROL_LEDS function is available whether or not the CCX 17 has an application.
Implementation Implementation of the CONTROL_LEDS function is developed in the Description of parameters (See Description of the parameters common to the different DOP
Specific parameter: LED status
This parameter defines the current status of each LED.
l l l l the various states can be:
Unchanged,
Off,
Flashing,
On.
Specific parameter: Relay status l l l
This parameter defines the relay status.
the various states can be:
Unchanged,
Open,
Closed.
312
TLX DS 37 PL7 xxE
Built-in DOP functions
Application example
The example given below makes use of the CONTROL_LEDS function to control the
T CCX 1720 W console’s green LED status.
This is connected to a TSX Premium via the AUX port (configured in UNI-TELWAY link, addresses 4 - 5).
Application description
Initial conditions l l l writing the console address (ADR#0.04) in a word table, adjustment of timeout to 50 s, condition of execution,
Application: The aim of this example is, on rising edge of the variables: l l
Manu
Auto
: controlling the green LED in
: controlling the green LED in
Flashing
On mode
mode,
Variables used
%MW0:6: terminal address
%KW200:x:Manu status data to send
%KW210:x: Auto status data to send
%MW100:4: report
%MW100:X0: activity bit
%MW102: timeout
%M0:Manu variable
%M2: Auto variable
Introduction to the console
Green LED
Program corresponding to the application
( *INIT console address, condition, timeout
*)
IF %S1.3 THEN
%MW0:6:=ADR#0.0.4;
%MW102:=500;
%M100:2:=0;
END_IF;
(*State of green LED*)
IF RE %M0 AND NOT %MW100:X0 THEN
CONTROL_LEDS(%MW0:6,%KW200:2,%MW100:4);
END_IF;
IF RE %M2 AND NOT %MW100:X0 THEN
CONTROL_LEDS(%MW0:6,%KW210:2,%MW100:4);
END_IF;
%M0:=%M0;
%M2:=%M2;
TLX DS 37 PL7 xxE
313
Built-in DOP functions
Entry help screens corresponding to the application:
CONTROL_LEDS
Parameters
Console address:
Data to Send:
%MW0
%KW200
LED status
6
2
Report: %MW100 4
Unchanged Off Flashing On
Unchanged Off
Unchanged
Relay status
Unchanged
Off
OK
Flashing On
Open
Flashing
Cancel
On
CONTROL_LEDS
Parameters
Closed
%MW0
Data to Send: %KW210
LED status
Unchanged Off
6
2
Unchanged Off
Report:
Flashing
Flashing
Flashing Unchanged
Relay status
Unchanged
Off
OK
Open
Cancel
%MW100 4
On
On
On
Closed
314
TLX DS 37 PL7 xxE
Laadi alla
Reklaam