# Earthworm Modules:
SrParxchEwSend Overview

(last revised 10 January, 2007)

Introduction
SrParxchEwSend allows the Symmetric Research PARxCH family of low cost 24 bit data acquisition systems to send data to an Earthworm system running either Windows (Win2K, WinXP) or Linux. PARxCH models with 1, 4, and 8 channels are all supported. It can also support 16 channels if run with 2 PAR8CH on the same PC which share one PARGPS. Very accurate timestamping of the acquired data results when the optional PARGPS timing unit is used with the PARxCH A/D. Timestamping using the PC system time set by NTP is also available.
SrParxchEwSend reads configuration information like sampling rate and PARxCH model from an Earthworm style .d configuration file and then opens drivers and initializes hardware for the PARxCH and optional PARGPS. Then it starts the A/D and goes into an infinite loop acquiring data, converting it to Earthworm tracebuf (or tracebuf2) format and writing it out to the specified Earthworm ring. On each pass through the loop, it also sends a heartbeat message to the Earthworm ring.
In order to run SrParxchEwSend, you need a working Earthworm system, a PARxCH A/D board, and the PARxCH device driver and library software that comes with the board and is also available free from the Symmetric Research website www.symres.com. For accurate timing information, a PARGPS timing unit and its software is also required.
Setup
Follow any instructions given in the official documentation to get Earthworm up and running.
The first step in adding PARxCH data is to install the PARxCH with GPS software. This can be done by unpacking the pxgpsw2k.zip or pxgpslnx.tar file and running the included install script to copy the SR software to the \sr\parxch and \sr\pargps directories. Linux users should substitute /usr/local/sr/parxch for references to the \sr\parxch directory.
You will also need to install the PARxCH and PARGPS device drivers using the indriver utilities from their respective driver subdirectories. See the readme files in the \sr\parxch\driver and \sr\pargps\driver directories for more information.
Then hook up the A/D hardware. Make sure it is working correctly by running the diagnostic program in the \sr\parxch\diags directory. The acquisition programs in the \sr\parxch\scope and \sr\parxch\simple directories can also help in checking out a new system.
To add the PARGPS (optional but recommended), first install the PARGPS device driver using the indriver utility provided in the PARGPS software. See the readme file in the \sr\pargps\driver directory for more information. Then hook up the PARGPS hardware. Make sure it is working correctly by running the diagnostic program in the \sr\pargps\diags directory.
Once Earthworm and the PARxCH/PARGPS are working on their own, it's time to get them working together. Edit the srparxchewsend.d configuration file settings so they are appropriate for your system.
At this time, you will probably also want to edit some additional Earthworm module configuration files to handle the PARxCH data that will be coming. This might include adding tanks for the PARxCH data in wave_serverV.d if the data is to be saved on the same computer or setting the PARxCH channels in export_scn.d if the data is to be exported to another computer.
In the beginning, it is probably best to use two separate command prompt windows. In the first, run startstop to start Earthworm. In the second, type "srparxchewsend srparxchewsend.d" without the quotes to start the PARxCH acquiring and sending data.
You can check the log files and run diagnostic programs like sniffring to help diagnose any problems. If something isn't going right, it is easy to stop SrParxchEwSend, modify its configuration file, and restart it without having to stop the rest of Earthworm. Once you've got your parameters set right, then go ahead and have startstop control SrParxchEwSend too.
Compiling
SrParxchEwSend is written in C and is compiled and linked using the standard Earthworm makefiles such as makefile.nt. In order to successfully compile, access to the PARxCH and PARGPS system software is required. This software, including source, is included with every PARxCH and PARGPS purchase. It is also available for free download from the Symmetric Research website www.symres.com.
All Symmetric Research software, including the PARxCH system software and SrParxchEwSend, has been designed so a single set of source code can service different operating systems. This is accomplished primarily through the use of conditional compilation which selects OS specific code at compile time based on which SROS_xxx setting is defined. Valid options include SROS_WIN2K (for both Windows 2000 and XP) and SROS_LINUX. Solaris is not available.
Although using a PARGPS timing unit is optional, it is recommended. Even if you are not using the PARGPS, you should always install the PARGPS software and define GPS_AVAILABLE when compiling the PARxCH and SrParxchEwSend software, so the timing portions of the code are included.
More Info
General questions about Earthworm are probably best answered by the official Earthworm User's discussion group. But, if you have specific questions about SrParxchEwSend and its configuration parameters, please let us know at info@symres.com.

Module Index | SrParxchEwSend Commands