Fluid Components International GF90_GF92 User Manual
Page 51

Doc. No. 06EN003229 Rev. H
47
GF Series Flow Meter Models GF90/GF92
FLUID COMPONENTS INTERNATIONAL LLC
http://www.fluidcomponents.com
IF NOT EOF(1) THEN
' LOC(1) gives the number of characters waiting.
GFInput$ = GFInput$ + INPUT$ (LOC(1), #1)
' Gather at least one full display of information
IF INSTR(GFInput$, "CH1:") THEN
DO UNTIL INSTR(more GFInput$, "CH:")
moreGFInput$ = moreGFInput$ + INPUT$(LOC(1), #1)
LOOP
GFInput$ = GFInput$ + moreGFInput$
' Parse and print the flow rate and temperature
n% = INSTR(GFInput$, "CH:")
FlowRate! = VAL(MID$(GFInput$, n% +5))
n% = INSTR(GFInput$, "CH2:")
Temperature! = Val(MID$(GFInput$, n% + 5))
PRINT FlowRate!, Temperature!
END IF
END IF
LOOP
CLOSE
' End communications.
END
error.trap:
RESUME NEXT
Figure 31A - Series Serial Communication Code Example Cont’d.