Encoder feedback with step/dir - mesa 7i96e / JMC-JAND servo

More
02 Jan 2023 17:03 - 02 Jan 2023 17:04 #260776 by Helium
Hello, I have been trying to get encoder feedback working with a JMC servo motor, which is currently set up to use step/dir commands.

Now I did get the encoder feedback hooked up in the HAL file, however the default P setting (generated by PncConf) gives me horrible oscillations.
A low P setting seems to give much better results but there seems to be some amount of following error.

I would like to let linuxcnc know where the servo is located so I can turn off power to the motors when the machine is not in use and not have to worry about homing again afterwards because the Z axis drooped due to the brake not grabbing immediately.
Now that I noticed the actual following error (Not sure if that's normal when running step/dir as I assume there will be some delay due to the PID loops inside the drive) I don't know if I am supposed to tune the LinuxCNC PID.

If anyone here has experience with this sort of thing I would appreciate some help.
Attached are some screenshots of the HAL scope at various P gains

thanks in advance,
Arien

P=1000 FF1=1 (big oscillations)

 
File Attachment:


P=0 FF1=1

 
File Attachment:



P=25 FF1=1

 
File Attachment:

Last edit: 02 Jan 2023 17:04 by Helium.

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

More
02 Jan 2023 21:49 #260802 by PCW
I am afraid you will always have a following error spike during
acceleration/decceleration because of the relatively long (5 ms)
delay between command and motion on your drives.

Increasing the P term will increase the slope of the following
error towards 0 during motion, but cannot fix the error spikes
at the beginning and end of motion

Is there any input filtering on the drives that can be disabled?

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

More
02 Jan 2023 23:15 #260813 by Helium
Doesn't seem like there's much filtering that can be disabled, there is however a high speed input port that doesn't use opto isolators, but I'm not sure that's going to make all that much difference.

I'll hook the drive up to the PC tomorrow and see if there's anything to be done about it, it's also a drive that has one of those magnetic encoder things so there is additional processing time converting the 14 bit signal to a normal ABZ output as well.

Thanks so far.
Arien

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

More
03 Jan 2023 11:36 #260835 by Helium
There were unfortunately no filters that could be disabled.
Is the following error going to cause problems in any way? seeing as I am running the drives themselves in position mode I don't think I need to compensate for the delay in LinuxCNC (maybe depends on where in the system (most) of the delay takes place)
Though I could see issues with stuff like probing and rigid tapping if the lag is on the input side of the drive and not simply a delay in converting the 14 bit magnetic encoder signal to 2500ppr ABZ

I did notice the stepgens are set to ctrl_type 1 by default which I am assuming is velocity mode, changing it to 0 results in no movement of the motor and a subsequent following error error (which makes sense if the motor doesn't move)

Is there a specific reason for stepgen being in velocity mode with the default PncConf settings?

Thanks in advance
Arien

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

Time to create page: 0.063 seconds
Powered by Kunena Forum