4 how to use scan counter – Yaskawa MP2300S Basic Module User Manual

Page 295

Advertising
background image

7.3 Operation

7.3.4 How to Use Scan Counter

7-17

Slave CPU Synchronous Function

7.3.4 How to Use Scan Counter

A scan counter enables the reception device to check that data is updated by the transmission device.
It also allows the master and slave to confirm each other’s proper working order.
Use of the scan counter is optional, and there is no problem if you choose not to use it.
An example follows. In this example, H scan cycles of both master and slave sides are assumed to have the same set-
ting.

( 1 ) Checking the Master Status Using a Slave Side Application

„

Master processing

A master side application is increased the setting value by one for the start word of an output register assigned to the
MP2300S/SVB.

„

Slave processing

A slave side application checks that the scan counter value is increased by one from the previous value +1. As the scan
counter is one byte of data, it only checks the lower byte.
If not updated normally, it determines that a problem has occurred with the master.

( 2 ) Checking a Slave Status Using a Master Side Application

„

Master processing

A master side application checks that a scan counter value is increased by one from the previous value. As the scan
counter is one byte of data, it only checks the lower byte.
If not updated normally, it determines that a problem has occurred with the slave.

„

Slave processing

A slave side application is increased the setting value by one for the start word of an output register mapped to SVB.

Note: In this example, H scan cycles of both master and slave sides have the same setting.

When they have a different scan cycle setting, they must be updated and checked accordingly.

OW

IW

࡮࡮࡮࡮࡮࡮࡮࡮

OW

+1

IW

+1

࡮࡮࡮࡮

࡮࡮࡮࡮࡮࡮࡮࡮

࡮࡮

࡮࡮

Master

Slave

Updates each scan

with the application

Output register

Input register

Scan

counter

Scan

counter

Checks that the counter is updated.

If not updated properly, determines that

the master side operation is abnormal.

IW

OW

࡮࡮࡮࡮࡮࡮࡮࡮

IW

+1

OW

+1

࡮࡮࡮࡮

࡮࡮࡮࡮࡮࡮࡮࡮

࡮࡮

࡮࡮

Master

Slave

Input register

Output register

Scan

counter

Scan

counter

Checks that the counter is updated.

If not updated properly, determines that

the slave side operation is abnormal.

Updates each scan

with the application

Advertising