7Formats and Data Flow
256 Keysight 53220A/53230A User’s Guide
– when count number of readings have entered reading memory, bit 12 (Rdg
Mem Threshold) in the Standard Operation Register is set to ‘1’. By monitoring
this bit, readings can be transferred from memory to the output buffer once a
given number of measurements have occurred.
Once the threshold is reached, the number of readings in memory must drop
below the threshold level in order to detect when the threshold is reached again.
Memory threshold example
(Note, this example is also contained on the Keysight 53210A/53220A/53230A
Product Reference CD ROM.)
This program sets up the counter to take 1,250,000 readings. Because volatile
reading memory capacity is 1,000,000 readings, readings will be over-written
(memory overflow) if data is not retrieved before memory fills. To prevent memory
overflow, a reading threshold is set and monitored. When the number of readings
in memory reaches the threshold, all readings in memory at that time are
retrieved.
*RST;*CLS // reset, start from known state
SYST:TIM .001 // set a 1 ms measurement timeout
CONF:FREQ 1E6, 0.1, (@1) // configure measurements
TRIG:COUN 5 // send 5 system triggers
SAMP:COUN 250E3 // take 250k readings/trigger
FORM:DATA REAL, 64 // set data format to binary
DATA:POIN:EVEN:THR 10E3 // set memory threshold to 10k
INIT // initiate readings
// loop until all readings complete
For (cnt=0;cnt<1.25E6;cnt +=10000)
Do
{spoll=STAT:OPER:COND?; // serial poll condition reg
sleep (100) // wait 100 ms
}while !(spoll&4096) // repeat until threshold is reached
R? 10E3 // retrieve readings from memory 10k at a time