silicondosa/myosyn

iss #002 : Reading muscle tensions and encoder angles only work when all muscles use one NI device/slot

silicondosa opened this issue · 3 comments

Right now, readMuscleTension() and readTendonExcursion() only perform QuickDAQ/NI read operations on one device (using devNum, and that too only when leader muscle channel calls them).

This needs to be fixed when we need to read from multiple device numbers when reading muscle tensions or tendon excursions

Consider implementing a isStale(devNum, I/O type, pinNum) function in quickDAQ which returns 1 if values have already been read/write after a trigger call. These values need to reset to 0 after each trigger (syncSampling) call and set after read/write.

Issue needs new functionality in quickDAQ (opened iss#14 in quickDAQ library) to be solved.

In truth, NI DAQmx only requires the taskHandler to read all devices/pins of a task.

So, we need a way for DAQmx to call (read/write) all devices/pins using a function call that relies on the task instead of the devNum. This is the more elegant solution than implementing an isStale function (see quickDAQ/iss#15)