[3.6.0beta.2] Unable to Access Object for positionError
-
I'm attempting to calibrate an axis using the encoder position error(with 1HCL board). To achieve this, I need to access the boards[].drivers[].closedLoop.positionError parameter.
Initially, I found it located at:
boards[1].drivers[0].closedLoop.currentFraction.positionErrorHowever, when I try to retrieve its value using boards[1].drivers[0].closedLoop.currentFraction.positionError.value with echo, it doesn't return anything.
Could someone guide me on how to properly access and read the encoder error value?
-
Thanks in advance!
-
@Paski remove the ".value" from your expression.
-
@dc42
It's curious that when accessing the average error (boards[1].drivers[0].closedLoop.currentFraction.avg), the output is a value. However, for positionError, it seems to return an object.Interestingly, both are specified as value in the object model of the DWC.
Am I correct in assuming that the real-time PID error is part of the positionError? How can i acess that?
Thanks!
-
@Paski are you running the Duet in standalone or SBC mode? If SBC mode have you checked that you are running the same versions of RRF, DSF and DWC?
You can use M409 to see what fields RRF provides in the object model, e.g.
M409 K"boards[1].drivers[0].closedLoop"
. The fields shown in the DWC Object Model Browser should be the same if you are running compatible software versions. -
Hi @dc42,
I was running in standalone mode.
Thanks for the "M409 K"boards[1].drivers[0].closedLoop" command; it revealed an incompatibility with the DWC, which was resolved after an update.BR.
-
-