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 ProgramFormatSHR S, n, DFunctionSHR 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 low bit direction (right) n times and the result is outputto D when the input signal is at ON state. 0 is shifted to the highest bit (MSB) and the lowestbit (LSB) is shifted to the carry flag.MSBLSB0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0Carry FlagShift 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.#7010M0001SHRM010< Program>STR #7010SHR M000,1,M010When M000 = 1000100010001000(binary data), the result is as follow.M010: 0100010001000100Carry flag: 01-108

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

Saved successfully!

Ooh no, something went wrong!