dataTaker - Data Loggers, Powerful and Flexible Data Acquisition & Data Logging Systems

Communication Protocols and Commands

The dataTaker 50/500/600 series loggers have several protocols and commands, which control the behaviour of the logger as a communicating device.

These protocols are all obeyed by DeTransfer and DeLogger, and so if you are using either of these applications to supervise and program your dataTaker then you can skip this chapter.

However if you are using some other application or tool to supervise and program your dataTaker, or are developing a driver for say a SCADA package, then you need to be aware of the dataTaker communications protocols.

Communications Baud Rate

The communications baud rate for the RS232 COMMS serial interface can be set by adjusting the DIP switches accessible behind the memory card socket.

Details for setting the baud rate for the RS232 COMMS serial interface are given in Section II ñ The RS232 COMMS Interface.

The baud rate DIP switches are read and used to initialise the serial interface every
50 millisecs when the digital inputs are strobed (debounce period). This ensures that the dataTaker is always sensitive to changes in baud rate.

Data Bits, Stop Bits and Parity

The RS232 COMMS serial interface of the dataTaker has the number of data bits permanently set to 8, the number of stop bits permanently set to 1, and the parity checking permanently disabled.

The serial interface of the host computer or terminal should be set to the same settings.

XON/XOFF Protocol

The dataTaker data loggers and DeTransfer and DeLogger all supports an XON/XOFF handshake protocol, which controls

the transmission of commands and programs from DeTransfer or DeLogger
running on the host computer, to the dataTaker

the transmission of data from the dataTaker to DeTransfer or DeLogger
running on the host computer

The protocol prevents data loss or corruption by the end receiving the transmission, due to communications overrun.

This XON/XOFF handshake protocol is permanently enabled in the dataTaker in both directions. Following initial power up, a hardware reset, or a RESET command, the dataTaker can receive commands and transmit data immediately (XON true in both directions).

When transmitting data, the dataTaker halts transmission within two byte (or character) periods of an XOFF character being received from the host, and resumes transmission when a subsequent XON character is received. This allows the host computer to control the transmission of data from the dataTaker.

When receiving long programs comprising many commands, the dataTaker issues an XOFF character when the input buffer becomes 50%, 75% and 90% full, and then issues an XON character when the input buffer is empty. This allows the dataTaker to control the transmission of programs from the host computer.

The XOFF character is ASCII 19 (DC3), and can be sent directly from the keyboard of a host running DeTransfer or any other communications software as Ctrl S.

The XON character is ASCII 17 (DC1), and can be sent directly from the keyboard of a host running DeTransfer or any other communications software as Ctrl Q.

Note :  If the dataTaker is in the XOFF state when it drops to the low power mode, then the XOFF state resumes when the dataTaker later powers up again.

Caution :  If the host computer does not support the XON/XOFF handshake protocol, then care should be taken that the dataTaker does not return data too quickly, and overrun the receive buffer of the host computer.

Alternative Commands for XON and XOFF

In some telemetry systems, telemetry equipment such as cellular telephone modems, radio modems, satellite terminals, etc. may intercept XON and XOFF characters and treat these as being for local control. Therefore XON and XOFF characters sent by the host computer software to the dataTaker to control the transmission of data from the logger are not received by the logger.

To overcome this potential problem, the dataTaker also supports alternative forms of the XON and XOFF commands as follows

^ZQXON

which is equivalent to XON

^ZSXOFF

which is equivalent to XOFF

Note : The ^Z indicates the Control Z character which must be sent to the dataTaker as ASCII 26, and not literally as circumflex Z.

These commands can be sent to the dataTaker from DeTransfer using the backslash command (\nnn) as follows

\026QXON
\026SXOFF

where \026 is translated by DeTransfer to a Control Z character when the command is transmitted.

When these commands are transmitted by the host, they are passed by the telemetry equipment as text strings to the dataTaker, which interprets and responds to them as XON and XOFF respectively.

Resetting the dataTaker Receive Buffer

Occasionally telemetry equipment may interfere with XON/XOFF control to the degree that the dataTaker input and/or output buffers become blocked.

This condition can be cleared by the communications buffers reset command as follows

^ZCMSRST

which resets and clears the transmit and receive buffers, and sets the XON/XOFF protocol state to XON.

This command can be sent to the dataTaker from DeTransfer using the backslash command as follows

\026CMSRST

where \026 is translated by DeTransfer to a Control Z character when the command is transmitted.

 

The dataTaker responds to this command with the message

RS232 Reset

Caution : Use of this command will cause the current contents of the transmit and receive buffers to be lost. However the program in the dataTaker, and any data stored in the memory, are unaffected.

Communication Protocols

The dataTaker optionally supports a communications protocol to protect against communications errors between the logger and the host. These errors are manifested as data loss or data corruption, and can be caused by electrical noise, temporary loss of carrier in radio or satellite links, interference by telemetry equipment, etc.

The dataTaker protocol ensures that command strings received by the logger are the same as those sent by the host computer software, and that the data received by the host computer software is the same as that sent by the dataTaker.

Use of the dataTaker communications protocol requires that the host software also supports the dataTaker protocol. This in turn requires that the host software has been specifically written for the dataTaker. The many third party data acquisition packages that are available will not support this protocol, unless a dataTaker driver has been specifically written.

Following initial power up, a hardware reset, or a RESET command, the protocol for communications is disabled.

Communications protocol can be used in both the Free Format and the Fixed Format Modes (see below), and is described in Section III ñ Computer Mode Communications.

