EagleLog DOSLOG runtime

  • Introduction
  • System configuration
  • DOSLOG: The stand-alone runtime
  • Communication with the master PC
  • Configuration file
  • Logging data
  • Serial terminal for browsing I/Os

When you receive a DOS-based Eagle system, it will be configured to automatically start the DOSLOG runtime, using Modbus node 1, and a serial speed of 38400 bps through RS232 to the master PC through COM1. To use it as a stand-alone datalogger, you normally won't need to make any changes to the Eagle system itself -- the configuration of the I/O modules in the system, which I/Os to monitor, and when to log data, can all be configured from the master PC. The following text is for users that need to customize the system.

The EagleLog DOS runtime is the program running in the Eagle system when using DOS. It can be used in two modes: Normal mode for normal stand-alone use, and in TSR mode so that it can co-exist with a user application in the Eagle system. Read about the special features of the TSR mode on EagleLog DOS runtime running as TSR page.

In addition, the DOS runtime contains Modbus Slave functions so that the Eagle system can be used as a remote I/O from a SCADA program. This remote I/O can be used independently of the data logging. See Using the DOS-based Eagle system as a remote I/O.

The Eagle system, when running DOS, is configured like this:

  • The ME-5122/24 flash disk is configured as A:, and the system BIOS is set up to boot from it.
  • The system BIOS is set up so that if you connect an external floppy drive, it will be accessible as B:. If you don't connect an external floppy drive, the system BIOS won't complain about it.
  • In CONFIG.SYS, HIMEM.SYS is loaded, and a RAM disk of 920 KB is created, accessible as C:.
  • In AUTOEXEC.BAT, the stand-alone DOSLOG runtime is started, using default settings, see below. If you need something other than those values, you should edit AUTOEXEC.BAT to supply the desired values.

DOSLOG is the normal DOS Eagle runtime. It consists of the DOSLOG.EXE file and is normally started from AUTOEXEC.BAT.

DOSLOG parameters It accepts the following command line parameters. If an incorrect parameter is given, DOSLOG shows a brief description of the valid ones, and exits.

rs485_rts: Use the Modbus slave port (COM1) as RS422/RS485 instead of RS232. When transmitting data, it enables RTS to turn on the RS422/RS485 transmitter, and disables RTS when not transmitting. DTR is always disabled. Use this option when COM1 is a RS422/RS485 port that uses RTS to control the transmitter.

rs485_dtr: Use the Modbus slave port (COM1) as RS422/RS485 instead of RS232. When transmitting data, it enables DTR to turn on the RS422/RS485 transmitter, and disables DTR when not transmitting. RTS is always disabled. Use this option when COM1 is a RS422/RS485 port that uses DTR to control the transmitter.

When neither rs485_rts nor rs485_dtr is specified, DOSLOG assumes that COM1 is RS232. It keeps both RTS and DTR enabled as long as DOSLOG runs, and when starting, it sends the modem initialization string "ATS0=1" that puts a modem into auto-answer mode. If you are using a direct RS232 connection, this string isn't likely to disturb a Modbus master.

baud=nnn: Sets the desired serial speed on COM1 for communication with the master, 50-115200 bps. The default value is 38400.

node=nnn: Sets the desired Modbus slave node number, 1-255. The default value is 1.

tsr: Start in TSR mode. See EagleLog DOS runtime running as TSR.

nosound: Be silent. If nosound isn't specified, DOSLOG plays a sound in the PC speaker (if one exists) whenever it starts and terminates for any reason, so that you can verify correct startup without connecting a VGA monitor.

nologprint: Normally, DOSLOG prints a message to the screen whenever it stores a log. This is useful to verify that your log rules work when you connect a VGA monitor. Specifying nologprint turns this off.

modbusprint: Turn on debug output for Modbus handling. When processing a Modbus command, DOSLOG shows info about it.

benchmark: Show some performance information while running.

Example:

DOSLOG baud=19200 node=5 nosound

While initializing, DOSLOG shows various information on the VGA screen if one is attached. This can be useful while troubleshooting. DOSLOG can be terminated by pressing Ctrl+Alt+Shift on an attached keyboard.

DOSLOG uses the COM1 port for serial communication with the master PC. It uses the Modicon Modbus RTU slave protocol with extensions for file transfer. A SCADA program can use the Modbus Slave functions and thereby use the Eagle system as a remote I/O, see Using the DOS-based Eagle system as a remote I/O. The EagleLog configuration program uses the file transfer extensions for configuring and fetching log data.

Both a direct serial null-modem cable and a real modem connection can be used. When DOSLOG starts, it sends a modem initialization string that enables auto-answer so that the modem will automatically answer incoming calls from the master PC. The connection is terminated when the master PC hangs up.

As mentioned above, the serial speed, the port type (RS232/RS422/RS485), and the Modbus node number can be set with command line parameters.

When DOSLOG starts, it reads and parses the configuration file LOGCFG.EGL which must be in the current directory. LOGCFG.EGL is the file received from the master PC and that is generated by the EagleLog PC program. If a new LOGCFG.EGL is received during normal operation, it is read, and the I/O modules, log rules, and log data are re-initialized.

The configuration file contains a "modbusnode=xxx" line. This is only used by the PC -- it is ignored by DOSLOG. If another Modbus node number than the default 1 is desired, it must be set with a commandline parameter.

During normal operation, DOSLOG repeatedly scans all used inputs, runs through the defined rules, and performs any logs pending. Log records are stored in the file C:\LOG.DAT which has a size of 921600 bytes. The file is automatically created if it doesn't exist.

LOG.DAT is used as a circular buffer for log records. If it gets full, the oldest records will be overwritten. When the master PC successfully fetches the data from the file, it is marked empty.

The C: drive where LOG.DAT is stored, is normally a RAM disk created in CONFIG.SYS. This means that data can be written to it very quickly, and that the log data are lost if power is lost. If this is a problem, you can connect a backup battery to the ME-5122/ME-5124 power supply module.

DOSLOG will automatically attempt to communicate with a Micronix Access 10 terminal connected to COM2. The Access 10 should be configured like this:

  • Response timeout = 1
  • Activity timeout = 1
  • Baudrate = 9600
  • Data/Parity = 8 None
  • Handshake = None
  • Initial start = ICI/232

On the Access 10, you can use the Up and Down keys to browse the actual value of those I/Os where you have enabled "Browsable from serial terminal" in the EagleLog PC program. The values are shown with name and physical unit (if present) like this:

Temperature
102.20 degF

The display is updated four times per second. If no I/O has "Browsable from serial terminal" enabled, the Access 10 will permanently show this picture:

Micronix EagleLog
No browsable data.
eZ publish™ copyright © 1999-2005 eZ systems as