Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

The missing functions in DAQmx base

In DAQmx base,

 

DAQmx_Val_Acquired_Into_Buffer is not exists.

(I confirmed with NIDAQmxBase.h).

 

Is there any way to use the function or similar alternative?

If any alternative of 'DAQmx_Val_Acquired_Into_Buffer' exists, I should use that.

(for using callback as below.)

 

class CallbackTask(Task):
def __init__(self):
Task.__init__(self)
self.data = zeros(1000)
self.a = []
self.CreateAIVoltageChan("Dev1/ai0","",DAQmx_Val_RSE,-10.0,10.0,DAQmx_Val_Volts,None)
self.CfgSampClkTiming("",10000.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1000)
self.AutoRegisterEveryNSamplesEvent(DAQmx_Val_Acquired_Into_Buffer,1000,0)
self.AutoRegisterDoneEvent(0)
def EveryNCallback(self):
read = int32()
self.ReadAnalogF64(1000,10.0,DAQmx_Val_GroupByScanNumber,self.data,1000,byref(read),None)
self.a.extend(self.data.tolist())
print(self.data[0])
return 0 # The function should return an integer
def DoneCallback(self, status):
print("Status",status.value)
return 0 # The function should return an integer

 

0 Kudos
Message 1 of 2
(866 Views)

Hi, 

I could not find a function that performs the same of similar task. The function is missing in your DAQmx, correct? You can try reinstalling the software and see if the function appears or not.

0 Kudos
Message 2 of 2
(716 Views)