Jump to content

produce a pulse in citect scada with Arbitrary duty cicle


Recommended Posts

Posted
hi dears i want to produce a pulse with Arbitrary duty cycle, suppose i have a tag, and i want to turn it on for 5 second and turn it off for 2 second, is this possible?

Posted
Do it in the PLC - it will slow Citect down.
Posted
Not a good way to do it - investigate the disk PLC that is built in to Citect - it may be best to do it there.
Posted
From 'Citect Project Editor/system/Events', Create a 1 second event to call the cicode function fnTimeCounter() From 'Citect Project Editor/Tags/(Variable Tags or Local Variables)', Create your digital tag. Using the Cicode Editor, create a function.. INT icounter; ! This is Global Variable ? FUNCTION fnTimeCounter() icounter = icounter + 1; IF icounter <= 5 THEN dTag1 = 1; END IF icounter >5 THEN dTag1 = 0; END IF icounter = 7 THEN icounter = 0; END END Compile and Run the Project. dTag1 will now switch ON for 5 seconds and Switch OFF for 2 seconds continously.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...