13.07.2015 Views

Concurrent I/O•Parameter - Motoman

Concurrent I/O•Parameter - Motoman

Concurrent I/O•Parameter - Motoman

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1.13 Standard Ladder ProgramFormatROR S, n, DFunctionROR 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. The lowest bit (LSB) is shifted to the carry flagand the highest bit (MSB).MSBLSB1 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.#7010M0001RORM010< Program>STR #7010ROL M000,1,M010When M000 = 1000100010001000(binary data), the result is as follow.M010: 0100010001000100Carry flag: 01-110

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

Saved successfully!

Ooh no, something went wrong!