|
<< Click to Display Table of Contents >>
Unsolicited Messages (MNS) |
Using unsolicited messages can significantly improve an application's performance, because there is no need to perform a polling on the variables of a PLC all the time, even when they are not changing their values. Instead, by using unsolicited messages, every time a variable changes its value, the PLC itself sends a message to this Driver with this new value which, by its turn, can update its database.
An application, by its turn, must configure its PLC and Block Tags similarly to the way regular Tags are configured, via polling, only changing its N1 or B1 parameter to 9999. This value indicates to this Driver that these Tag values must be read not from a PLC, but directly from this Driver's database, updated by unsolicited messages. Application Tags, therefore, keep working by polling, except that reading is performed directly from an image memory in this Driver, which does not generate communication with a PLC. As this operation is extremely fast, it is advisable to use a very short scan period, in milliseconds, which allows an immediate update of Tags in case of changing values by unsolicited messages. Reading unsolicited messages is only enabled in this Driver for operands of type Memory, Memory Table, Auxiliary, and Octet.
•N1: 101 (Network equal to one and PLC equal to one)
•N2: 0 (zero, Memory)
•N3: 1 (one, M1 Memory)
•N4: 0 (zero, not used in this case)
•Scan: 500 (500 milliseconds)
To change this PLC Tag to read directly from this Driver's image memory, change the N1 parameter to 9999. As this reading operation is much faster than polling, users can also change the scan period to a few milliseconds. The new configuration is the following:
•N1: 9999 (Reading of Image Memory)
•N2: 0 (zero, Memory)
•N3: 1 (one, M1 Memory)
•N4: 0 (zero, not used in this case)
•Scan: 10 (10 milliseconds)