PLC Program Examples
11--2
1070 072 196-101 (00.06) GB
;Initialization and composition of the command
vonvorn: ;Trigger command again
L W -CNT,A ;Increment counter by 1
INC W A,1
T W A,-CNT
L W 0,A ;Status on Start
T W A,-Status
initdata: ;Start command: at first, prepare parameter
L W 16#0800,A ;Basic address active DM DW0 for indirect
;addressing to A
L W A,B ;and to B
L W 19,C ;Length inC=16+3words
L W 0,D ;Value 0 to D
il_1: ;Delete entire block
T W D,[B] ;Value on address
INC W B,2 ;Increment (byte) address
DEC W C,1 ;Decrease length
JPN il_1 ;to length = 0
INC W A,2
L W -RssNr,D ;Number of RSS (R5INIT)
O W 16#0001,D ;and of channel 1
T W D,[A] ;Write into DM
INC W A,2
L W -DB_Nr,D ;Generate job number from the
;DM no. + 0x100
ADD W 16#100,D
T W D,[A]
INC W A,2
L W 16#4501,D ;Data type Word (= 01); 45 corresponds to reading ’E’
T W D,[A]
INC W A,2
L W 16#4444,D ;Command code PST and AST = ’D’
T W D,[A]
INC W A,2
L W -DBNrAST,D ;Command attribute AST
T W D,[A]
INC W A,2
L W -BlkAdrAST,D ;Block address AST (CL400 = 0xf0)
T W D,[A]
INC W A,2
L W -Offset,D ;Address AST low part
T W D,[A]
INC W A,2
L W -DBNrPST,D ;Command attribute PST
T W D,[A]