For very fast (e.g. 10Hz) data acquisition, binary communication is suggested. Otherwise, plain-text (ASCII) communication is preferable.
The program tsi4043_ascii.cr6 demonstrates plain-text
data acquisition from a TSI model 4043 flowmeter. It also demonstrates real-time
derivation of the Reynolds number (turbulence indicator) and an estimate of the
sample travel (lag) time through the inlet line.
The following programs demonstrate querying a TSI model 4043 flowmeter for data in binary format:
tsi4043_binary.cr3(original code)tsi4043_binary.cr6(adapted)
The CR3000 code hasn't been revised with new error handling code yet.
Record parsing isn't very reliable because of the choice of SerialInRecord and
the fact the delimiter is a valid data value... suggested improvements:
- check for case of 5 bytes returned by SerialInRecord and instead of throwing out record, just load bytes into Longs in alternate way
- or, instead, switch to
SerialInBlockand adapt parsing to throw away delims
Original notes available in PROPHET 2014 FIS DAQ write-up.
Because SerialInRecord looks for a leading null byte (0x00) to delimit data
records, if the flow is zero (0.00) then that data word is effectively discarded.
To avoid temperature and pressure data being incorrectly loaded into corresponding
flow and temperature positions, check to ensure the absolute pressure is never
zero.

