Hi,
I have an issue with my USB-6003 card and counter operation. Below is part of my Python script that I'm using. My understanding is that those CreateCICountEdgeschan and ReadCounterScalarU32 are needed. And actually those seems to work 'cause that initialCount value can be read with ReadCounter-function. I have learned that CfgDigEdgeStartTrig can no be used with counters, and instead of that ArmStartTrig should be used.
So I added SetArmStartTrigType(DAQmx_Val_DigEdge) between CreateCICountEdgesChan and StartTask but following error was printed out.
DAQError: Specified property is not supported by the device or is not applicable to the task.
Property: DAQmx_ArmStartTrig_Type
Task Name: _unnamedTask<F>
Status Code: -200452
in function DAQmxSetArmStartTrigType
datatype = ctypes.c_uint
data = datatype()
initialCount = 1
CreateCICountEdgesChan(devport, '', DAQmx_Val_Rising , initialCount, DAQmx_Val_CountUp )
#SetArmStartTrigType(DAQmx_Val_DigEdge)
StartTask()
ReadCounterScalarU32(-1, data, None)
Any ideas what might be wrong? With MAX this seems to work smoothly. I created Counter Input (Edge Count) and after rising edge the measured value is updated. And now my goal is to make this work with Python.
Thanks and regards,
Antti