15import isystem.connect
as ic
16from isystem.connect
import IConnectDebug
22cmgr = ic.ConnectionMgr()
23cmgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
25debugCtrl = ic.CDebugFacade(cmgr)
28debugCtrl.runUntilFunction(
'main')
29debugCtrl.waitUntilStopped()
33daqCtrl = ic.CDAQController(cmgr)
36daqInfo = daqCtrl.info()
38if daqInfo.getMaxItems() == 0:
39 print(
'No DAQ items exist!')
42print(
'MaxItems = ', daqInfo.getMaxItems())
44daqVariables = ic.DAQConfigVector()
47daqVariables.append(ic.CDAQConfigItem(4, 0, 0x400001a8, ic.CDAQController.daqSample1s))
50daqVariables.append(ic.CDAQConfigItem(
'main_loop_counter'))
52daqCtrl.configure(daqVariables)
55daqTimeStart = daqCtrl.status().getTime()
58daqCtrl.enableGlobal(
True)
62 daqStatus = daqCtrl.status()
64 if daqStatus.getNumSamplesAvailable() > 0:
65 print(
'Max DAQ acquisition time = ', str(daqStatus.getLastLoopTime()))
66 if daqStatus.getOverflow():
67 print(
'SAMPLING OVERFLOW!')
70 daqSamples = ic.DAQSampleVector()
71 daqCtrl.read(daqSamples)
73 print(
'Number of samples = ', str(daqSamples.size()))
74 for daqSample
in daqSamples:
76 print(
' index =', str(daqSample.getIndex()),
77 ' data =', hex(daqCtrl.getDataValue(daqSample).getLong()),
78 ' time =', str((daqSample.getTime() - daqTimeStart)))