○ 12: 1,000,000 - only valid when a single channel is enabled
● type: trigger type - string with following values
○ 'auto'
○ 'normal'
● edge: trigger edge - string with the following values
○ 'rising'
○ 'falling'
● level: trigger level - numeric 12 bit value with a valid range of 0 to 4095. This corresponds to -12V to +
12V. Use the following equation to convert from volts to a numeric level:
○ 2048 • (1 + Vtrigger / 12)
The oscilloscope mode functions are:
● startOSC(addr) - enable oscilloscope mode on selected DAQC2plate
● stopOSC(addr) - disable oscilloscope mode on selected DAQC2plate
● setOSCchannel(addr, C1, C2) - select which channels to sample
● setOSCsweep(addr,rate) - select sample rate used during sweep
● getOSCtraces(addr) - download the sampled data from the DAQCplate
● setOSCtrigger(addr,channel,type,edge,level) - setup the trigger for the sweep.
● trigOSCnow(addr) - do immediate trigger of oscilloscope. This is typically used when no trigger occurs
for a predetermined amount of time.
● runOSC(addr) - start a sweep sequence
● DAQC2.getOSCtraces(addr) - fetch the captured oscilloscope data from the DAQC2plate. This will
12-bit integer values located in two lists: trace1 and trace2.
Assuming a DAQC2plate set to address 0, the basic sequence of steps to generate a single trace on channel 1
looks like:
import piplates.DAQC2plate as DAQC2
DAQC2.startOSC(0) #enable oscope
DAQC2.setOSCchannel(0,1,0) #use channel 1
## Set up trigger:
## Use channel 1
## Normal trigger mode (don't collect data until trigger conditions are met)
## Trigger on rising edge of waveform
## Trigger at 0.0 volts
DAQC2.setOSCtrigger(0,1,'normal','rising',2048)
## setup sample rate for 10,000 samples per second
DAQC2.setOSCsweep(0,6)
DAQC2.intEnable(0) #enable interrupts
DAQC2.runOSC(0) #start oscope
## Wait for sweep to complete by monitoring Ocsope interrupt flag
dataReady=0
while(dataReady==0):
if(DAQC2.GPIO.input(22)==0):
dataReady=1
DAQC2.getINTflags(0) #clear interrupt flags