Download Programmable Controller PROGRAMMING MANUAL
Transcript
Section 7-21 BCD Calculation Instructions Address Instruction 00000 00001 00002 00003 LD OUT CLC(41) @SUB(31) Operands 00002 0 TR DM HR 00004 00005 00006 00007 00008 00009 00010 00011 AND CLC(41) @SUB(31) LD LD OR AND LD OUT # HR HR TR HR HR 201 0100 10 25504 0000 10 10 0 25504 1100 --1100 The first and second subtractions for this diagram are shown below using example data for 201 and DM 0100. Note The actual SUB(31) operation involves subtracting Su and CY from 10,000 plus Mi. For positive results the leftmost digit is truncated. For negative results the 10s complement is obtained. The procedure for establishing the correct answer is given below. First Subtraction IR 201 1029 DM 0100 – 3452 CY –0 HR 10 7577 (1029 + (10000 – 3452)) CY 1 (negative result) Second Subtraction 0000 HR 10 –7577 CY –0 HR 10 2423 (0000 + (10000 – 7577)) CY 1 (negative result) In the above case, the program would turn ON HR 1100 to indicate that the value held in HR 10 is negative. 7-21-5 BCD MULTIPLY – MUL(32) Operand Data Areas Md: Multiplicand (BCD) Ladder Symbols IR, SR, AR, DM, HR, TC, LR, # MUL(32) @MUL(32) Md Md Mr Mr R R Mr: Multiplier (BCD) Limitations 430 DM 6144 to DM 6655 cannot be used for R. IR, SR, AR, DM, HR, TC, LR, # R: First result word IR, SR, AR, DM, HR LR
Related documents
H078-E1-03D - Lakewood Automation
SYSMAC CPM1/CPM1A/CPM2A/CPM2C/SRM1(-V2)
E5EK Digital Controller User`s Manual
lcd-19xr9da_sm11.35 MB
E5AK Digital Controller USER MANUAL
E5AK Digital Controller (Programmable Type) User`s Manual
IDSC-C1DR/C1DT-AE ID Controller User's Manual
FLAMES User Manual
Eg-SMART PRO COM I+II.indd
DIVE
CXM547 User`s Manual
UNIVERSITI TEKNOLOGI MALAYSIA