Linear scale display encoder.xx.position - Resolved

More
16 Mar 2024 17:42 #296078 by slowpoke
Hi, I'm looking for documentation and/or advice for setting up linear scales.
  • I'm using the Axis interface
  • I'm using a Mesa 7i95t that has differential inputs for up to 6 encoders.
  • I have Ditron magnetic scales installed and working with a Ditron D80 display, so no guessing on where the table is.
  • I made a little PCB that splits the differential quadrature signals from the read head and sends the signals to both the D80 & Mesa
  • I'm using ac servos that accept step & direction signals. The servo has a rotary encoder that sends actual position back to the servo driver independent of LinuxCNC (so like a stepper except it's pretty much guaranteed to get to where it was command to go. The servo's are all calibrated and moving as commanded by LinuxCNC (ignoring ballscrew backlash). Eventually I would like to have LinuxCNC close the outer loop using the linear scale position data to eliminate the ballscrew backlash error.

Step 1  is to display in Axis (and calibrate as required) the linear scale information being fed to the encoder 0 input on the 7i95t.

Links to documentation or suggestions are welcome.

When step 1 is working and calibrated, step 2 will be try closing the loop using the now proven position feedback.

Thanks in advance.

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

More
16 Mar 2024 18:44 #296084 by andypugh
It is likely that the config wizard has set up the stepgens to use a PID component with feedback from the stepgen position.
If you just replace that feedback with the actual axis positopn from the encoders, it should just work. You might need to slightly tweak the PID parameters (I would guess a tiny bit of I gain to take out steady-state offset)
The following user(s) said Thank You: slowpoke

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

More
16 Mar 2024 19:22 - 24 Mar 2024 22:41 #296090 by slowpoke

It is likely that the config wizard has set up the stepgens to use a PID component with feedback from the stepgen position.
If you just replace that feedback with the actual axis positopn from the encoders, it should just work. You might need to slightly tweak the PID parameters (I would guess a tiny bit of I gain to take out steady-state offset)
 
 


For my setup, LinuxCNC needs to know both:
1) my servo rotary encoder scale, presently 50823, yields correct servo movement.
2) my linear encoder scale, I'm using a 5um (0.00019685") scale, so perhaps I should try 1/0.00019685 = 5080.01016 for the Encoder value?

It's not obvious how LinuxCNC knows what Mesa encoder input (there are 6) to map to the X axis?

I would prefer to setup the linear encoder in display mode to verify it matches the Ditron DRO before trying to use it in the control loop, is that  possible?

Update:
After setting setp hm2_7i95.0.encoder.00.scale to -5080, I was I was able to get the hm2_7i95.0.encoder.00.position showing (using Hal Show), and the Linux position matches the external Ditron DRO, so getting the linear scale values as seen by LinuxCNC was as simple as that.
Now that I know the linear scales are scaled and working correctly, I'm now ready to close the loop.

Thanks,
Attachments:
Last edit: 24 Mar 2024 22:41 by slowpoke.

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

Time to create page: 0.072 seconds
Powered by Kunena Forum