13.07.2015 Views

Concurrent I/O•Parameter - Motoman

Concurrent I/O•Parameter - Motoman

Concurrent I/O•Parameter - Motoman

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1.13 Standard Ladder ProgramFormatROL S, n, DFunctionROL InstructionS: Source Register (M000-M161)Decimal (0-65535)Relay (byte) #XXX0Relay (word) W#XXX0n: Shift count Decimal (0-16)D: Destination Register (M000-M099, M150-M161)Relay (byte) #XXX0Relay (word) W#XXX016 bits data contents of S is shifted to the high bit direction (left) n times and the result is outputto D when the input signal is at ON state. The highest bit (MSB) is shifted to the carry flagand the lowest bit (LSB).Carry FlagMSBLSB1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0Shift n timesLadder Program ExampleNOTEThe output cannot be done to the same relay two or more times.The multiple outputs of the register used as a current position of the TMR instruction andthe CNT instruction cannot be used.The operation is performed each scanning when the input signal is at ON state. Use thepulse output instruction (PLS, PLF) in the input circuit for one time operation.#7010M0001ROLM010< Program>STR #7010ROL M000,1,M010When M000 = 1000100010001000(binary data), the result is as follow.M010: 0001000100010001Carry flag: 11-109

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!