machinekit-cnc icon indicating copy to clipboard operation
machinekit-cnc copied to clipboard

Motion has no real IO pins

Open ArcEye opened this issue 7 years ago • 5 comments

Issue by machinekoder Tue Jan 20 07:29:58 2015 Originally opened as https://github.com/machinekit/machinekit/issues/451


The motion component exposes input as well as output pins to HAL. However, the component has no real IO pins supported by HAL. For some applications it is necessary to use IO pins instead of output pins as they do not force a certain value upon a signal.

For example: IO Storage This diagram shows a mechanism to set a signal from GCode as well as from a remote component. It also stores the values on change in some sort of storage (could be the config-service). The in2io component "converts" a output pin of the motion component to a IO pi. When the trigger is triggered the IO value gets updated. This whole in2io component would be reduntant if motion would support io pins natively.

Possible solutions:

Solution 1: Make all output pins of the motion component IO pins. They would ignore value changed when connected to signals, but update the signal when their value changes. Should be compatible with current configurations. However, IO pins for the outputs may look wrong.

Solution 2: Add additional IO pins to the motion component. Does not break compatibility with existing configurations. Biggest implementation overhead. Would require new GCode for setting and reading the pins

Solution 3: Combine the input and ouput pins of motion to single IO pins. Incompatible with existing configurations. Input and output pins are not necessarily related

Solution 4: Add additional IO pins for all output pins. Will not break compatibility. However, adds additional redundant pins to motion.

ArcEye avatar Aug 02 '18 13:08 ArcEye

Comment by machinekoder Fri Jan 23 09:39:38 2015


Solution 1 is trivial to implement and simply works: https://github.com/strahlex/machinekit-1/commit/6aa54913e8fdd6a2de9493b383552f3e80f477a1

ArcEye avatar Aug 02 '18 13:08 ArcEye

Comment by machinekoder Fri Jan 23 09:40:45 2015


Solution 4 is similar trivial: https://github.com/strahlex/machinekit-1/commit/6fc6468abc022c3549f6c380e07a1d1a1f1bff63

ArcEye avatar Aug 02 '18 13:08 ArcEye

Comment by machinekoder Sun Jan 25 19:26:56 2015


Proposed solution 4. A similar method is used by the lincurve component.

ArcEye avatar Aug 02 '18 13:08 ArcEye

Comment by machinekoder Sun Jan 25 21:48:37 2015


Temporarily fixed by #465

I leave this issue open since motion still does not support real I/O

ArcEye avatar Aug 02 '18 13:08 ArcEye

Comment by mhaberler Tue Jan 27 22:10:53 2015


to the above solutions I'd add:

  • make the tp code accept non-move commands and not have it trip over
  • add motion command to set/query arbitrary pins by commands on the tp queue

ArcEye avatar Aug 02 '18 13:08 ArcEye