Electric Drives
and Controls
4−5Bosch Rexroth AGRhoMotion1070072367 / 04
PCLrho4.0
REAL : DVAR
POINT : PNTVAR
; .
RECORD_END: WRITE_RANGE ;Declaration of record variables
REAL : X_DVAR ;Auxiliary variables
INTEGER: Y_IVAR
BEGIN ;Length for the PLC write-range
WRITE_RANGE.LENGTH=SIZEOF (WRITE_RANGE)
WRITE_RANGE.DM_NO=1 ;Data module No. 1 for PLC write-range
WRITE_RANGE.IVAR=128 ;Initialization of the components
WRITE_RANGE.RVAR=1234.23 ;of the PLC write-range
WRITE_RANGE.PNTVAR=STARTPOS ;Point from PNT file
WRITE PLC,WRITE_RANGE ;Transfer of write-range to PLC
READ_RANGE.LENGTH=SIZEOF(READ_RANGE)
;Length of PLC read-range
READ_RANGE.DM_NO=2 ;Data module No. 2 for PLC read-range
READ PLC,READ_RANGE ;Transfer of read-range from PLC
X_RVAR=READ_RANGE.RVAR ;Reading out of the variables from the
Y_IVAR=READ_RANGE.IVAR ;PLC read-range
Z_PNT=READ_RANGE.PNT
; .
PROGRAM_END