Advanced Search

Search Results (Searched for: )

  • Ismacr63
  • Ismacr63
03 Apr 2025 07:03

Porbe basic lathe: Questions about the keyboard

Category: QtPyVCP

I'm on the stable version
  • Boogie
  • Boogie
03 Apr 2025 06:04

ENCODER_RATIO function implementation.

Category: General LinuxCNC Questions

Gents,

Continuing my learning process of LinuxCNC and Mesa cards i've managed (thank you PCW and tommylight!), to start my permanent magnet DC servomotor driven by BTS7960 H-bridges, all hooked up to Mesa 7i95T on the test bench.
forum.linuxcnc.org/configuration-tools/5...-bridges-pmdc-servos

Did some basic PID tuning and motors are not reaching following errors. Ferror is loose however - fine tuning not required at this stage.
On my learning short list now there is two topics:
1) encoder-ratio module
2) Mesa THCAD card. As I'm powering my motors and limit/home switches from old laptop power supply - its voltage sags easily when loading servos so found it good opportunity to practice THCAD and PyVCP by reading power supply voltage and present it on AXIS. 

Ad 1) While reading LinuxCNC documentation i found an interesting function ENCODER_RATIO. First thought was "hey! let's do some experiment and slave Z axis servo to X.". Let's say the final idea is to link spindle encoder with rotary/dividing head servo - i can imaging hobbing gears like that:)
Experiment conditions:
- there is three servos available X, Y, Z so three encoders, all the same ppr = 400
- X will be the master, Z will be slave
- i want Z to turn 4 times slower than X

If i understand the documentation right i did the following:
- detached joint.2.motor-pos-cmd from pid.z.command
- detached hm2_7i95.0.encoder.02.position from pid.z.feedback and joint.2.motor-pos-fb
- connected pid.z.feedback and joint.2.motor-pos-fb with encoder-ratio.0.error
- decided to use one of the switches for slave axis on/off so detached remote e-stop (will not using it now) input hm2_7i95.0.inmux.00.input-06-not and hooked it up to encoder-ratio.0.enable
- connected master axis (X) encoder signals A and B to encoder-ratio.0.master-A and encoder-ratio.0.master-B
- connected slave axis (Z) encoder signals A and B to encoder-ratio.0.slave-A and encoder-ratio.0.slave-B
- set ratio by stating ppr: encoder-ratio.0.master-ppr 400 and encoder-ratio.0.slave-ppr 100

AXIS started with no issues. Checked HAL configuration and what i can see is:
- encoder-ratio.0.master-A and B signals are successfully connected to X encoder
- encoder-ratio.0.enable is ok - turning TRUE when switch is activated by me

And i failed successfully:)
- i can see no change on pid.z.feedback as well as on pid.z.output when i move X axis - no change on encoder-ratio.0.error 

I thing i'm not getting fully what manula says about encoder_ratio. i couldn't find any HAL examples showing correct configuration.
What i found is that unfortunatelly encoder-ratio.0.master-ppr and encoder-ratio.0.slave-ppr are PARAMETERS, not PINS so no chance to make nice 'change ratio' option in PyVCP (imagine you can input different spindle/slave axis ratio and hob whatever spur gear you want!). The only option i see it close LinuxCNC, edit ppr numbers and re-start LinuxCNC to get ratio i want.

My idea was to have motorized dividing head connected and with just one switch make it move in sync with spindle @ required ratio...So it is basically ELS. Ehmmm those dreams.

Anyway, please! Could you guys look at it and poke me in good direction? I did research and tried by myself before i bother you but, as i said before, failed successfully:)
Thank you.
  • RushA
  • RushA
03 Apr 2025 05:55
Replied by RushA on topic How to access rt pins in user space

How to access rt pins in user space

Category: General LinuxCNC Questions

hi, thanks!
Is there any code or links to refer to?
  • RushA
  • RushA
03 Apr 2025 05:50
Replied by RushA on topic How to access rt pins in user space

How to access rt pins in user space

Category: General LinuxCNC Questions

hi,here's another question. I want to read from and write to the module (for example the shared memory module in realtime space) through pins in user space.How can I solve the problem? Is there any code about this?
  • ffffrf
  • ffffrf
03 Apr 2025 05:45

Using a servo as a spindle and positional axis - keep getting vague errors

Category: Advanced Configuration

sadly so yes, although i cannot help but think there must be a simpler way to do this with mux, just somehow switch between position and velocity modes depending on an input
Displaying 17491 - 17495 out of 17495 results.
Time to create page: 0.927 seconds
Powered by Kunena Forum