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

Standard Library Elements

323

Bistable Function Blocks

 

 

 

The input variable STR1 and STR2 are type STRING, the return value of the function is type STRING.

FIND(STR1, STR2) means: Find the position of the first character where STR2 appears in STR1 for the first time. If STR2 is not found in STR1, then OUT:=0.

Example in IL:

LD 'SUXYSI'

FIND 'XY'

ST

VarINT1

(* Ergebnis ist '3' *)

Example in FBD:

Example in ST:

arINT1 := FIND ('SUXYSI','XY');

Note:

String functions are not "thread safe"!

13.2 Bistable Function Blocks

13.2.1SR

Making Bistable Function Blocks Dominant:

Q1 = SR (SET1, RESET) means:

Q1 = (NOT RESET AND Q1) OR SET1

The input variables SET1 and RESET as well as the output variable Q1 are type BOOL.

Declaration example:

SRInst : SR ;

Example in IL:

CAL SRInst(SET1 := VarBOOL1, RESET := VarBOOL2)

LD SRInst.Q1

ST VarBOOL3

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

324 Standard Library Elements

Bistable Function Blocks

Example in FBD:

Example in ST:

SRInst(SET1:= VarBOOL1 , RESET:=VarBOOL2 );

VarBOOL3 := SRInst.Q1 ;

13.2.2RS

Resetting Bistable Function Blocks

Q1 = RS (SET, RESET1) means:

Q1 = NOT RESET1 AND (Q1 OR SET)

The input variables SET and RESET1 as well as the output variable Q1 are type BOOL.

Declaration example:

RSInst : RS ;

Example in IL:

CAL RSInst(SET := VarBOOL1, RESET1 := VarBOOL2)

LD RSInst.Q1

ST VarBOOL3

Example in FBD:

Example in ST:

RSInst(SET:= VarBOOL1 , RESET1:=VarBOOL2 );

VarBOOL3 := RSInst.Q1 ;

13.2.3SEMA

A Software Semaphore (Interruptible)

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

Соседние файлы в папке 759-332