900719_FOCE : User Documentation This page last changed on Mar 17, 2009 by graybeal. #### About FOCE, SIAM, and Linux The FOCE PC/104 stack runs Debian Linux, etch release, which is based on the Linux 2.6.18 kernel. On top of that, it runs SIAM. So, to interface with it as a user, you need to understand the SIAM utilities. The SIAM utilities are documented on this web page. The FOCE version of the SIAM application is called 'foce'. To run it, when the system boots, type 'gosiam' to get to the SIAM base directory, and then 'foce &'. The ampersand tells it to run in the background. That way you can use the same window to run the SIAM utilities. (When you are done, use 'exitNode loc' to stop the foce on the local node gracefully.) SIAM manages the FOCE instruments as SIAM instruments. Mostly, they are one-to-one. For example, each CTD is one FOCE instrument, as is the ADCP, the ADV, etc. The pH sensors were combined, so that all 4 (8 in the future) were considered one SIAM 'instrument'; as of March 2009, however, they are split out into separate instruments. The motor controllers, which are on a single RS-485 line, are one combined SIAM 'instrument'. SIAM instruments are identified by ISI ID (Instrument Service Infrastructure, or some such). Right now, the ISI IDs are: 1642 - CTD in the pH chamber 1643 - refers to the CPU itself, or the 'node' in SIAM parlance. This does not show up in the utilities, but is the parent of all other instruments 1644 - Nortek Vector ADV 1645 - RDI Workhorse ADCP 1647 - Both EZServo motor controllers (4 in the future) 1648 - FOCE power monitor 1649 - external CTD 1704,1705,1706,1707 - pH sensors 1646 - was ALL the pH sensors, as of March 2009 is nada #### Utilities There is a really great list of SIAM utilities. To see what instruments are running, and how many samples they've logged, use the command: listPorts loc -stats (note that 'loc' is shorthand for 'localhost'. All SIAM apps can be run from anywhere on the network, so a host name is needed). To see the data from any particular instrument, you need to know the ISI ID, as above. Make sure you're in the SIAM logs directory; you may need to type 'gosiam' and then 'cd logs'. Then to see e.g. the pH0 data (ID 1704), you'd type 'logView -utc 1704 .' To interpret the last command: logView is the utility name -utc tells it to print time as UTC (same as GMT). Otherwise, you get an unreadable format of milliseconds since 1/1/1970 1704 is the ID of the instrument. . tells it to find the data in the current directory. If you're not already in the logs directory, you could instead use ~ops/siam/logs #### About Instruments and Instrument Properties To learn what instruments are registered, you can use the command showRegistry loc Another useful SIAM concept is the fact that each 'instrument' (in the sense above) can have instrument properties. These are used like variables to change the behavior of the instrument sampling service. Instrument properties are all case sensitive. To set a property, use the command: setProperty loc <instrument> property=value Comments on the setProperty command: You must not have any space around the = sign loc is again short for localhost <instrument> needs to be identified by the serial or analog port. For example, the external CTD is /dev/ttyS4. The single pH sensor can be identified just as 'pH', but individual pH sensors must be identified as pH0, pH1, pH2, or pH3. ##### Properties common to all SIAM instruments sampleSchedule - period of sample loop, in seconds. Actually, this parameter understands a complex syntax that allows all sorts of aperiodic sampling, but a simple integer works best powerPolicy which can be "ALWAYS", "NEVER", or "WHEN_SAMPLING". I believe all our instruments are set to "ALWAYS" powerOnDelaySec - how long to wait, after the system starts up this service, to power on the instrument. This allows for power sequencing to manage inrush currents. ##### Properties exclusive to FOCE instruments The FOCE instruments have their own properties. These include: motorControl has motor1RPM and motor2RPM. These properties allow us to set the speed of each motor on the fly, in RPM pH has slopes, offsets, and correction0 through correction7. the pH drivers are written with the capability of serving multiple instruments (the original configuration); the default configuration now is one instrument per copy of the driver. **'slopes' and 'offsets' are arrays of doubles. They're set when the instrument software is built, and while they can be changed on the fly (see below), it's inconvenient, since you need to enter all of them at once. correction0..correction7 were created individually to allow them to be easily changed, one at a time. The utility script pH displays the data from the pH sensors.

Document generated by Confluence on Feb 03, 2026 14:29