Driven Scan Class - One shot

Driven scan classes can be configured as a one shot. The One-Shot polling rate executes once when the comparison condition is true, and not again until the condition become false, then subsequently true.

The rate of the driven one-shot scan class is based on the value of a driving tag which provides the condition. The condition is a simple comparison between a tag value and a number. If the condition is true, the scan class executes at the fast rate. If false, it runs at the slow rate. There are two exceptions to this: the any change operator and one-shot mode. Using either of these, the scan class will not run at a rate. Instead, it will be triggered by a change in the driving tag's value. One-shot will execute once when the comparison condition is true, and not again until the condition become false and subsequently true.

To make a one-shot scan class

Let's make a one-shot driving scan class that only updates once when a memory tag goes to 1. We are using a memory tag so a user can change the value when they want to poll the PLC. Essentially, we can have a refresh button on the screen that allows the operator to poll the PLC once for the new values.

  1. In the Scan Class Editor, click on the green + icon to add a new scan class.

  2. Set the following:

    Scan Class Name: One Shot
    Mode: Driven
    Don't worry about the slow and fast rate since they are not used
    Driving Tag: set to a memory tag (in this example Memory Tag) and set the condition Operator: = and Value: 1.0

  3. Check the One-shot execution box.

    images/download/attachments/6034079/image2015-4-22_10_17_15.png

    4. Click OK to save.

    5. Set the value of the memory tag to 1 and you will see the values update once. Set the value to 0 and back to 1 to see them update again.