|
SEISMONITOR v0.9.
Copyright (C) 2002. Des Devlin (dtd@allshookup.org) and D.V.Rogers (dvr@allshookup.org)
www.allshookup.org
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the
Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
This program is derived from other GPL software. The main program was adapted from skeleton C code kindly provided by
Curt Wuollet (cwuollet@ecenet.com) of Wide Open Technologies and the MAT LinuxPLC project (http.mat.sourceforge.net).
The program runs on top of the CIO-DIO48H driver written by Warren Jasper (wjasper@tx.ncsu.edu) at North Carolina State University.
PREAMBLE
Seismonitor was written as part of a conceptual arts project using near-real-time seismic data to control a recommissioned
earthquake simulator. The original switch-relay system (Festo PLC) that drove the hydraulics and pneumatics of the machine
was replaced by a standard PC with a CIO-DIO48H digital I/O Isa board and a 48-channel solid-state relay rack.
The proprietary software that controlled the system stepped through a series of sequences within a closed environment.
This program was written to both move the system into an open (Linux) operating environment and introduce a near-real-time,
IP-based interactivity to the system.
REQUIREMENTS
Software
Linux system with console display or Xterm
Hardware
A PC with an Isa bus
UNPACK AND BUILD
tar zxvf seismonitor-0.9.tgz
QUICKSTART
online.pl and the binary both print to stdout so are best evoked from separate consoles/xterms.
MANIFEST
README - This file
DETAILS
seismonitor.
If no change occurs, the program continues in its default state, controlling two outputs which drive an air circuit.
online.pl and offline.pl.
These two scripts are the wrappers for seismonitor. The first polls a remote server for data.
The second takes input from the perl prompt and was written primarily for testing but is currently used to shutdown the simulator.
online.pl
This script assumes an Internet connection. It polls, retrieves and parses near-real-time data from the
Incorporated Research Institutions for Seismology (IRIS) Data Management Center (DMC) server at http://www.iris.washington.edu.
It first retrieves cgi output of all available recent seismic events and writes to a temporary file, '.seis.tmp'.
It then does a simple parse of the tmp file, extracting the most recent event time and magnitude which it writes to the
data file, seis.dat. The tmp file is deleted after processing.
offline.pl
This script takes two options at the prompt: a lowercase 'q' to quit/shutdown seismonitor, and a single- or double-digit
number separated by a decimal point within a given range. This number represents a magnitude value.
The script writes a single line of two fields to the data file, seis.dat. The first six-digit field must be unique
for seismonitor's file I/O logic to trigger an event sequence; the second is a two-digit value representing a magnitude,
taken from user input at the prompt. The magnitude value is multiplied by a factor of 10.
If 'q' is entered, the magnitude value is replaced with a value of -1, which triggers a shutdown sequence.
dtd@allshookup.org
November 2001
|