Programming Examples | 9 |
'The following commands are not executed and are shown for reference
'purposes only. To execute these commands, uncomment them.
'RUN_STOP - (not executed in this example)
'- RUN starts the acquisition of data for the active waveform
'display.
'- STOP stops the data acquisition and turns off AUTOSTORE.
'Start data acquisition.
'err = viVPrintf(vi, ":RUN" + vbLf, 0)
'Stop the data acquisition.
'err = viVPrintf(vi, ":STOP" + vbLf, 0)
'VIEW_BLANK - (not executed in this example)
'- VIEW turns on (starts displaying) a channel or pixel memory.
'- BLANK turns off (stops displaying) a channel or pixel memory.
'Turn channel 1 off.
'err = viVPrintf(vi, ":BLANK CHANNEL1" + vbLf, 0)
'Turn channel 1 on.
'err = viVPrintf(vi, ":VIEW CHANNEL1" + vbLf, 0)
'TIMEBASE_MODE - (not executed in this example)
'Set the time base mode to MAIN, DELAYED, XY, or ROLL.
'Set time base mode to main.
'err = viVPrintf(vi, ":TIMEBASE:MODE MAIN" + vbLf, 0)
End Sub
'
'Capture
'
'We will capture the waveform using the digitize command.
'
Private Sub Capture()
'AQUIRE_TYPE - Sets the acquisition mode, which can be NORMAL,
'PEAK, or AVERAGE.
err = viVPrintf(vi, ":ACQUIRE:TYPE NORMAL" + vbLf, 0)
'AQUIRE_COMPLETE - Specifies the minimum completion criteria for
'an acquisition. The parameter determines the percentage of time
'buckets needed to be "full" before an acquisition is considered
'to be complete.
err = viVPrintf(vi, ":ACQUIRE:COMPLETE 100" + vbLf, 0)
'DIGITIZE - Used to acquire the waveform data for transfer over
'the interface. Sending this command causes an acquisition to
'take place with the resulting data being placed in the buffer.
'NOTE! The DIGITIZE command is highly recommended for triggering
'modes other than SINGLE. This ensures that sufficient data is
Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Reference | 571 |