Contents
1. OverviewThe Linacq data recording system consists of the following parts: +------------------------------------+ | LinAcq PC | +------------------------------------+ | OS: Linux RedHat 6.1 | | CPU, RAM: PII, 466MHz, 128MB | | HD: SCSI, 18.2GB Fujitsu MAE3182LP | | CD-WR: Sony CRX-140s (SCSI) | | TAPE: Exabyte | +------------------------------------+ | A/D card (PCI): | | - 16-bit | | - 16 ch. single-ended, | | or 8 ch. differential. | +--------------------+ | Mod: PCI-DAS1602-16 | | Input panel | | Mfr: Measurement Computing +===========+ Signal & trigger | | (formerly ComputerBoards) | | BNC | +------------------------------------+ +--------------------+ Fig. 1. Linacq block diagram 2. PC HardwareMain PC
Back-up PC
3. A/D board: PCI-DAS1602-16
4. Linux driver for PCI-DAS1602-16 A/D cardThe Linux device driver for this data acquisition boards is written by Dr. Warren J. Jasper at North Carolina State University. These drivers are freely available via anonymous ftp from: ftp://lx10.tx.ncsu.edu/pub/Linux/drivers. They are also available from this server, click here. As of May 31, 2001 we use version 1.5. A listing of the terminal window during installation. 5. Trigger inputThe switch selects trigger type. "Current pulse" input is tailored to GeTech GUNCO "FTB recording" output where there is a resistor that acts as current limiter. IMPORTANT: Ensure current is limited (< 15 mA?) if other trigger source is used with this input. Fig. 2: Trigger input. Note: Limit current on J2 if triggered from other source then GeTech GUNCO "FTB Recording".
6. Connector pin-out for PCI-DAS1602-16 A/D cardFig. 3. A/D-card connector pin-out. 7. Linux config (main PC)7.1 fdisk, print partition table for sdaCommand (m for help): p Disk /dev/sda: 255 heads, 63 sectors, 2222 cylinders Units = cylinders of 16065 * 512 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 39 313236 83 Linux /dev/sda2 40 2222 17534947+ 5 Extended /dev/sda5 40 1694 13293756 83 Linux /dev/sda6 1695 2077 3076416 83 Linux /dev/sda7 2078 2205 1028128+ 83 Linux /dev/sda8 2206 2222 136521 82 Linux swap 7.2 /etc/mtab/dev/sda1 / ext2 rw 0 0 none /proc proc rw 0 0 /dev/sda7 /home ext2 rw 0 0 /dev/sda5 /qc3 ext2 rw 0 0 /dev/sda6 /usr ext2 rw 0 0 none /dev/pts devpts rw,gid=5,mode=620 0 0 7.3 /etc/profile# /etc/profile # System wide environment and startup programs # Functions and aliases go in /etc/bashrc export PATH="$PATH:/usr/X11R6/bin:/usr/matlab/bin:/usr/local/gmt-3.3.6/bin:/usr/local/SU/bin" export GMTHOME=/usr/local/gmt-3.3.6/data ulimit -c 1000000 if [ `id -gn` = `id -un` -a `id -u` -gt 14 ]; then umask 002 else umask 022 fi USER=`id -un` LOGNAME=$USER MAIL="/var/spool/mail/$USER" HOSTNAME=`/bin/hostname` HISTSIZE=1000 if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then INPUTRC=/etc/inputrc fi export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC for i in /etc/profile.d/*.sh ; do if [ -x $i ]; then . $i fi done unset i 8. Software8.1 Installing A/D-card driver moduleThis must be done before the acquisition program is started. Type (as root): /sbin/insmod -f /home/oistein/pci-das1602-16/pci-das1602-16.o # See 'man insmod' for details. 8.2 Running the acquisition programAt present the program is placed in /home/oistein/linacq, thus: cd /home/oistein/linacq # Start the program: ./linacq.tcl The Tcl/Tk program is a front to the C program that's doing the hard work. 8.3 Exabyte tape back-upFor tape newbies. Example: Tar content of /etc and send it to the Exabyte, rewind the tape and check what's there. See man pages for command details. Important: The Exabyte must be ready to receive command - look for a steady green light. du -ks /etc # Size? tar cvf /dev/nst0 /etc/ # Tar it to tape mt -f /dev/nst0 rewind tar tvf /dev/nst0 # Check it mt -f /dev/nst0 rewoffl # Tape out 8.4 CD-WRNote from Halvard: CD-Brenning: www.http://www.uio.no/~hpv/cdsvi.html qc3/halvard+++ må selsagt byttes ut med navnet/ene på den katalogen din fil ligger i og hvor image filen din skal ligge. # Filer: mkisofs -a -J -l -r -v -o /qc3/halvard/image/image.iso /qc3/halvard/brennes # Lager image cdrecord -v -dummy speed=8 dev=0,2,0 /qc3/halvard/image/image.iso # Testbrenning cdrecord -v speed=8 dev=0,2,0 /qc3/halvard/image/image.iso # Brenning # Ø.Aa. metode: cdrecord --scanbus cdrecord dev=0,2,0 speed=8 -v seawolf-i386-disc1.iso # Eksempel fil # Lyd: cdrecord -v -pad -audio -dummy speed=8 dev=0,2,0 fil1.wav fil2.wav fil3.wav ... (eller *.wav) cdrecord -v -pad -audio speed=8 dev=0,2,0 *.wav http://www.matarese.com/CD-Writing-HOWTO.html : 4.7. Is it possible to make a 1:1 copy of a data CD?" Yes. But you should be aware of the fact that any errors while reading the original (due to dust or scratches) will result in a defective copy. First case: you have a CD-writer and a seperate CD-ROM drive. By issuing the command cdwrite -v -D /dev/sgc --pad -b $(isosize /dev/scd0) /dev/scd0 or cdrecord -v dev=3,0 speed=2 -isosize /dev/scd0 you read the data stream from the CD-ROM drive attached as /dev/scd0 and write it directly through /dev/sgc to the CD-R. Second case: you don't have a seperate CD-ROM drive. You have to use the writer to read out the CD-ROM in this case: dd if=/dev/scd0 of=cdimage bs=1c count=`isosize /dev/scd0` This command is equivalent to the result of mkisofs, so you should procede as described in chapter 3. Please note that this method will fails on audio CDs! 8.5 Misc.Start SSH deamon: Shutdown computer (as root):/usr/local/sbin/sshd2 /sbin/shutdown -h now 8.6 GPS sync program (didn't work ..)A Python program to trigger the system at regular intervals, based on GPS input on ttyS0. The program should also issue an RS-232 Eiva-like datastream that could be used as input to the LinAcq program - position and time could then be inserted into seg-y headers. The program failed because:
#!/usr/bin/python import string import os # Constants: FireInterval = 10 # Init stuff goes here print 'Type Ctrl-C to stop!' gpsdata = open('/dev/ttyS0', 'r') #trigger = open('/dev/lp0', 'a') # No success here .. trigg = os.open('/dev/lp0', os.O_WRONLY) # This is test stuff # Bitwise OR with OS_NONBLOCK doesn't help antall = os.write(trigg, '1') print "Antall bytes: ", antall os.close(trigg) # This is the field separation and time interval stuff. It's raw but works fine. # Assumes GPGGA sentence while 1: gpsline = gpsdata.readline() # Read line from serial port if len(gpsline) > 1: # Line is terminated by CR and LF, gives empty line print gpsline[:-1] # Prepare to output to stdout s = gpsline[11:13] # Extract seconds (fragile, should be improved) seconds = int(s) if seconds % FireInterval == 0: # parport.write('1') # parport.write('0') #trigger.write('\x00') #trigger.write('\xFF') print ">>>> FIRE GUNCO, TRIGGER ACQ SYSTEMS >>>>", "\a" gps_felt = string.split(gpsline,",") # In this version just send it to stdout print ">>>> TO FILE >>>>", \ gps_felt[1], \ gps_felt[2], \ gps_felt[3], \ gps_felt[4], \ gps_felt[5] # parport.close() gpsdata(close) # trigger(close)2
8.7 LinAcq source code (both Tcl/Tk and C code)Important note: In the current version the no of channels on the A/D-board is set in the program. If the Linacq system is to act as a backup for a seismic reflection system it provides up to 16 single-ended channels. In that case the BURST_MODE flag must be set to 0 (burst mode ON means that all channels are sampled at maximum sampling rate, then there is a pause until next sampling instant, then a new burst. This reduces sampling skew effects). Source code directory (copy from backup pc as of Nov 8, 2001). Previous version: linacq-0.12b.tar.gz 8.8 LinAcq software documentationCredits: Øistein Aanensen Fig. 4 LinAcq block diagram, also showing connection to Navigation system and online QC-system (QCIX) Not translated yet ...Kobling mot Eiva med RS232Eiva navigasjon og kobling mot QCIX qc system kan sløyfes. Ved kobling mot eiva systemet vil skuddnummer/eventnummer og koordinatene bli skrevet direkte inn i segy trase headeren. Linacq starter en tråd, som åpner en serie port mot eiva'en. I denne tråden går en endeløs loop og leser data fra navigasjons sytemet. Formatet som skal inn til linacq erTime Date Easting Northing Event Depth 15:11:43 22.02.2000 303537.92 6775936.57 15 1207.3 15:11:57 22.02.2000 303337.92 6775836.57 16 1207.3en linje per event. Kobling mot QCIX qc systemDenne kobling skjer med filer, linacq skriver ut seismic unix data i en slags ring buffer (2 forskjellige filer). Slik linacq er kompilert idag havner disse filene i /qc3/qc/data.su1 og /qc3/qc/data.su2. I tilegg bruker linacq en fifo (/qc3/qc/qc_trig) til å trigge qc systemet. Disse filen kan enkelt forandres i kildekoden til linacq (filen linacq.c) og i QCIX (filen lib/qcdeamon.tcl). Det enkleste er jo selvsagt å holde seg til standarden. Slik system er tegnet i skjemaet over deler en direktoriet /qc3/qc med nfs-server. Nfs-serveren til linux har vært plaget av bugs, men ved å kompilere den nye nfs-server-2.2beta47 så alt ut til å virke fint. Kildekoden til nfs-servern skal ligge i /root og anonym ftp på fia.Kildekode og driver.C kode kompileres med:gcc -lpthread -O2 -o linacq linacq.cStandard driver til kortet. PCI-DAS1602-16.1.6.tgz Driveren er basert på et interupt når 512bytes fifoen på kortet er halv full, i linux 2.2 kan en da overføre halve fifoen, 256bytes i et kall (insw). Noe som gjør at kortet klarer ekstrem høy samplings rate uten å bruke DMA og uten å miste samples. 2 kanaler og 100Khz går fint.
University of Bergen |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||