Jrk 21v3 motor controllers in feedback mode

I’m on a team working on an autonomous submarine for a competition.
We’re currently working on getting the motors to run in a feedback mode for stability.
Our code is in C# using the SDK from the Jrk controllers page.
We’re currently having issues understanding how exactly feedback mode works, however. For example, one set of motors is intended to be controlled in relation to a depth sensor.
Our understanding of how it would work was that we could read the current feedback coming from the pressure sensor and set a target in relation to it to have the motor controller attempt to reconcile the feedback to the target, however, we don’t really understand how the setting of targets works while the motor controllers are in feedback mode.
Any insight you could provide would be much appreciated.
Thanks,
-Dylan

Hello, Dylan.

The way the jrk’s feedback works is described in the “PID Calculation Overview” section of the jrk user’s guide. Please take a look at it and let me know if any parts of that section are confusing or if you have any questions not covered there.

Basically the jrk’s PID algorithm attempts to make the Target equal to Scaled Feedback, and the definitions of those two variables depend on the jrk’s Input Mode and Feedback Mode, respectively.

I suspect that you don’t need to use the jrk’s feedback feature for this application but I’m not sure. If you described your goal a little more I could give you some advice on the best way to approach it.

–David