13.07.2015 Views

1766-RM001A-EN-P MicroLogix 1400 Programmable Controllers ...

1766-RM001A-EN-P MicroLogix 1400 Programmable Controllers ...

1766-RM001A-EN-P MicroLogix 1400 Programmable Controllers ...

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.

Math Instructions 199• Source and Destination can be different data sizes. Sources areevaluated at the highest precision (word or long word) of theoperands. Then the result is converted to the size of the destination.If the signed value of the Source does not fit in the Destination, theoverflow shall be handled as follows:– If the Math Overflow Selection Bit is clear, a saturated result isstored in the Destination. If the Source is positive, the Destinationis +32,767 (word) or +2,147,483,647 (long word). If the result isnegative, the Destination is -32,768 (word) or -2,147,483,648 (longword).– If the Math Overflow Selection Bit is set, the unsigned truncatedvalue of the Source is stored in the Destination.• Sources can be constants or an address, but both sources cannot beconstants.• Valid constants are -32,768…32,767 (word) and-2,147,483,648…2,147,483,647 (long word).• Long File Type Address, Constant and Float File Type Addresscannot be used together in Source A, Source B and Destination.Addressing Modes and File Types can be used as shown in the followingtable:Math Instructions (ADD, SUB, MUL, DIV, NEG, CLR) Valid Addressing Modes and File TypesFor definitions of the terms used in this table see Using the Instruction Descriptions on page 92.ParameterOISBT, C, RNData Files Function Files (1)FSTLMG, PDRI/RIXPLSRTCHSCPTOX, PWMXSTIEIIBHIMMILCDCS - CommsIOS - I/OAddressMode (3)Address LevelDLS - Data Log (2)ImmediateDirectIndirectBitWordLong WordElementSource A • • • • • • • • • • • • • • • • • • • • • • • • • •Source B • • • • • • • • • • • • • • • • • • • • • • • • • •Destination • • • • • • • • • • • • • • • • • • • •(1) PTOX and PWMX files are only for use with <strong>MicroLogix</strong> <strong>1400</strong> BXB or BXBA unit.(2) The Data Log Status file can only be used for the following math instructions: ADD, SUB, MUL, DIV, NEG, and SCP.(3) See Important note about indirect addressing.IMPORTANTYou cannot use indirect addressing with: S, MG, PD, RTC, HSC, PTOX,PWMX, STI, EII, BHI, MMI, CS, IOS, and DLS files.Publication <strong>1766</strong>-<strong>RM001A</strong>-<strong>EN</strong>-P - October 2008

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

Saved successfully!

Ooh no, something went wrong!