You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from VeheMencE import *
import time
# for this test, some input is connected to src0 and the output2 is connected to src1.
# we use the pulser B as a 0.1s gate for the scaler
vme = VmeUsbBridge()
# configure the scaler
scaler = vme.getScaler()
scaler.limit = 1000
scaler.autoReset = False
scaler.hitSource = CVIOSources.cvInputSrc0
scaler.gateSource = CVIOSources.cvInputSrc1
scaler.resetSource = CVIOSources.cvManualSW
scaler.configure()
# configure the pulser
pulserB = vme.getPulser(CVPulserSelect.cvPulserB)
pulserB.period = 2
pulserB.width = 1
pulserB.units = CVTimeUnits.cvUnit104ms
pulserB.pulseNo = 1
pulserB.startSource = CVIOSources.cvManualSW
pulserB.stopSource = CVIOSources.cvManualSW
pulserB.configure()
# configure the output line
vme.configureOutputLine(CVOutputSelect.cvOutput2,CVIOPolarity.cvDirect,CVLEDPolarity.cvActiveHigh,CVIOSources.cvMiscSignals)
# make a measurement: start the pulser, wait 1s, and read&reset the scaler.
pulserB.start()
time.sleep(1)
print scaler.count()/1.04
scaler.resetCount()
More examples should be added, especially in python.
The text was updated successfully, but these errors were encountered: