Programming the PWM function. Schneider Electric Software PLC Application-Specific Functions, Micro/Junior/Pro, 4.5
Werbung
Werbung
Description of the regulation functions
Programming the PWM function
Introduction The PWM function is a standard PL7 function. As such, it is available from the functions library.
From the language editors there, it is possible to use the help of a PWM function’s input to facilitate its programming.
Note: The PWM function’s input can be done in any periodic task (MAST or FAST).
The function does not have to be conditioned.
Illustration The illustration below gives you a general idea of the Functions screen in the library supporting the implementation of the PWM function.
EF
Information Functions: Parameters
Family
Orphee Function
Stalling functions
GRAFCET
Single precision reals
Process Control
Integer tables
Call format
Lib.V App.V.
2.10
2.00
1.00
2.22
2.01 2.01
2.10
-
-
-
-
-
PID
Name
PID_MMI
PWM
SERVO
Mixed PID regulator
Comment
Management of operator dialogue dedicated to CCX17 from
Pulse width modulation of a numerical size
PID output stage for open/close valve order
Parameters of the FUNCTION:
Name Type
INP
PARA
WORD
PW_O EBOOL
AR_W
Kind Comment
IN Numerical size to modulate
OUT Discrete output cyclic report equal to the LESS than value
IN/OUT PWM parameters (5 word table)
%MW11
%Q6.3
%MW90:5
Entry field
Call display
PWM ( %MW11,%Q6.3,%MW90:5 )
Syntax The PWM function’s call syntax is:
PWM(INP,PW_0,PARA)
368
TLX DS 37 PL7 xxE
Description of the regulation functions
The table below presents the different parameters of the PWM function. Parameters of the PWM function
Parameter Type Description
INP
PW_0
PARA
%MWi
%Qxy.i ou %Mi
%MWi:5
Kind
IN = Input
OUT = Output
IN
OUT
IN / OUT
Analog value to be modulated in the pulse width (format [0 – 10000])
Logic output (TOR) whose aspect ratio is the image of the INP input
Modulation period shown in 1/100ths of seconds (between 0 and 32767). T_MOD must be more than or equal to the current task’s period and it is adjusted by the system to be a whole multiple of this.
Table of 5 words whose first word corresponds to the T_MOD parameter.
The following are used internally by the function and must never be modified by the application
Examples The example offered below is done in Ladder language.
(* PID furnace regulation *)
OPERATE
PID(‘FOUR’,’DEGRES’,%IW4.0,%MW>>
(* Alignment of the T_MOD (PWM) on the TS of the PID *)
OPERATE
%MW90:=%MW105
(* Discrete output command in period modulation *)
OPERATE
PWM(%MW11,%Q6.3,%MW90:5) with PID(‘FOUR’,’DEGRES’,%IW4.0,%MW11,%M10,%MW100:43)
TLX DS 37 PL7 xxE
369
Herunterladen
Werbung