Поправил скрипт, поправил неточности в библиотеке

This commit is contained in:
2026-07-31 11:20:45 +03:00
parent d3da512178
commit 3d52fdec57
44 changed files with 1956 additions and 51 deletions
+32
View File
@@ -0,0 +1,32 @@
(*
===============================================================================
Project : PLC_Library
Device : -
Path : Общие
Name : Pulse_Switch
Type : FUNCTION_BLOCK
Exported : 2026-07-31 11:16:16
===============================================================================
*)
FUNCTION_BLOCK Pulse_Switch
VAR
R_tr_1: R_TRIG;
F_tr_1: F_TRIG;
tp_on: TP:=(PT:=t#500ms);
tp_off: TP:=(PT:=t#500ms);
END_VAR
VAR_INPUT
Switch_ctrl: BOOL;
END_VAR
VAR_OUTPUT
Switch_on: BOOL;
Switch_off: BOOL;
END_VAR
(*----- IMPLEMENTATION -----*)
R_tr_1(CLK:=Switch_ctrl);
tp_on(IN:=R_tr_1.Q, Q=>Switch_on);
F_tr_1(CLK:=Switch_ctrl);
tp_off(IN:=F_tr_1.Q, Q=>Switch_off);
END_FUNCTION_BLOCK