def main(): try: cawave = CaChannel() cawave.searchw('cawave') t = (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19) l = [] for i in range(0,500): l.append(i) #cawave.array_put(t) #cawave.pend_io() cawave.putw(l) print(cawave.getw()) cawave.add_masked_array_event(None, None, ca.DBE_VALUE, getCallback, 0) cawave.pend_event() #cawave.clear_event() except CaChannelException as status: print(ca.message(status))
def main(): try: cawave = CaChannel() cawave.searchw('cawave') t = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19) l = [] for i in range(0, 500): l.append(i) #cawave.array_put(t) #cawave.pend_io() cawave.putw(l) print(cawave.getw()) cawave.add_masked_array_event(None, None, ca.DBE_VALUE, getCallback, 0) cawave.pend_event() #cawave.clear_event() except CaChannelException as status: print(ca.message(status))
Xmotor.searchw (FastMotor+'.VAL') XmotorState.searchw (FastMotor+'.DMOV') XmotorStart.searchw (FastScan+'.P1SP') Xstep.searchw (FastScan+'.P1SI') XmotorSpeed.searchw (FastMotor+'.VELO') Zmotor.searchw (SlowMotor+'.VAL') ############## this should be changed ZmotorState.searchw (SlowMotor+'.DMOV') ############## this should be changed Zstart.searchw (SlowScan+'.P1SP')############## this should be changed Zstep.searchw (SlowScan+'.P1SI')############## this should be changed NumSlow.searchw (SlowScan+'.NPTS')############## this should be changed NumFast.searchw (FastScan+'.NPTS') # Do the things that need to be done once before the beginning of the scan ##sisPreScale.putw=Xstep.getw()*20000 nSlow = NumSlow.getw() nFast = NumFast.getw() buffPerRow = (nFast + 1)/124 + 1 netCDFNumCapture.putw(buffPerRow) netCDFFileNumber.putw(1) netCDFFileName.putw(FileName + '\0') # Need to null terminate netCDFSaveMode.putw(2) netCDFCapture.putw(1) sisPixels.putw(nFast) xmapPixels.putw(nFast) for i in range(nSlow): netCDFCapture.putw(1) XmotorSpeed.putw(FastSpeed) Xmotor.putw(XmotorStart.getw()) position=Zstart.getw()+Zstep.getw()*i