closed loop count position mode

2 years 2 months ago #29533577 by kacox
Hello

I have both closed loop count position and closed loop speed position working independently on my FBL2360. Normal operations for my system is to be able to switch from one mode to another rapidly (within ms). I seem to have trouble transitioning from closed loop speed position (6) to count position (3) My script essentially does the following:
^MMOD 1 6 ' closed loop speed position
!G 1 1000 ' lots of G commands to do stuff
^MMOD 1 3 ' closed loop count position
!P 1 3000 ' Move to count position 3000 (system doesn't respond to this command or any P commands after from script or console)

The system stops responding to the P command, It holds its current position but does not move to the new position. Does something happen in the transition between modes that I need to wait on?

Kevin

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

2 years 2 months ago #29533578 by Gabriel_Isko
Replied by Gabriel_Isko on topic closed loop count position mode
Hmm, normally I would ask you to post your configuration profile and script for me to trouble shoot, but I am going to be away from my test bench for a few days.

If I am understanding your application correctly, you are using count position mode to return to kind of a home position, correct?

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

2 years 2 months ago #29533586 by kacox
Yes I am using count position to move to an absolute encoder position. I use closed loop speed position mode to drive the system with a joystick. So after some more trouble shooting I noticed that when I execute ^MMOD 1 6 to put the system in closed loop speed mode it zeros out the encoder count (well not quite - drives it to 14 ticks or so). Is this expected behavior? Obviously that won't work when I try to go back into count position mode.

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

2 years 2 months ago #29533587 by kacox
Itried to save the encoder value before changing modes and then set it to the saved value after the mode change, but that didn't work. Firmware seems to get confused.

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

2 years 2 months ago #29533597 by Gabriel_Isko
Replied by Gabriel_Isko on topic closed loop count position mode
We have documented some unnexpected behavior when trying to change counter values while in a closed loop mode that is relying on the counter for position feedback. I would recommend using an intermediary step where you switch to open loop and cut power to the output channel before you switch to count position mode.

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

2 years 2 months ago #29533612 by kacox
I only tried changing the encoder value to see if it would get me beyond the problem. Normal operation for my system is to just flip between the two modes without loading the home counter or changing encoder values. I still don't understand why changing back and forth from closed loop count to closed loop speed position modes should fail as they are both closed loop operations. It looks like the problem is the MMOD command to start closed loop speed position mode unnecessarily changes the encoder value to zero. Cutting power is not an option. We need to always apply power to the motors to hold position. The only other option I have is to keep the system in speed position mode and create my own PID loop with Micro Basic that slews to position, which is exactly what count position mode does. Is this my only option?

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

2 years 2 months ago - 2 years 2 months ago #29533635 by Gabriel_Isko
Replied by Gabriel_Isko on topic closed loop count position mode
Yes, that is currently the recommended workaround.

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

Moderators: tonysantoni
Time to create page: 0.100 seconds