Advanced Search

Search Results (Searched for: )

  • juliankoenig87
  • juliankoenig87
31 May 2025 07:00
Replied by juliankoenig87 on topic Setting pin value based on other pins

Setting pin value based on other pins

Category: HAL

One easy way is to use a mux8:
linuxcnc.org/docs/2.5/html/man/man9/mux8.9.html

This way you can net your three spindle signals to the three selections of the mux and you can define your modbus values to the corresponding inputs of the mux.
  • kubes
  • kubes
31 May 2025 05:47

Setting pin value based on other pins

Category: HAL

I am using mb2hal (modbus) and it exposes a pin `mb2hal.00.00.int` that is an input, the values can be 1, 2, or 5. I need to set the values based on other bit pin:

if spindle.0.forward = true then mb2hal.00.00.in = 1
if spindle.0.reverse = true then mb2hal.00.00.in = 2
if spindle.0.on = false then mb2hal.00.00.in = 5

How do I create this logic in the hal?
Displaying 15631 - 15632 out of 15632 results.
Time to create page: 1.193 seconds
Powered by Kunena Forum