COMMUNICATION SPEED

For most ONSPEC drivers, the read commands are executed based on the scheduled command list. The write commands are executed right after the value of the corresponding ONSPEC variable is changed.

ONSPEC I/O Templates are designed to handle a large number of commands in the configuration file. However, the actual data communication throughput and process speed are related to many factors including the following:

Computer Hardware

The type of computer used: the speed of the CPU, the type and speed of the computer bus, the speed and size of RAM and hard disk, etc.

Computer Software

The operating system, the I/O template software itself, the language used to program it (C usually runs faster than the other languages), etc.

Computer Load

In a multitasking operating environment, many other tasks are running with the driver at the same time. If the computer is not powerful and fast enough to handle all the tasks in a timely fashion, every task will be slowed down.

Device

The device that the computer is talking to. If a device is slow to respond to a command from the computer, no matter how fast the computer runs, it is not going to get the message quickly.

Device Load

The load of the device. If a PLC is fully loaded with a lot of ladder logic to process, it may slow down talking to the computer.

Communication Channel

Computer data communication is usually done through the data channel of (1) serial port, (2) network, and (3) computer bus.

A 10 MHz Ethernet will handle much more data than a 9600 baud (bits per second) serial port. A plug in analog or digital board can usually communicatewith the computer by using the DMA (direct memory access) technique so that it can read/write data even faster.

From a user's point of view, the communication performance can be improved based on proper configuration.

Use of the Period Field

Since the template will slow down with a large scheduled command list, the PERIOD field should be viewed as an indication of priority rather than actual polling time. Therefore you may:

(1) try to give a larger number in the PERIOD field for the command that polls the slowly changed variables; and

(2) try to configure the PERIOD with scatted numbers (i.e., 1,2,3,5,7,9,11,... etc.) based on how fast each variable should be updated.

Use of Block Reads and Writes

Many devices and ONSPEC I/O templates support block reads and block writes to handle a large number of messages in one command. It is always a good idea to map a block of variables in the device to the corresponding data points in ONSPEC. You may waste some variable spaces this way, but you should gain some communication efficiency.

Get Rid of Bad Commands

Communication error could occur due to mistakes made in configuring the driver. For instance, the driver is configured to execute an illegal command or attempt to read some illegal device locations, etc. Bad commands can make the communication efficiency go down tremendously due to the constant retries the driver has to take. Therefore, it is important to run the driver in the monitor mode first and get rid of all the possible bad commands. In addition, once the configuration in the device is changed, you may need to also change the driver configuration.

Monitor the Network Status

If the driver is running based on the communication network, it is a good idea to run a network monitoring software to make sure that the network is in good shape all the time.