You can help by commenting or suggesting your edit directly into the transcript. We'll review any changes before posting them. All comments are completely anonymous. For any comments that need a reply, consider emailing email@example.com.
We are experiencing playback issues from our video hosting provider. Please check back shortly.
5:02Starting a Chart
3:58Pause, Resume, and Cancel
5:27Interacting with a Client
6:47Action Step Best Practices
Take topic challenge
Pause, Resume, and Cancel
Learn how to pause and resume running charts, as well as cancel already running chart instances.
Video recorded using: Ignition 7.9
Transcript(open in window)
[00:00] In this lesson we're going to learn about pausing, resuming and canceling charts. You can pause any chart that is in the running state. So here I've started this chart and this chart instance is running and so I can pause it. And when I hit pause here this chart pauses very quickly, but it's important to realize what happens when you actually hit pause or try to pause a chart. The chart has to wait for any currently executing tasks, in this case actions since these are action steps to finish. So if you have a very long running query or loop inside of an action step the pausing mechanism will have to wait until that action is finished before the chart can actually go into paused state. So you may see a chart that you try to pause, temporarily be in this pausing state. Once a chart is in the paused state, it can be resumed. Once resumed it will continue running as before. And a chart can be canceled at any time. Canceling a chart will make the chart stop, but it stops in a slightly different way than if the chart had reached the end step. So when a chart reaches an end step, the on stop event script will run. But when a chart is canceled the on cancel even script will run. Canceling a chart has similar characteristics to pausing a chart in that the chart will enter the canceling state, while waiting for any currently executing actions to finish. After which point it will actually be canceled. Now let's look at the different ways that pausing, canceling and resuming can be achieved. So we've already seen one of them. Here in the designer under chart control we have pause, resume and cancel buttons on our chart control which take effect on the selected instance. But that's not the only way. We can also use the SFC Monitor panel that you can use in a Vision clamp to pause, resume and cancel. So let's go ahead and start up a few of these charts. And we can go down into our SFC Monitor panel and emulate a client by hitting preview mode. And you can pause, resume and cancel these charts via the right-click context menu. So I can go ahead and pause this chart. And I can cancel that chart and I can resume and cancel. You can also pause, resume and cancel via scripting from anywhere in the system that you can run a script. In this case I've mocked up a system that uses pause, resume and cancel scripts in a Vision window. So my start button is going to start a new instance of the looper chart and assign it's instance ID to the SFC Monitor component so that we can see it. The pause button simply grabs that instance ID and calls systems.sfc.pausechart. The resume does the same thing except it calls resume chart. And not surprisingly cancel calls cancel chart. So we can see this in action, start up a new chart. We can go ahead and pause that chart, resume it and cancel it. So again you can call those scripting functions from anywhere, doesn't have to be a Vision client so you have full control over the life cycle of your sequential function charts from anywhere inside of Ignition.