Siemens S7 PLC address register load and transmission

Format: LAR1
Note: the load address of the operand register 1 (ARl);
Format: LAR2
Note: the load address of the operand register 2 (AR2);
Format: TAR1
Description: pass the contents of the ARl to store or AR2;
Format: TAR2
Description: pass the contents of the ARl to store or AR2;
Format: CAR
Description: swaps the contents of ARl and AR2
 
 
LARl P#I0.0                         //input I0.0 address pointer to mounted ARl
LAR2 P#0.0                         //convert the binary number 2#00000000 00000000 00000000 00000000
Mount AR2
LAR1 P#Start            //symbol name to Start the memory address pointer to mounted ARl
LARl AR2/content/AR2 into ARl
 
LARl DBD20                         //DWORD DBD 20 loading the contents of the data into the ARl
TARl AR2                         //transfer the contents of the ARl to AR2
TAR2                         //AR2 content delivery to the accumulator 1
TARl MD 20//ARl content delivery to memory double word MD 20
CAR                         //swaps the contents of ARl and AR2

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.