_EHOME Command

3 years 8 months ago #29534915 by ksetty
_EHOME Command was created by ksetty
Good day, I am having problems programming my MDC 2460 controller. I have connected the controller to a receiver which is sending 4 pulse inputs to control and configure the motor I am controlling. I am only controlling one motor, which is connected to an encoder and is in closed loop position relative mode. I am controlling the motor using one of the pulse inputs. The other pulse inputs are being used to control other procedures which are working fine. I am attempting to use MicroBasic scripting to allow for the reconfiguration of the motor. I am attempting to change the max limits and minimum limits of the motor, so the number of revolutions of the motor can be changed using the receiver. This is working fine, however when I do so, naturally the motor position the motor is in when the pulse input which is controlling the motor is neutral (1500 microseconds) sets to a different position of the motor, since, in most cases, the motor revolutions to the left are not equal to the revolutions to the right. I assumed reconfiguring the encoder home count (using _EHOME) would change where the motor position would be when the pulse input is at its centre, but this is not the case. I understand I have likely not understood the purpose of the encoder home count, but am still trying to find a means to produce the same result.
So I basically am asking for a means to either keep the position of the motor when the pulse input is at its centre to be the same or to reprogram it using MicroBasic scripting.

The following is the manner in which I changed the encoder max limit (which works):
TempEncoder = GetValue(_C, 1)
SetConfig(_EHL, 1, TempEncoder)

The following is the manner in which I changed the encoder max limit (which works):
TempEncoder = GetValue(_C, 1)
SetConfig(_ELL, 1, TempEncoder)

The following is the manner in which I changed the encoder home count, which is not producing the result I expected:
TempEncoder = GetValue(_C, 1)
SetConfig(_EHOME, 1, TempEncoder)

Note: The operating mode had been changed to open loop to make these changes and were set back to closed loop afterwards.

Please Log in or Create an account to join the conversation.

Time to create page: 0.051 seconds