Programming example
The following program fragment stores 20 readings into the buffer and then calculates the
mean average on the buffer readings:
‘ Store Readings:
CALL SEND(7,“:trac:poin 20”,status%) ‘Set buffer size to 20.
CALL SEND(7,“:trac:feed sens”,status%) ‘Store raw input readings.
CALL SEND(7,“:trac:feed:cont next”, status%) ‘Start storing readings.
CALL SEND(7,“:trac:data?”,status%) ‘Request all stored
‘readings.
reading$ = SPACE$(80)
CALL ENTER(reading$, length%, 7, status%) ‘Address 2182 to talk.
PRINT reading$ ‘Display all buffer
‘readings on CRT.
‘ Calculate Mean of Buffer Readings:
CALL SEND(7,“:calc2:form mean”,status%) ‘Select mean calculation.
CALL SEND(7, “:calc2:stat on”,status%) ‘Enable mean calculation.
CALL SEND(7, “:calc2:imm?”,status%) ‘Perform calculation and
‘request result.
reading$ = SPACE$(80)
CALL ENTER(reading$, length%, 7,status%) ‘Address 2182 to talk.
PRINT reading$ ‘Display all buffer
‘readings on CRT
6-6 Buffer