Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
19
Добавлен:
11.10.2020
Размер:
3.39 Mб
Скачать

The IEC Operators

315

Numeric Functions

 

 

 

Example in IL:

LD 0.5

TAN

ST

q

(*Result is 0.546302 *)

Example in ST:

q:=TAN(0.5);

Example in FBD:

12.10.9ASIN

Returns the arc sine (inverse function of sine) of a number. .

IN can be type BYTE, WORD, DWORD, INT, DINT, REAL, SINT, USINT, UINT, UDINT, OUT must be type REAL.

Example in IL:

LD 0.5

ASIN

ST

q

(*Result is 0.523599 *)

Example in ST:

q:=ASIN(0.5);

Example in FBD:

12.10.10ACOS

Returns the arc cosine (inverse function of cosine) of a number. The value is calculated in arch minutes.

IN can be type BYTE, WORD, DWORD, INT, DINT, REAL, SINT, USINT, UINT, UDINT, OUT must be type REAL.

Example in IL:

LD 0.5

WAGO-I/O-SYSTEM 759 WAGO-I/O-PRO 32

316 The IEC Operators

Numeric Functions

ACOS

ST

q

(*Result is 1.0472 *)

Example in ST:

q:=ACOS(0.5);

Example in FBD:

12.10.11ATAN

Returns the arc tangent (inverse function of tangent) of a number. The value is calculated in arch minutes.

IN can be type BYTE, WORD, DWORD, INT, DINT, REAL, SINT, USINT, UINT, UDINT, OUT must be type REAL.

Example in IL:

LD 0.5

ATAN

ST

q

(*Result is 0.463648 *)

Example in ST:

q:=ATAN(0.5);

Example in FBD:

12.10.12EXPT

Exponentiation of a variable with another variable:

OUT = IN1IN2.

IN1 and IN2 can be type BYTE, WORD, DWORD, INT, DINT, REAL,

SINT, USINT, UINT, UDINT, OUT must be type REAL.

Example in IL:

LD 7

EXPT 2

WAGO-I/O-SYSTEM 759 WAGO-I/O-PRO 32

The IEC Operators

317

Numeric Functions

 

 

 

ST

var1 (*Result is 49 *)

Example in ST:

var1 := EXPT(7,2);

Example in FBD:

WAGO-I/O-SYSTEM 759 WAGO-I/O-PRO 32