Ссылка на нас!

Link To Us




 

 

 

FFXI Haven - Ваш Источник #1.


 

 

 


The press is started and stopped with start and stop buttons.

• Normal ladder logic output functions can be used except for those listed below.

not valid output functions: JMP, END, MCR, FOR, BRK, NXT, MSG, SDS, DFA, AND, OR, XOR, TND

valid output functions include: OTL, OTU, OTE, TON, TOF, RTO, CTU, CTD, RES, ADD, SUB, MUL, DIV, etc...

Figure 19.21 Acceptable Ladder Logic Functions

plc st -19.15

• The list below gives a most of the IEC1131-3 defined functions with arguments. Some of the functions can be overloaded (for example ADD could have more than two values to add), and others have optional arguments. In most cases the optional arguments are things line preset values for timers. When arguments are left out they default to values, typically 0.
plc st -19.16
Function Description
ABS(A); absolute value of A
ACOS(A); theinversecosineof A
ADD(A,B,...); add A+B+...
AND(A,B,...); logical and of inputs A,B,...
ASIN(A); theinversesineof A
ATAN(A); the inverse tangent of A
BCD_TO_INT(A); converts a BCD to an integer
CONCAT(A,B,...); will return strings A,B,... joined together
COS(A); finds the cosine of A
CTD(CD:=A,LD:=B,PV:=C); down counter active <=0, A decreases, B loads preset
CTU(CU:=A,R:=B,PV:=C); up counter active >=C, A decreases, B resets
CTUD(CU:=A,CD:=B,R:=C,LD: up/down counter combined functions of the up and
=D,PV:=E); down counters
DELETE(IN:=A,L:=B,P:=C); will delete B characters at position C in string A
DIV(A,B); A/B
EQ(A,B,C,...); will compare A=B=C=...
EXP(A); finds e**A where e is the natural number
EXPT(A,B); A**B
FIND(IN1:=A,IN2:=B); will find the start of string B in string A
F_TRIG(A); a falling edge trigger
GE(A,B,C,...); will compare A>=B, B>=C, C>=...
GT(A,B,C,...); will compare A>B, B>C, C>...
INSERT(IN1:=A,IN2:=B,P:=C); will insert string B into A at position C
INT_TO_BCD(A); converts an integer to BCD
INT_TO_REAL(A); converts A from integer to real
LE(A,B,C,...); will compare A<=B, B<=C, C<=...
LEFT(IN:=A,L:=B); will return the left B characters of string A
LEN(A); will return the length of string A
LIMIT(MN:=A,IN:=B,MX:=C); checks to see if B>=A and B<=C
LN(A); natural log of A
LOG(A); base 10 log of A
LT(A,B,C,...); will compare A<...
plc st -19.17
Function Description
MAX(A,B,...); outputs the maximum of A,B,...
MID(IN:=A,L:=B,P:=C); will return B characters starting at C of string A
MIN(A,B,...); outputs the minimum of A,B,...
MOD(A,B); the remainder or fractional part of A/B
MOVE(A); outputs the input, the same as :=
MUL(A,B,...); multiply values A*B*....
MUX(A,B,C,...); the value of A will select output B,C,...
NE(A,B); will compare A <> B
NOT(A); logical not of A
OR(A,B,...); logical or of inputs A,B,...
REAL_TO_INT(A); converts A from real to integer
REPLACE(IN1:=A,IN2:=B,L:= will replace C characters at position D in string A with
C,P:=D); string B
RIGHT(IN:=A,L:=B); will return the right A characters of string B
ROL(IN:=A,N:=B); rolls left value A of length B bits
ROR(IN:=A,N:=B); rolls right value A of length B bits
RS(A,B); RS flip flop with input A and B
RTC(IN:=A,PDT:=B); will set and/or return current system time
R_TRIG(A); a rising edge trigger
SEL(A,B,C); if a=0 output B if A=1 output C
SHL(IN:=A,N:=B); shift left value A of length B bits
SHR(IN:=A,N:=B); shift right value A of length B bits
SIN(A); finds the sine of A
SQRT(A); square root of A
SR(S1:=A,R:=B); SR flipflop with inputs A and B
SUB(A,B); A-B
TAN(A); finds the tangent of A
TOF(IN:=A,PT:=B); off delay timer
TON(IN:=A,PT:=B); on delay timer
TP(IN:=A,PT:=B); pulse timer -a rising edge fires a fixed period pulse
TRUNC(A); converts a real to an integer, no rounding
XOR(A,B,...); logical exclusive or of inputs A,B,...

plc st -19.18

Figure 19.22 Structured Text Functions

• Try the example below,

Write a structured text program to sort a set of ten integer numbers and then find the median value.

• We can define functions that return single values,

plc st -19.19

....

BACK | NEXT

Easy Access To All Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119











 

 

 

 

Automation

 

Part I

Part II

Part III

Part IV

Part V

 

Foods Overview


Hunting

 

Symbols

 

Part I

Part II

Part III

Part IV

 

 

 
Copyright @ FFXI Haven, 2004-2005.