
Updates to miniGC (Pyxis) software (version for certification)
by Stefano Zampolli 2018/05/21-28


With v2 of the CNR-IMM miniGC-BTEX software (now Pyxis(R) software), several
updates are introduced. This document resumes the most relevant changes.


1) The flow measurement using Honeywell flow sensors was introduced, but it
is OPTIONAL and the software is compatible with previous miniGCs just by not
using this new flow measurement option.
Inside the miniGC_start script, the miniGC executable is called, and a new
optional command line parameter exists in v2: -samplevolume [VOL]
	where [VOL] is the target sample volume in cubic centimeters.
Once this sample volume is reached, the sampling pump is turned off.
IF the user specifies the optional -samplevolume parameter, it is MANDATORY
that another file exists in the same directory, named flowsensors.txt.
This text file specifies the I2C addresses of the sensors, the multiplicative
factor depending on the model/fullscale of the flowsensor, and the time at 
which the sampling starts within a cycle.
  THIS TEXT FILE IS VERY STRICTLY FORMATTED, NO BLANK LINES OR COMMENTS MAY BE
  INTRODUCED. IT IS READ BY VERY SIMPLE CODE, EXPECTING THE FILE IS EXACTLY
  FORMATTED! Tabulator spacing between I2C address and multiplicative factor!
	----- Example of Flowsensors.txt file ----------
	Line1:	FS1: 0x49	1875.0
	Line2:	FS2: 0x29	500.0
	Line3:	SAMPLING_STARTTIME: 320
	--- End of example Flowsensors.txt file --------
  Lines1&2: the first part is the I2C address of FlowSensor1 (PreConc) and of
	    FlowSensor2 (GC/detector)
  Lines1&2: the second part is the multiplicative factor sensor_fullscale_flow/0.4
	    in this case: PC sensor fullscale = 750 -> factor = 750/0.4 = 1875.0
		   	          GC sensor fullscale = 200 -> factor = 200/0.4 =  500.0
	    in the case   GC sensor fullscale =  40 -> factor =  40/0.4 =  100.0
  Line3:    The sampling starts 20s after end of pre-concentrator cleaning = 320s
+ For every cycle, a NEW is saved in the output file directory (Flows*.dat)
logging the 1min average of both flow sensors' data.


2) included a script (measure_flow) which sets the device into the two fluidic
states (sampling and inject), and measures the flows accurately with 200pts
averages after 10s stabilization times. From the output to console you can
extract:
	a) that the fluidic performs well: GC flow increase during injection
	b) a suggested sample volume to set, accomodating some tolerance


3) The start times of all files (TC6*.log and PID*.dat) is always HH:MM:00: 
it is always specified starting at 00 seconds to allow finding the files 
more easily.


4) The location of the runtime data directory was changed from /miniGC_rt
to /run/miniGC_rt
For old systems, fstab should be modified accordingly, as well as the
symbolic link /var/www/html/data -> /run/miniGC_rt


5) In the PanicLog file, we now try to report the offending command reply!
   Not tested yet.


6) Changed main loop timer interval to accomodate flow readings: 
   from 80ms to 60ms (if flow sensors are used)


7) Various bug fixes.

.end
