you can not stop these timers, as they are running from system timer. but reset is done indeed via the IN
be aware of cycletime when resetting as this is added to your time.
for better timers look at w www.oscat.de w
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi correct we cannot stop these timers if we turnoff input.Am facing problem with a toff timer where input is off but when the sequence enters again to same place , timer is triggering even I have stopped the input.Any solution for this issue.Am really looking for a solution.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to introduce a time delay between two consecutive steps in sfc and the diffuculty that I am having is that the timer output Q remains high after the step is scaned and the next time there is no time delay. Can anyone help .
Regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In SFC only the active steps are done and scanned, thus when a timer is in a not active step it will not be seen.
meaning when you leave a step when timer is expired (normal) the input is not reset, as you left the step.
To overcome this two ways:
use the timers from a step itself, or use a timed action from the IEC_sfc.lib
When viewing the status it will not be updated as you left the step, so the info is wrong.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Shooter.
Thanks for your quick reply. Just to clarify, when you say use the timer from the step you mean that I have to program the step itself and not the action associated with the step it is not clear to me.
Thanks
Sam
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
that depends on if you use IEC steps.
if using IEC steps the programming of all actions is outside the step, in a separate action (you may call it subroutines)
these actions can be timed, like with a L, D etc.
If you use doubleclick you can also make a 'subroutine' however you will have to watch the timers, the status is tricky, as soon as the step is left, the timers are not updated anymore, and if you get into the same step again, the timer is not initialised, but depending on the status something will happen.
make yourself a sfc with 2 transitions you can do with a mouseclick.
as soon as you go to step 2 the timers in step 1 are stopped and the times on screen are not updated anymore, so they can be anything where they were left.
also please watch not to use the timer twice as status is unknown. (declaration is in main)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
IF you are using SFC start you sequence steps with parallel branches. Then put the Timer FB in the first parallel step to be scanned all the time which creates a cyclic branch. In the second branch put your original sequence that has steps that can be any state. This way the timer is always executed no matter which step you sequence is currently being executed. In your sequence SFC branch you can set/resest the Timer IN pin to start and stop the timer. This method will cause the timer's TIME to be off one scan. If you are worried about one scan you can always set/reset the timer IN pin by the using the following MyTimer(IN:=FALSE); or MyTimer(IN:=TRUE);
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How to reset a ton or toff timer in codesys?Help would be great
They are reset when you lower the input IN from TRUE to FALSE.
you can not stop these timers, as they are running from system timer. but reset is done indeed via the IN
be aware of cycletime when resetting as this is added to your time.
for better timers look at w www.oscat.de w
Hi correct we cannot stop these timers if we turnoff input.Am facing problem with a toff timer where input is off but when the sequence enters again to same place , timer is triggering even I have stopped the input.Any solution for this issue.Am really looking for a solution.
put an ANDNOT timer.Q behind your trigger and before the INPUT. This will stop triggering when the timer is running.
You can easily reset it by ondelay(in:=false) at the entry action of the SFC,so that it will reset.
I am trying to introduce a time delay between two consecutive steps in sfc and the diffuculty that I am having is that the timer output Q remains high after the step is scaned and the next time there is no time delay. Can anyone help .
Regards
In SFC only the active steps are done and scanned, thus when a timer is in a not active step it will not be seen.
meaning when you leave a step when timer is expired (normal) the input is not reset, as you left the step.
To overcome this two ways:
use the timers from a step itself, or use a timed action from the IEC_sfc.lib
When viewing the status it will not be updated as you left the step, so the info is wrong.
Hi Shooter.
Thanks for your quick reply. Just to clarify, when you say use the timer from the step you mean that I have to program the step itself and not the action associated with the step it is not clear to me.
Thanks
Sam
that depends on if you use IEC steps.
if using IEC steps the programming of all actions is outside the step, in a separate action (you may call it subroutines)
these actions can be timed, like with a L, D etc.
If you use doubleclick you can also make a 'subroutine' however you will have to watch the timers, the status is tricky, as soon as the step is left, the timers are not updated anymore, and if you get into the same step again, the timer is not initialised, but depending on the status something will happen.
make yourself a sfc with 2 transitions you can do with a mouseclick.
as soon as you go to step 2 the timers in step 1 are stopped and the times on screen are not updated anymore, so they can be anything where they were left.
also please watch not to use the timer twice as status is unknown. (declaration is in main)
IF you are using SFC start you sequence steps with parallel branches. Then put the Timer FB in the first parallel step to be scanned all the time which creates a cyclic branch. In the second branch put your original sequence that has steps that can be any state. This way the timer is always executed no matter which step you sequence is currently being executed. In your sequence SFC branch you can set/resest the Timer IN pin to start and stop the timer. This method will cause the timer's TIME to be off one scan. If you are worried about one scan you can always set/reset the timer IN pin by the using the following MyTimer(IN:=FALSE); or MyTimer(IN:=TRUE);