IO.WorkOnline

<< Click to Display Table of Contents >>

 

IO.WorkOnline

Type of Tag

I/O Tag

Type of Access

Reading or Writing

N1 Parameter

-1 (minus one)

N2 Parameter

0 (zero)

N3 Parameter

0 (zero)

N4 Parameter

4 (four)

String Configuration

IO.WorkOnline

 

This Tag informs the current status of a Driver and allows starting or stopping the physical layer. Possible values are the following:

0 - Driver Offline: Physical layer is closed or stopped. This mode allows a dynamic configuration of a Driver's parameters using the IO.SetConfigurationParameters Tag

1 - Driver Online: Physical layer is open or executing. While in Online mode, the physical layer can be connected or disconnected and its current status can be checked on the IO.PhysicalLayerStatus Tag

 

In the next example, using E3, a Driver is configured to Offline mode, its COM port is changed, and then configured to Online mode again.

'Configure to Offline mode
Driver.Write -1, 0, 0, 4, 0
'Change port to COM2
Driver.Write -1, 0, 0, 3, Array("IO.Serial.Port", 2)
'Configure to Online mode
Driver.Write -1, 0, 0, 4, 1

 

The Write method can fail when configuring a Driver to Online mode, that is, writing the value 1 (one). In this case, the Driver remains in Offline mode. The cause of failure can be:

Type of physical layer incorrectly configured, probably an invalid value was configured in the IO.Type property

Driver may have run out of memory

Physical layer probably did not create its working thread. Search the log file for a message "Failed to create physical layer thread!"

Physical layer could not start. The cause of failure depends on the type of physical layer. It can be an invalid serial port number, a failure when starting Windows Sockets, or a failure when starting TAPI (modem), among others. This cause is recorded on the log file

 

IMPORTANT

Even if the configuration of a Driver to Online mode is successful, this does not necessarily mean the physical layer is ready to use, that is, ready to execute input and output operations with an external device. The IO.PhysicalLayerStatus Tag must be checked to ensure the physical layer is connected and ready for communication.

Was this page useful?