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 ProgramFormatSUB InstructionSUB S1, S2, DFunctionS1: Source 1 Register (M000-M161)Decimal (0-65535)S1: Source 2 Register (M000-M161)Decimal (0-65535)D: Destination Register (M000-M099, M150-M161)S1 and S2 (16 bits unsigned binary data) are subtracted and the subtraction result is output toD when input signal is at ON state. As a result of calculation, the carry flag (#5260) and thezero flag (#5261) of a specific output are changed. The error flag (#5262) is not used.Unused flag is cleared.Ladder Program ExampleS1-S2 D Carry Flag Zero Flag Error Flag0 0 0 1 Not Used(0)1-65535 1-65535 0 0 Not Used(0)Negative Number S1-S2+65536 1 0 Not Used(0)NOTEThe multiple outputs of register used as a current position of the TMR instruction and theCNT instruction cannot be used.#7010M000M001SUBM010< Program>STR #7010SUB M000,M001,M0101-96

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

Saved successfully!

Ooh no, something went wrong!