Академический Документы
Профессиональный Документы
Культура Документы
Examine On TON/TOF
Timer Time Base0.01 Preset Accum T4:1 500 0
EN
Examine Off
Energize
DN
Latch
RTO Timer Time Base Preset Accum CTU/CTD Counter Preset Accum
EN
DN
RES
Reset
DN
Comparison Instructions
Relational operators exist in virtually all programming languages. Matlab if a <= b c=1.25 end C if (a <= b) c=1.25; Ladder Logic Comparison Instructions EQU LEQ NEQ GRT LES GEQ MEQ equal less than or equal not equal greater than less than greater than or equal masked compare for equal
Syntax
(Continued) LEQ Source A Source B if A <= B then _____ GRT Source A Source B if A > B then ______ Source Mask Compare
if all of the bits in the source for which the mask is high (1) equals the bits in the compare then ________
Logical Instructions
The PLC logical instructions are output functions that are performed only if the rung logic is true. AND OR XOR NOT logical AND logical OR logical XOR logical NOT
Syntax
AND Source A Source B Dest Source A, Source B, and Dest are addresses where the information is stored.
If the rung logic is true, perform the logic operation Source A * Source B, and put the result in Dest(ination). Source A: 1 Source B: 1 Dest: 1 Source A: 1 Source B: 0 Dest: 0 Source A: 0 Source B: 0 Dest: 0
Syntax
(Continued) OR Source A Source B Dest NOT Source Dest
Binary
0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
Hexidecimal
0 1 2 3 4 5 6 7 8 9 A B C D E F
Example
Hexidecimal numbers are a shorter method of representing binary numbers. They are frequently encountered when working with microprocessors. 1616-bit word 1001 1011 0011 0010 hexidecimal 9B32
Math Instructions
Math instructions are output instructions that are executed only if the rung logic is true. Simple Math Instructions ADD SUB MUL DIV More Complex Math Instructions DDV NEG CLR TOD FRD DCD
Assignment
1. Show an example of how you could use the LEQ and GEQ instructions together to turn on memory bit B3/7 if the counter C5:6, ACC value was between 5 and 12. 2. Show an example of how you would turn on memory bit B3/4 only when the timer T4:10,ACC value was 24 and input I:0.1/2 was on. 3. Show how your would move the counter C8:5, ACCUM value to location N7:25 whenever B3/18 is on. 4. Show a rung that would turn on bit B3/19 if counter C5:3s value is under 15 and timer T4:13 is below 25.