A
A-4 CP1L Programming Examples
SYSMAC CP1L Getting Started Guide
155
Ap
pend
ix
Note
For floating point data, secure regions for 2CH.
FLT(452)
D101
D100
FLT(452)
#64
D103
/F(457)
D103
D101
D0
BSET(071)
D9000
#0
D9100
W0.15
Contact Z
W1.01
P_First_Cycle
First cycle flag
Block settings
Data to transfer/convert
Lower CH No.
Upper CH No.
Reset data interface work area between FBs when operation is started.
Convert frequency
command (D100)
from BIN to floating
point
Convert constant
100 (64 Hex) to
floating point
Convert BIN value in D100
to floating point (REAL)
in 0.01 increments
W0.00
Contact A
W0.01
Contact B
W0.02
Contact C
W1.00
Start
Divide frequency by
100 to achieve
0.01Hz increments.
Store value in FB
(MOV V)(D0).
E.g.
6000/100=60.00Hz
Stopped
P_On
W07E-EN-02+CP1L+GettingStartedGuide.book Seite 155 Montag, 15. September 2008 11:15 11