Recent Changes - Search:

EPOS-N - European Plate Observing System

Projects

Seismometers / vault construction

Digitizers

Interconnections

Stations: Upgrade/install notes

Calibrations

SeismoLAB

Ideas for improvements

Installation / Inventory

Misc

edit SideBar

Earth Data Model 2400-235 Digitizer


1 Summary of serial data format discrepancies


Referring to Earth Data document EDM012: Instruction Manual for 24 Bit Multi Sample Rate Digitizer, Mod. No. 2400-235, page 12 Mod Header description:

1) Digital filter indication is inverse of expected values, bytes # 50+51 in header

2) Gain setting, two bytes # 58+59 in header: Manual says ASCII indication "Hi" / "Lo". Instead the first byte is always ASCII "G" ("Gain"?), then follows ASCII "0" (zero) meaning all three channels have LOW gain, or ASCII "7" meaning all three channels have high gain.

3) Serial number field is empty.


2 Control program ModMon


The ModMon configuration program is a Win executable, but can also be used on a Linux box if you have installed the Wine emulator package.

It provides an overview of header content:


Modmon program: Headers

From the Control tab you can also configure the digitizer. It's a bit strange that current gain setting is not reported here; only if a channel is enabled or disabled. You will, however, find this information in the header tab.


Modmon program: Control settings

Remember to save changes to ROM - otherwise they will be lost after power cycling the unit.


3 Mix-up of filter configuration information


Information on current filter setting is included in the header part of the serial data stream. Unfortunately, the information is the inverse of what should be expected. The ModMon program will, however, hide this anomaly from the user by taking care of the discrepancy behind the scenes. You can select a particular filter setting and the ModMon program will, after a short while, report the new and correct setting. However, if you monitor the raw serial data stream the mismatch becomes clear ...

If you receive data from the mod. 2400 and also rely on header information this issue must be taken into account.

To verify the mismatch you must monitor the raw serial data stream.

3.1 How to monitor raw serial data in Windows

  • Capture data with i.e. Hyperterminal or Tera Term Pro
  • Eltima software: Serial Port Monitor 4.0. This serial monitor program is very good. It comes at a price, however, and a licence must be purchased for every machine where you want to install it. If you have a single problem to solve you can download the trial software and get the work done during the grace period.

3.2 How to monitor raw serial data in Linux

Keep in mind that serial communication in Unix/Linux is rather complicated. The TERMIOS intricacies is worth a study in itself. The method outlined below permits you to capture both output from the digitizer, and also the commands sent to the mod 2400 from the ModMon configuration program - which is running in the Linux "Wine" emulator. So you must first install Wine (no problem in Suse 10.3 - just grab the RPM package).

In the following, two assumptions are made:

  • All commands given under root (otherwise you must change access rights to the serial ports)
  • Com_1 => /dev/ttyS0 connected to the digitizer

First specify correct operating mode and baud rate. Mod. 2400 is running at 19200 bits/s:

   stty -F /dev/ttyS0 19200 raw

Verify these settings:

   grav1:/home/olem # stty -F /dev/ttyS0
   speed 19200 baud; line = 0;
   min = 1; time = 0;
   -brkint -icrnl -imaxbel
   -opost
   -isig -icanon -echo noflsh

Study the Linux TERMIOS system to become familiar with the various parameters.

First we want to monitor the data stream from the digitizer, in order to check the filter setting. According to the Instruction Manual for 24 Bit Multi Sample Rate Digitizer Model No. 2400-235 (Earth Data Document No.: EDM012, Issue 3, dated June 1999), page 12, the Mod header contain filter configuration setting in bytes 50 & 51, given as ASCII "LP" or "MP" ("Linear Phase" and "Minimum Phase", respectively).

Capture to file by typing:

   cat /dev/ttyS0 > capture.txt

Then use editor capable of displaying content in mixed hex/ascii mode to examine content of serial stream. Here's a sample file (this is a binary file).


Using MidnightCommander (mc) in hex mode to examine captured content.

In this screenshot the filter is "LP". Note that capture is not syncronized to header start.

If you want to capture the commands sent from the ModMon program you must make a serial Y-split adapter. The TXD (data output) on the serial post that is used with the digitizer must be routed to the RXD input on a second serial port (USB-to-serial adapters mostly work fine under Linux; use the dmesg command after connecting the adapter to obtain information as to device mapping name; i.e. /dev/ttyUSB0 for the first adapter).

