MPG for positioning and FRO control

Moderators: TomKerekes, dynomotion

Post Reply
Posts: 19
Joined: Sun Aug 21, 2022 11:22 pm

MPG for positioning and FRO control

Post by gui_marchioro » Fri Sep 23, 2022 10:51 am

Hello everyone,

I am configuring the interface of KFLOP and an MPG controller (wiring scheme attached) and I would like to know if there is any example of C program where:
- when the Control switch is pressed the encoder control axis position.
- when the Control switch is released the encoder control FRO.



User avatar
Posts: 2003
Joined: Mon Dec 04, 2017 1:49 am

Re: MPG for positioning and FRO control

Post by TomKerekes » Fri Sep 23, 2022 6:20 pm

Hi Guilherme,

No I'm not aware of such a C program.

When the Control Switch is released you might accumulate the Position changes in a variable and then periodically use that to change the FRO. You might see the SetFROwithPot.c example for something similar.

It can be tricky how to handle when on-screen controls can change things as well as external things. So you need to decide how to handle two things setting the same thing. Do you want both to be active? Maybe use PC_COMM_SET_FRO_INC to just increment and decrement the On-Screen FRO instead of setting it.


Tom Kerekes
Dynomotion, Inc.

Posts: 82
Joined: Mon Jun 01, 2020 11:01 am

Re: MPG for positioning and FRO control

Post by cemoa9 » Mon Sep 26, 2022 7:08 pm

Hello Guilherme,

You can check the init file of my Mazak or Stama, they have similar function. (available on the forum in the machines presentation)



Post Reply