ScanCom Driver Tag

The ScanCom protocol is a derivation of the ADEPT protocol. It is used primarily to communicate with Barton Scanner devices.

The protocol is designed with 7-layers, for serial communication.

  • ScanCom-7 Application
    (VTScada in this case. Holds commands and responses)
  • ScanCom-6 Presentation
    (ADEPT 4.0 only, contains measuring units – Imperial / Metric)
  • ScanCom-5 Session
    (Similar to ScanCom-7 Application but applies to login / logout. A message can contain ScanCom-7 plus 6, or ScanCom-5 but not both)
  • ScanCom-4 Transport
    (Used to break up large messages into multiple packets)
  • ScanCom-3 Network
    (Not implemented)
  • ScanCom-2 Data Link Control
    (Packet sequencing, CRC. Derived from another protocol called HDLC)
  • ScanCom-1 Physical
    (Serial Port)

 

In VTScada, layers 5-7 are treated as a single-layer and layers 1 and 3 are ignored. The maximum packet size across layers 2 through 7 is 256 bytes.

Layers 3-7 use little-endian byte ordering but layer 2 uses big-endian byte ordering.

Server List

Select (or create) a named server list. (Driver Server Lists) Servers for the list must be defined using the Application Configuration dialog, as described in Servers for Specific Services. Smaller sites that do not have multiple servers, or that use only the default server list, need not configure this field.

ScanCom Driver properties - Communications tab

Port

The ScanCom driver uses a serial protocol. If a serial port is not available on your server, use a Serial-to-Ethernet device with a TCP/IP port.

Timeout

The length of time (in seconds) that the driver should wait for a reply from the device. Defaults to 10 seconds.

Retry Delay

The Retry Delay field enables you to specify the amount of time (in seconds or fractions of a second) that the driver will wait between attempts to repeat a transmission of data if the previous attempt(s) have failed.

By default, the Retry Delay field is set to 0 (indicating that there should be no delay between retry attempts).

RTS Key Off Delay

The RTS Key Off Delay field represents the amount of time (in seconds) that this ScanCom driver will wait before dropping RTS at the end of a data transmission.

ADEPTv3 Logout Delay

Applies only when the ADEPT version is set to v3.4. Sets the delay (in seconds) the session will remain idle before automatically sending a logout message and ending the session.

(ADEPT v4.0 will always log you out automatically after a session ends and does not use this parameter.)

RR Reply Delay (ms)

The delay to wait after receiving a Receiver Ready acknowledgment before sending a Receiver Ready reply to the Scannner.

RNR Reply Delay (s)

The delay to wait after receiving a Receiver Not Ready acknowledgment before sending a Receiver Ready reply to the Scanner.

Max RR Replies (Waiting for ACK) and

Max RR Replies (Waiting for Response)

After sending a request to a device, several Receiver Ready messages may be exchanged while awaiting acknowledgment that the request was received (Waiting for ACK). Defaults to 1.

Similarly, several more may be exchanged while waiting for the reply (Waiting for Response). Defaults to 3.

These limits prevent an infinite number of such messages being exchanged. If the limits are exceeded error code 0x100C will be generated. If this error is generated frequently the Max RR Replies parameters should likely be increased.

Hold

Select this to have I/O tags attached to the driver hold their last value in the event of a communication failure. If not selected, tags will have their value set to invalid on a communication failure.

Retries

The number of times to retry a message before declaring an error.

Use only if the driver is connected to a device that uses a serial port or a UDP/IP port that is configured to be polled. When connected directly to a device using TCP/IP, this value should normally be set to 0 since TCP/IP is a guaranteed message delivery protocol.
For unreliable communications, such as radio, set to 3 or 4.

ADEPT Version

Specify 3.4 or 4.0 according to your device.

ScanCom Driver properties - Addresses tab

VTScada Application Address

The ADEPT-7 application address for VTScada. Defaults to 4352.

Scanner Application Address

The ADEPT-7 application address for the scanner. Defaults to 1100.

VTScada Device ID

The address at the ADEPT-4 Transport Layer for VTScada. Defaults to 1.

Scanner Device ID

The address at the ADEPT-4 Transport Layer for the scanner. Defaults to 1100.

VTScada Physical Address

The address at the ADEPT-4 Data Link Layer for VTScada. No default

Scanner Physical Address

The address at the ADEPT-4 Data Link Layer for the scanner. No default

ScanCom Driver properties - Session tab

Session Name

Effectively, an encrypted version of the user name

Password

A password for the connection. The text will not be displayed. The password is stored in an encrypted form.

RTU Node Name

Upon a successful login request the Scanner will reply with its name as a text string. This field lets us ensure we are connected to the right Scanner.

Device Clock Time Zone

The default is to use the server's time zone. Select an alternative time zone if appropriate.

Max Queue Records to Return

The maximum number of queue records to be returned in a GETN response. A value of "0" means "no limit", or "send them all".

Units

Choose between US and SI.

Comms Trace: Packet Building and Parsing,

Comms Trace: Transmit and Receive,

Comms Trace: Session Manager,

These three parameters control what (if any) trace information should be logged. Look for the file in the folder Data\Trace Files of your application. The filename will take the form, <Name of Driver Tag>-YYYY-MM-DD.LOG For example: DemoScanCom-2023-06-08.LOG

Ignore RTU-Generated Errors

The Scanner provides return codes in its replies. By default the ScanCom Driver counts any non-zero return codes as driver errors, ending any operation in progress. This can be problematic in certain circumstances, such as if the Scanner returns an error code as part of a login transaction. For these occasions, the Ignore RTU-Generated Errors parameter allows us to disregard the Scanner return codes in order to connect to the device for diagnostic or corrective purposes. Note that the Scanner return codes provide important information, and this setting should not be enabled for extended periods of time.