# Setting the Interval for Reading External Variable Values (Scan Rate)

Using a Scan Rate, you can set the interval at which external variables read values from device addresses. By default, the interval is 100 milliseconds.

You can create up to 16 scan rates, which includes the default scan rate. You can then assign created scan rates to the [Scan Rate] property of external variables.

The range for a scan rate is from 100 milliseconds to 60 seconds, in increments of 100 milliseconds.

You can name the scan rates that you create. However, the name of the default scan rate is fixed as 'DefaultScanrate'.

Important: Scan Rate is NOT available for drivers with addresses that are managed in the memory of the display unit, like Modbus SIO Slave, Modbus TCP Slave, Memory Link SIO and Memory Link Ethernet. Even if you configure Scan Rate settings, they are NOT used by these drivers.

Note:

- The display unit reads values stored in device addresses of associated external variables at the interval set in the scan rate. For example, if the data logging collection cycle is shorter than the scan rate, the same values keep getting collected until the next scan by external variables for device address values.

- The Scan Rate setting value is not guaranteed.
  The actual interval could be longer than the scan rate setting, and if that happens the external variable will read the device address value in the actual interval.

- The Scan Rate does NOT apply to internal variables.

- The Scan Rate applies to reading device address values. Writing device address values is on demand, in response to write requests.

## Adding a Scan Rate

1. In the Project Explorer window, from [Variables] click [All Scan Rates].
2. On the toolbar, click [Scan Rate].
3. In the Property window, set the interval in the [Interval (100 ms)] property.
   You can set a range from 1 to 600 (100 milliseconds to 60 seconds).

## Assigning a Scan Rate to an External Variable

1. In the Project Explorer window, from [Variables] click [All Variables].
2. Click an external variable.
3. In the Property window, in the [Scan Rate] property select the desired scan rate.

Note:

- If you are using arrays or structures, you can specify a scan rate to each individual element.
  If you set the scan rate to the parent, the same scan rate is applied to each element. You can then change the scan rate of individual elements.

- You can view and edit the scan rate on the Hardware Configuration screen. Refer to the following.
  Configuring Scan Rates

## Turning Equipment Communication Off/On

1. In a project, set the following script to change the ScanOffControl variable value from [0] to [1], and turn the equipment communication off.
2. To turn equipment communication back on, change the ScanOffControl variable value from [1] to [0].

Note: You can also use the following methods to turn the equipment communication off/on.

- Toggle a bit switch associated with the ScanOffControl source property.

- On the Hardware Configuration screen, change the value in the [Scan Off Control] property.

## Timing of Reading Device Address Values

If multiple scan rates have the same setting, the timing for reading device address values of associated variables is synchronized.

If you change the scan rate setting on the display unit, the timing for reading associated device address values is synchronized with other variables that have a scan rate set to the same interval.

### Example 1)

A: Change setting value of Scanrate1 to 100 ms

B: Since the interval are the same, they will be automatically synchronized.

: Scan

: Sync

### Example 2)

A: Change setting value of Scanrate1 to 100 ms

B: Since the interval are the same, they will be automatically synchronized.

C: Less than 300ms

: Scan

: Sync

### Example 3)

Stopping an equipment communication scan affects scanning of all the variables associated with that equipment. The example below shows variables for Equipment 1, 2, and 3 associated with Scanrate 1 and 2.

A: Scan is stopped for Equipment 2 (set Driver1.Equipment2.ScanOffControl = 1)

Note that scans for other equipment continue with no interruption to the scan cycle.

B: Scan is started for Equipment 2 (reset Driver1.Equipment2.ScanOffControl = 0)

The start is in-between scan cycles of Scanrate 2. As a result, Equipment 2 starts a new scan cycle and does not sync with scans of the other equipment.

: Scan