We've been trying to get a robotic arm to do an indentation materials test. It has a load cell on its end-effector, which is connected to a collection computer through a USB-6210. The Windows computer is using the C# DAQmx API to collect and calibrate force data, which we're trying to use to feedback the robotic arm (just a simple hold). The problem is there seems to be a slight delay (0.2 to 0.3 s) in the force measurement from the USB-6210 which is causing our control algorithm to overshoot the target force quite substantially, and also gives us very silly looking hysteresis curves (see below).
We've hit this with the kitchen sink in terms of reprogramming the sampling. So far we've used:
Asynchronous BeginReadSingleSample calls which recursively call themselves (basically copy and paste from the sample docs).
Asynchronous BeginReadWaveform, since apparently reading multiple samples is a bit more optimal. This again recursively called itself.
Asynchronous BeginReadMultiSample for the same reason.
Starting a separate thread that just runs a while loop that repeatedly calls ReadSingleSample from the multichannel reader.
I've attached a barebones C# class for a LoadCell object which implements solution 1 (this example doesn't have the teardown code for this object, which I've left out for brevity). This effectively samples at around 140 Hz on our machine; which would definitely be fast enough, were it not for this silly delay. Is there any known solution for this? What are all y'all thoughts?