Local data only in instance DB
Name
Data type
Address
(Instance DB)
Default
Comment
JOB_OVAL
DINT
20.0
-
Output values for read jobs
Per channel you may call the SFB in each case with the same instance
DB, since the data necessary for the internal operational are stored here.
Write accesses to outputs of the instance DB is not permissible.
n
To read/write the registers the request interface of the SFB 49 may be used.
n
So that a new job may be executed, the previous job must have be finished with
JOB_DONE
= TRUE.
n
With an edge 0-1 at
JOB_REQ
, you can always transfer a job, regardless of the state
of
SW_EN
and
STS_EN
.
n
Changes of the
period duration
and the
minimum pulse duration
will immediately take
effect.
n
Changes of the
on-delay
take effect with the next edge 0-1 of
SW_EN
.
n
A running PWM output is not affected by setting pulse train specific values such as
pulse number
and
period duration
for the 2. pulse train job.
The request interface is used according to the following sequence:
1.
Call the SFB 49:
n
SW_EN
= FALSE
n
JOB_VAL
= Enter a value for the
period duration
here
n
JOB_ID
= 01h: Write
period duration
for PWM output.
n
JOB_REQ
= TRUE (edge 0-1)
ð
n
From
JOB_VAL
the period duration is transmitted to the PWM output.
n
JOB_DONE
is FALSE during the SFB run.
n
On error
JOB_ERR
= TRUE and the cause of the error is returned in
JOB_STAT
2.
To reset JOB_REQ, call SFB 49 again with the same parameters and JOB_REQ =
FALSE.
3.
Call the SFB 49:
n
SW_EN
= FALSE
n
JOB_VAL
= Enter a value for the
on-delay
here
n
JOB_ID
= 02h: Write
on-delay
for PWM output.
n
JOB_REQ
= TRUE (edge 0-1)
ð
n
From
JOB_VAL
the
on-delay
is transmitted to the PWM output.
n
JOB_DONE
is FALSE during the SFB run.
n
On error
JOB_ERR
= TRUE and the cause of the error is returned in
JOB_STAT
4.
To reset JOB_REQ, call SFB 49 again with the same parameters and JOB_REQ =
FALSE.
Request interface
Controlling the output
Controlling the PWM
output
VIPA System 300S
+
Deployment I/O periphery
Pulse width modulation - PWM > SFB 49 - PULSE - Pulse width modulation
HB140 | CPU-SC | 313-5BF23 | en | 19-01
141