Unity Pro SFC Step Time

toddster900

Member
Join Date
Oct 2011
Location
England
Posts
35
Hi All

I have recently started using Unity Pro and am currently coding a process sequence. I need to be able to pause the sequence for which I am using the "FREEZECHART" instruction. This works well.

The issue arises because am using the step time .t to provide the proceeding step transition, thus timing certain conditions required within that step. However, when the sequence is paused the step time continues to count.

To get past this I have tried adding my own timer to the step enabled by my "not paused" bit with a constant active input. The problem with this is that once the required time has been achieved or the sequence is aborted, that step in no longer active and I have now way of resetting the timer I added.

So I guess my questions are:

1. Is there any way to manipulate the .t step parameter?
2. If not how can I achieve the functionality of the pause of a timer whilst keeping that step transition decision within that step?

Thanks
 
Just realized that the additional timer does not work either. I had assumed when you remove the enable input it would stop timing but this does not seem to be the case. Does this mean there is no retentive timer function in Unity?
 
Sorry for all the updates still working through it myself. Just discovered the %S6 system bit which I have used is two counters to give me a minute and second timer which is more than accurate enough for me.

I would still like to be able to do this timing in the step code rather than out with the graphcet. To do this I need a way of resetting the counter when the step moves on or the sequence is aborted. Any ideas?
 
Have you had a look at the actions that is possible in the step? I never use this functions as I normally program timers outside SFC and call the timers inside SFC.
Dbl click on the step and click help. Under the actions there seem to be functions that will do what you want
 
Hi Chud

Thanks for the response. I assume you are talking about the Time entry relating to the action. Available on L, D and DS qualifiers? If so this is not what I need. Actions using these qualifiers simply reference a literal or variable time and set or reset the step state. I want to run a timer within a step, pause that timer if the sequence is frozen and then reset the timer when the step is no longer active or when the sequence is reset.

Thanks
 
Sorry for all the updates still working through it myself. Just discovered the %S6 system bit which I have used is two counters to give me a minute and second timer which is more than accurate enough for me.

I would still like to be able to do this timing in the step code rather than out with the graphcet. To do this I need a way of resetting the counter when the step moves on or the sequence is aborted. Any ideas?

There is no retentive timer on Unity, but you can build your own with system bit %s5 or %s6. (there is some other ways also, looking system clock is one or system words like sw0, 1, 2 or sd18 and sd20) Just count upp int or dint-variable (or time) with these bits or words. Then build to your timer also resetting input for timer.

(side note, some of these system words work only with real plc, Unity simulator don't support them (at least sw0,1 and 2 works only with real PLC, they don't count/work on simulator)


If you use in/out pins for timing at your timer block, you can write new time values directly from elesewhere on code or just use reset pin. (when step is not active or sequence is aborted)
 
Possible to freeze the timer with SFC

Hi
You should use a function block called, SFCControl.
then check the help file , you will have the possibility to stop the timer whenever you pause the sfc, but I can't remember exactly which input it is.

Hope that will help.

Cheers.
 
Lare - I have already done what you suggested and created a retentive timer block from a counter but if I put this timer within a step once that step is not active the reset function is not processed. I have decided to just move all the timing functions to a separate LD task as this seems to be a cleaner way to do it.

Thanks for all the help!
 
^yeah, that is true if you try with reset.

But, if you make you timer with integer variable (inc or add block) and on dfb block connect it to in/out pin, then you can write new values to variable from elsewhere at program. On next plc scan or then when your step comes active your timer starts with this new adjusted value
 

Similar Topics

Hi Everyone: I come a cross a really wired problem with Unity Pro, I am running the Unity pro Simulator, the SFC in unity somehow had the box...
Replies
1
Views
2,247
I'm trying to document a project done in Unity Pro XL and I can't seem to figure out how to search for all the locations a subroutine is called...
Replies
0
Views
2,097
Good morning, I've got a Schneider M340 PLC that I'm commissioning with Unity Pro XL V11. There is an SFC in the software but it seems to be...
Replies
1
Views
3,076
If I want to disable SFC routines in Unity Pro and ensure all of the steps and associated actions are reset, what would be the best way of...
Replies
1
Views
3,976
Hello, I am using Unity pro V15. I have Quantum CPU 671 and Ethernet NOE 77101 configured. I have configured IO scanning on NOE. I have attached...
Replies
5
Views
174
Back
Top Bottom