SFC Charts, Sleep Timers, and Threads

Finally found a project that I get to explore SFC charts a bit more and have a question for those who may have explored a bit deeper than I have so far. Building some charts to manage a Test stations sequence for calling sequences of WebAPI calls. In some cases I need to keep polling until my data set is built or the test completed.

Is it safe to use sleep timers in the SFC chart? Or is there a better way to handle this? I don't want to overload the webserver sending too many requests, but I also know sleep timers can cause bottlenecks elsewhere in Ignition. There should only be 2 instances of this chart running maximum at any given time on the gateway.

Thanks in advance!

Hi,

Here is an excerpt from our user manual page that goes over pitfalls of using sleep timers and reasons to avoid them:
Adding a Delay to a Script - Reasons to Avoid time.sleep and While Loops

I think you might find SFC Elements - Timer helpful. As a bonus, there is a nifty Inductive University video that supplements the information in the SFC Elements page.
I would also recommend watching the other SFC videos on Inductive University to bolster your knowledge.

1 Like