Then configure the second serial port (assuming it's /dev/ttyS1):

   stty -F /dev/ttyS1 19200 raw

On the second serial ports capture the configuration commands sent from the first serial port by issuing this command:

   cat /dev/ttyS1 > capture.txt

Now comes the crucial part.

The memory buffer assigned to /dev/ttyS1 by the operating system is not written to file before a line terminating character (CR / LF) is received. But the digitizer commands are not terminated - they just consist of a prefix, indicating type of command, and subsequent parameters (ref. page 17 in the manual). So to have all captured characters written to file terminate the ModMon program, open terminal window and send terminating characters out on the first serial port using the echo -ne '\n' > /dev/ttyS0 command.


4 Setting Digital Filter


According to Earth Data mod 2400 manual, it's possible to select Linear- or Minimum Phase digital phase filter response by issuing the "$FT" command followed by appropriate parameters.

Select Linear Phase:

   echo -ne '$FT\x00\x00' > /dev/ttyS0

Select Minimum Phase:

   echo -ne '$FT\x00\x02' > /dev/ttyS0

The "-ne" options to the echo command will suppress sending of line termination character, and permit expansion of i.e. hex characters ("\x02").

Remember to save to ROM:

echo -ne '$RW' > /dev/ttyS0

Verify that new settings are valid after power cycling the unit.


5 Setting Sampling Rate


First configure serial port (assuming it's /dev/ttyS0). The ED-2400 uses a baudrate of 19200.

   stty -F /dev/ttyS0 19200 raw

Setting sampling rate is really a matter of changing filter parameters. As explained on p. 13 in the manual (issue "EDM 020", issue 2, dated March 2002):

The sample rate is achieved by dividing 3000 by the product of deci12 and deci10 which assume integer values between 1 and 12 and 1 and 10 respectively. Only those divisions producing sensible sample rates are used.

Combine this with information on the command set (p. 19 in the manual, issue "EDM 020", issue 2, dated March 2002):

$SF = Set Filter Ratio: First byte: 3 = filter no 3
                                    4 = filter no 4
                        Second byte: decimation ratio
                                    filter 3 = 1,2,3,4,6, or 12
                                    filter 4 = 1,2,5, or 10

So, to set the sample rate to 100 sps:

   echo -ne '$SF\x03\x06$SF\x04\x05' > /dev/ttyS0

bacause 3000/(6 * 5) = 3000/30 = 100

and similarly, 500 sps would require:

   echo -ne '$SF\x03\x06$SF\x04\x01' > /dev/ttyS0

bacause 3000/(6 * 1) = 500

The "-ne" options to the echo command will suppress sending of line termination character, and permit expansion of i.e. hex characters ("\x02").

Remember to save to ROM:

echo -ne '$RW' > /dev/ttyS0

Verify from block header information that settings take effect by reading thse two parameters:

  1. Positions 52 & 53 (counting from zero): Decimation factor of filter 3 (two-byte integer)
  2. Positions 54 & 55: Decimation factor of filter 4 (two-byte integer)

So in this case, the decimation factor of filter 3 is 6 (red mark in screen shot) and filter 4 is 5, yielding a sample rate of 3000 / (6 * 5) = 100 sps.

Capture of digitizer serial output is accomplished by this command:

   cat /dev/ttyS0 > capture.txt

Verify that new settings are valid after power cycling the unit.


6 Gain setting information


Gain setting, two bytes # 58+59 in header: Manual says ASCII indication "Hi" / "Lo". Instead the first byte is always ASCII "G" ("Gain"?), then follows ASCII "0" (zero) meaning all three channels have LOW gain, or ASCII "7" meaning all three channels have high gain.

Screenshots below shows hex dump of header. Position no. 58 is highlighted. In the first case all channels have low gain ("G0), in the last case all have high gain ("G7").


Low gain setting all channels: "G0" setting in byte 58+59 in header.

High gain setting all channels: "G7" setting in byte 58+59 in header.
Edit - History - Print - Search
Page last modified on November 21, 2016, at 10:52 AM
Electronics workshop
Department of Earth Science - University of Bergen
N O R W A Y