TRex Motor Controller Current feedback

Hi,

I’m using a TRex dual motor controller in serial mode to drive two linear actuators with built in limit switches. Just to clarify, when they are fully retracted or extended they automatically switch off. So I was trying to use the current reading from the controller to detect these states. I’m using the compact protocol(0x8D, 0x8E), querying the controller every second. This seems to work fine, but when the actuator stops I keep receiving a current readind for quite some time until it gives the real value. I then activate the second motor and the reading I get stays at zero for some time and only then outputs the real value. It seems like it’s emptying some buffer.
Does any one have some idea?

Thanks.

Hello.

I am sorry you are having a problem with your TReX motor controller. The current readings for the TReX motor Controller update on the order of milliseconds and are not buffered, so that is definitely not expected behavior. Could you post the simplest program that still demonstrates the issue along with a video showing the behavior?

Grant

Hi Grant,

Getting the simplest program that still demonstrated the issue ended up being the solution. It was my fault, I was sending another query as soon as I got the 0x8D (0x8E) byte. And that was causing that buffer like behavior. Now it’s working just fine. I guess I understood it wrong, I was only expecting the measurement and not the initial byte.

Thanks for your prompt response,
Rui

1 Like