Changes between Initial Version and Version 1 of adsend


Ignore:
Timestamp:
03/19/12 17:33:42 (9 years ago)
Author:
branden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • adsend

    v1 v1  
     1[[PageOutline]] 
     2 
     3= [wiki:Earthworm Earthworm] Module: adsend = 
     4'''Contributed by: ''' 
     5 
     6== Function == 
     7Digitizes analog seismic signals on Win2000 system only using National Instruments digitizer boards. 
     8 
     9== Details == 
     10Adsend is the digitizing program for Earthworm. Adsend, which runs under Windows 2000, produces demultiplexed data. It does not work for Linux yet, but this is a work in progress. It was converted to SCNL as of Earthworm Version 7.0. 
     11 
     12This program was designed to work with a single National Instruments DAQ board (model PCI-MIO-16E-4) and up to four MUX boards (model AMUX-64T). The DAQ board can be used without MUXs as a 16 channel system. Up to four MUX boards can be used, for a maximum of 256 channels, 64 channels per MUX. Adsend uses the NIDAQ function library, supplied by National Instruments. The NIDAQ functions may not be used in multi-threaded applications. For this reason, adsend is compiled single threaded, and it is linked with single-threaded versions of the earthworm library functions. 
     13 
     14Adsend is designed to produce the highest quality data it can, but to keep running even if there is a loss of the IRIGE signal or external A/D trigger. 
     15 
     16=== TIME STAMPING ADSEND DATA === 
     17 
     18Adsend time stamps the trace data by de-coding an IRIGE time channel. At least one channel must contain IRIGE time code, which is decoded in software and used to time-stamp the data. When the program starts up, it will not send data until the IRIGE time signal is in sync. After adsend syncs to IRIGE, it will keep sending data even if time sync is lost. If the IRIGE sync is lost, a bit is set in the trace header to indicate "time code out of sync". 
     19 
     20If the parameter SendBadTime is set in the adsend configuration file, adsend will use the PC system clock instead of an IRIGE signal to time stamp the data. This is NOT RECOMMENDED for production use, but is handy for testing purposes. 
     21 
     22IRIGE time code does not contain the year. The adsend program can determine the year using one of two methods. In method 1, adsend reads the current year from its configuration file and puts it into the TYPE_TRACEBUF message headers. At midnight (GMT), on New Year's Eve, the year must be manually changed in the configuration file, and the A/D system must be restarted. In method 2, adsend reads the year from the PC clock. In order to insure that adsend and the PC clock are in sync, the PC clock time should be updated from the IRIGE time code. This is an option in the adsend configuration file. 
     23 
     24To insure accurate time stamping at all times, adsend allows for the use of multiple IRIGE channels. If lock is lost on one IRIGE channel, the next on the list will be attempted. 
     25 
     26=== CHANNEL ROTATION and the GUIDE CHANNELS === 
     27 
     28Under certain conditions, the A/D system may experience "channel-rotation", a condition in which the digitized signals appear on the wrong channels. To detect channel rotation, adsend can monitor one "guide channel" from each MUX. The guide channels are connected to a triangle wave generator. If a guide channel does not contain a triangle wave, we assume that a channel rotation has occurred on a MUX, and we reset the entire DAQ system. The reset process takes about one second, producing a gap in the data stream. To avoid continual resetting, the system is not reset unless all guide channels have been in sync for a period of 30 seconds. Guide channels, if used, consist of 2 hz triangle waves, with amplitude -1V to +1V.???? I thought the amplitude could be variable. 
     29 
     30The algorithm for detecting the guide channel can be tuned in the adsend configuration file. There are two threshold values. If the mean value of first-differences of the guide channels falls below a threshold value, adsend will do a restart. This will occur if a guide channel goes dead. If the standard deviation of first-differences of the guide channels exceeds a threshold value, adsend will also do a restart. This will occur if a guide channel is noisy. 
     31 
     32During a restart, the resetting of the DAQ takes only about a second, but it takes about 20-30 seconds to re-sync on the IRGIE signal. Therefore, a gap of up to 30 seconds should be expected if there is a restart. 
     33 
     34On startup or after a restart, if the guide channels do not lock in after ErrNoLockTime seconds (set in configuration file), adsend will send a message to statmgr. 
     35 
     36=== RINGING THE COMPUTER BELL === 
     37 
     38Adsend can now be set to ring the computer bell if time code is not in sync or the guide channels are not locked in. This feature can be enabled or disabled using the EnableBell configuration file parameter. 
     39 
     40=== SAMPLING TRIGGERING === 
     41 
     42A/D sampling may be internally triggered using a clock on the DAQ card, or an external trigger may be used. To insure the sampling rate is precise, it's best to use "external triggering" from a precision clock. We tested the system using an externally generated trigger, consisting of a 100 hz square wave, with amplitude 0-5V. 
     43 
     44If the external trigger disappears for a user-specified amount of time, adsend will switch to internal triggering. If this occurs, an error message is logged and sent to the statmgr. 
     45 
     46=== GROUND === 
     47 
     48The system uses non-referenced, single-ended inputs (NRSE). The input signal's ground reference is connected to the DAQ AISENSE pin, which is also connected to the DAQ AIGND pin. 
     49 
     50=== CROSS FEED === 
     51 
     52The National Instruments AMUX-64T boards sometimes have a problem with cross feed between channels. Additional hardware is needed to reduce cross feed, such hardware is available from VLF Design and is being designed at USGS, Menlo Park. 
     53 
     54=== INTEGRATING USING THE DELL OPTIPLEX SERIES COMPUTERS === 
     55 
     56When using the Dell Optiplex series to digitize, care must be used as to which pci slot is used for the National Instruments PCI-MIO E-series card. You MUST use either slot PCI1 or PCI2 (the two slots closest to the mother board on the expansion riser). These are connected directly to the 100MHz bus. Higher slots connect via a bridge which causes a "bottleneck" and may result in unpredictable errors usually culminating in catastrophic failure and a physical memory dump (i.e. the infamous "blue screen crash"). For 64 channels or more, this error will be immediately obvious; for 16 channels the error may occur at some later time (perhaps only after quitting earthworm and logging out). As of 3/11/1999 this was an undocumented feature (neither in supplied nor online docs), but Dell Tech Support was aware of it. 
     57 
     58=== Sample Configuration File === 
     59{{{ 
     60# 
     61#                    CONFIGURATION FILE FOR ADSEND 
     62#                    ----------------------------- 
     63# 
     64#  If there are no mux boards in the system, OnboardChans (16) channels are 
     65#  digitized.  If there are mux boards in the system, 
     66#  (4 * OnboardChans * NumMuxBoards) channels are digitized. 
     67#  The station file must contain an entry for each channel digitized. 
     68# 
     69# 
     70ModuleId         MOD_ADSEND_A   # Module id of this instance of adsend 
     71OutRing          WAVE_RING      # Transport ring to write waveforms to 
     72HeartbeatInt     15             # Heartbeat interval in seconds 
     73EnableBell       1              # If non-zero, ring the computer bell if time 
     74                                #   code is out of synch or the guide channels 
     75                                #   are not locked on. 
     76# 
     77# 
     78#                        CHANNEL CONFIGURATION 
     79OnboardChans     16             # Number of channels on the DAQ card 
     80NumMuxBoards     4              # Number of 64-channel mux's (0,1,2, or 4) 
     81ChanRate         100.0          # Sampling rate in samples/second 
     82ChanMsgSize      100            # TraceBuf message size, in samples 
     83Gain             2              # Channel gains (-1: +/-10V)(1: +/-5V)(2: +/-2.5V) 
     84SampRate         250000.0       # Sample rate/scan (max for PCI-MIO-16E-4 = 250000.) 
     85# 
     86# 
     87#                           GUIDE CHANNELS 
     88NumGuide         4              # Number of guide channels (usually one per mux) 
     89GuideChan        0 4 8 12       # The channels carrying the guide signal 
     90MinGuideSignal   110.0          # Guides are declared dead if the mean value of 
     91                                #   guide 1st differences < MinGuideSignal 
     92MaxGuideNoise    8.0            # Guides are declared dead if standard error of 
     93                                #   guide 1st differences > MaxGuideNoise 
     94TimeForLock      5              # The guide channel system is declared "locked on" 
     95                                #   if all guide channels remain locked on for 
     96                                #   TimeForLock seconds. 
     97ErrNoLockTime    30             # At program startup or after a restart, if the 
     98                                #   guide channel system does not lock on for 
     99                                #   ErrNoLockTime seconds, adsend will report an 
     100                                #   error to statmgr (see adsend.desc). 
     101# 
     102# 
     103# 
     104#                         TIMING INFORMATION 
     105NumTimeCodeChan  2              # Number of time code channels 
     106TimeCodeChan     1 2            # Get the time code from these channels 
     107Year             1998           # Current year (reset manually at New Years) 
     108YearFromPC       0              # 1->Ignore "Year" and take from PC clock 
     109# 
     110SendBadTime      0              # NOTE: if set to one, adsend will use the PC   
     111                                # system time to time stamp the data. 
     112                                # It will make no attempt to decode IRIGE 
     113UpdateSysClock   0              # 1->PC time updated with IRIGE 
     114IrigeIsLocalTime 0              # 1 if Irige represents local time; 0 if GMT time. 
     115 
     116TimeoutNoSend    120            # If no data is sent for TimeoutNoSend seconds, 
     117                                # possibly due to bad time code, the program will 
     118                                # switch to the next TimeCodeChan and restart the 
     119                                # DAQ system.  If TimeoutNoSend = 0, this feature 
     120                                # is disabled. 
     121 
     122TimeoutNoSynch   1800           # If there is no time-code synch for TimeoutNoSynch 
     123                                # seconds, the program will switch to the next 
     124                                # TimeCodeChan and restart the DAQ system. 
     125                                # If TimeoutNoSynch = 0, this feature is disabled. 
     126# 
     127# 
     128#                         EXTERNAL TRIGGERING 
     129# This program uses "High-Hysteresis Analog Triggering Mode". 
     130# Triggering occurs when the trigger voltage becomes greater than HighValue. 
     131# Detriggering occurs when the trigger voltage becomes less than LowValue. 
     132# HighValue minus LowValue must be >= 0.1 volt. 
     133# For more information on triggering, see the National Instruments "PCI-MIO 
     134# E Series User Manual", Jan 1997 edition, chapter 3. 
     135# 
     136ExtTrig          1              # 0 for internal triggering; 1 for external 
     137LowValue         2.75           # In volts (-10V to 10V) (must be < HighValue) 
     138HighValue        3.25           # In volts (-10V to 10V) (must be > LowValue) 
     139 
     140TimeoutNoTrig    5              # If no tracebuf messages are obtained for 
     141                                # TimeoutNoTrigger seconds, the program will 
     142                                # assume the external trigger is disconnected. 
     143                                # The program will switch to internal triggering. 
     144# 
     145# 
     146#               "SCNL" AND PIN VALUES FOR EACH DAQ CHANNEL 
     147# Chan lines must follow the Channel Configuration lines in this file. 
     148# Unused channels may be omitted from the list.  Pin numbers are optional. 
     149# If a pin number is not specified for a channel, the pin number is set to 
     150# the DAQ channel number. 
     151# 
     152#     DAQ      Station/ 
     153#   Channel    Comp/Net/Loc     Pin 
     154#   -------    -------------    --- 
     155Chan    0    GUIDa --- NC --     0 
     156Chan    1    IRG1a T   NC --     1 
     157Chan    2    IRG2a T   NC --     2 
     158Chan    3    MMC   VHZ NN --     3 
     159Chan    4    GUIDb --- NC --     4 
     160Chan    6    NFI   VHZ NC --     6 
     161Chan    7    MBU   VHZ NC --     7 
     162Chan    8    GUIDc --- NC --     8 
     163Chan   10    NRL   VHZ NC --    10 
     164Chan   11    BMR   VHZ NN --    11 
     165Chan   12    GUIDd --- NC --    12 
     166Chan   13    RYS   VHZ CI --    13 
     167Chan   15    PDR   VHZ NC --    15 
     168Chan   16    LPG   VHZ NC --    16 
     169Chan   17    JSA   VHZ NC --    17 
     170Chan   18    RCC   VHZ NN --    18 
     171Chan   19    PSA   VHZ NC --    19 
     172Chan   20    GAX   VHZ NC --    20 
     173Chan   22    CBW   VHZ NC --    22 
     174Chan   23    OCM   VHZ NC --    23 
     175Chan   24    CRG   VHZ CI --    24 
     176Chan   25    PTA   VHZ NC --    25 
     177Chan   26    BRM   VHZ NC --    26 
     178Chan   27    BEN   VHZ NN --    27 
     179Chan   28    GSN   VHZ NC --    28 
     180Chan   30    FRI   VHZ BK --    30 
     181Chan   31    CMN   VHZ NC --    31 
     182Chan   32    PST   VHZ NC --    32 
     183Chan   33    WSH   VHZ CI --    33 
     184Chan   34    STR   VHZ NN --    34 
     185Chan   35    BCG   VHZ NC --    35 
     186}}} 
     187 
     188== Helpful Hints ==