so you are looking for this particular block
i found in the eaton moeller standard lib.
another place for this is w www.oscat.de w with lots of functions also this type (it is english. download the codesys lib the pdf file and the txt file to study.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
use OSCAT library..using the CLK_PRG FB you can generate a pulse (one shot) clock based on a defined time base, then you can create your square wave "manually"..
this is a sample with T#500ms time base
VAR
PulseGen500ms:CLK_PRG;
END_VAR
( Pulse one shot 500ms )
PulseGen500ms(PT:=t#500ms , Q=>_500ms );
( Clock 500ms )
IF _500ms THEN
Clock500ms:=NOT Clock500ms;
END_IF;
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear all, IΒ΄m programming an 750-880 WAGO, and I need a function block to generate time periods, can you send me the library for the FB.?
I'm not sure if i'm getting it right, but is'nt this what you looking for?
/Niclas
Well I would like to download the function block.
/Niclas
so you are looking for this particular block
i found in the eaton moeller standard lib.
another place for this is w www.oscat.de w with lots of functions also this type (it is english. download the codesys lib the pdf file and the txt file to study.
use OSCAT library..using the CLK_PRG FB you can generate a pulse (one shot) clock based on a defined time base, then you can create your square wave "manually"..
this is a sample with T#500ms time base
VAR
PulseGen500ms:CLK_PRG;
END_VAR
( Pulse one shot 500ms )
PulseGen500ms(PT:=t#500ms , Q=>_500ms );
( Clock 500ms )
IF _500ms THEN
Clock500ms:=NOT Clock500ms;
END_IF;