The dataTaker 500/600 series loggers also implement a protocol in the RS485 network between loggers. However this protocol is always enabled, and is transparent to the user. There are no commands for the network protocol.

Free Format Mode for Data

The dataTaker normally returns data and system information to the host computer in the Free Format Mode, which is a conversational style suitable for displaying directly on a computer screen and for printing.

In this mode the user can change the format of the returned data and various system information using the data formatting commands.

Free Format Mode is selected by the Data Format Switch as follows

/HSelect Fixed Format Mode
/h  Select Free Format Mode (Default)

Following initial power up, a hardware reset, or a RESET command, the Free Format Mode is selected.

The Free Format Mode of returning data and system information is described in detail in Section III ñ Format of Returned Data.

Fixed Format Mode for Data

The dataTaker has a Fixed Format Mode for returning data and system information, that is a fixed data format that cannot be changed.

If the Free Format Mode is used to interface with host software, then provision must be made in the host software to ensure that changes in the data format do not confuse the software.

However the Fixed Format Mode provides the host software with a known dataTaker environment in which to operate.

 

In Fixed Format Mode the dataTaker provides

a fixed format for data and system information, which has special identifiers for each type of message, and date and time details

a description of the schedules, the channels, calculations, alarms, etc. that have been programmed into the logger

Use of Fixed Format Mode requires that the host software supports the predefined data formats which this mode ensures, and requires that the host software has been written specifically for the dataTaker. The third party data acquisition packages available will not support this mode, unless a dataTaker driver has been specifically written.

The DeLogger and DeLogger Pro support the Fixed Format Mode, and DePlot supports the Fixed Format Mode. However DeTransfer does not support this mode.

Fixed Format Mode is selected by the Data Format Switch as follows

/HSelect Fixed Format Mode
/h  Select Free Format Mode (Default)

When Fixed Format Mode is selected, current settings of the Channel Number Switch (/N/n), the Channel Identifier Switch (/C/c), the Units Text Switch (/U/u), the Echo Switch (/E/e), the Return Switch (/R/r), Parameter22, Parameter24 and Parameter38 are saved. These settings are restored when the Fixed Format Mode is exited and the Free Format Mode resumed.

The Fixed Format Mode for returning data and system information is described in Section III ñ Computer Mode Communication.

Communication Echo

During transmission of commands to the dataTaker, transmitted characters may optionally be echoed back to the host computer software.

While character echoing is intended for use when the dataTaker is supervised from a terminal device, it may be used by the host computer software to check if characters transmitted to the logger are correctly received.

Echo is enabled by the Echo Switch as follows

/E  Enable command echo (Default)
/e  Disable command echo

The Echo Switch defaults to /E when the dataTaker is initially powered up, is hardware reset or executes a RESET command.

Password

The dataTaker has a password protection for the RS232 COMMS serial interface. When the password is enabled, communications through the RS232 COMMS serial interface is only possible after the defined password has been entered.

Password protection is particularly useful when the dataTaker is connected to a modem. This eliminates the possibility of line noise being interpreted as commands during call establishment. Unauthorized access also is more difficult.

The password is defined by command in the general formal

PASSWORD="password "

where password is a text string of up to 10 case sensitive characters. Defining the password as null removes an existing password.

 

The following command from DeTransfer defines the password for the logger

PASSWORD="SecretCode"

To establish communications, enter the password followed by a carriage return. This signs the user on.

The RS232 COMMS serial interface remains open while there is communications activity, or until the SIGNOFF command is issued.

If there is no communications activity for 300 seconds (5 minutes), then the RS232 COMMS interface will automatically signoff. The automatic signoff delay can be defined by the Parameter14 command in the range of 1 – 255 seconds.

The dataTaker will respond to the DEL character with << CR LF (see below) regardless of the password state, This allows a dataTaker to be identified.

The dataTaker password can be operated by explicit command from DeTransfer. DeLogger does not support the dataTaker password at all.

Page Content


Home

Title and Waranty

Go to: Section 2 | Section 3

Section 1


Construction of the dataTaker 50

Construction of the dataTaker 500 600

Construction of the CEM

Getting Started

 

Section 2


Interfacing

Powering the dataTaker

Powering Sensors from the dataTaker

The Serial Interfaces

The RS232 COMMS Serial Interface

The NETWORK Interface

Analog Process

Connect Analog

Analog Chns

Measuring Low Level Voltages

Measuring High Level Voltages

Measuring Currents

Measuring 4-20mA Current Loops

Measuring Resistance

Measuring Frequency and Period

Measuring Analog Logic State

Measuring Temperature

Measuring Temperature with Thermocouples

Measuring Temperature with RTDs

Measuring Temperature with IC Temperature Sensors

Measuring Temperature with Thermistors

Measuring Bridges and Strain Gauges

Measuring Vibrating Wire Strain Gauges

The Digital Input Channels

Monitoring Digital State

The Low Speed Counters

The Phase Encoder Counter

The High Speed Counters

The Digital Output Channels

The Channel Expansion Module

Installing The Panel Mount Display

 

Section 3


Programming the dataTaker

Communication Protocols and Commands

Entering Commands and Programs

Format of Returned Data

Specifying Channels

The Analog Input Channels

The Digital Input Channels

The Counter Channels

The Digital Output Channels

The Real Time Clock

The Internal Channels

Channel Options

Schedules

Alarms

Scaling Data - Polynomials, Spans and Functions

CVs Calcs and Histogram

Logging Data to Memory

Programming from Memory Cards

STATUS RESET TEST

Switches and Parameters

Networking

Writing Programs

Keypad and Display

Error Mess Text

Appendix A - ASCII

Appendix B - ADC Timing