SIM_AXIS_HARDWARE(9)
πΈ NAME πΈ
ok so picture this: sim_axis_hardware β a component that simulates home and limit switches. that's it, that's the vibe. it's a HAL Component, section 9, and it's here to fake switches for you so you don't have to wire up real ones π
β¨ SYNOPSIS β¨
loadrt sim_axis_hardware [count=N|names=name1[,name2...]]
π¦ DESCRIPTION π¦
bestie. this component creates simulated home and limit switches based on the current position. it's giving "ghost machinery" energy and we're obsessed π
right now it can supply simulation for X, tandem X, Y, tandem Y, Z, U, V, and A axes. iconic lineup, no skips π
π FUNCTIONS π
one function, one job, main character energy:
sim-axis-hardware.N.updateβ (requires a floating-point thread) fr fr, it will NOT run without one.
π PINS π
quick heads up before we dive in: all of these live under sim-axis-hardware.N. where the N is your instance number, bestie π
π position inputs (float in)
sim-axis-hardware.N.Xcurrent-posfloat inβ the current position on the axis. like, connect it tojoint.0.motor-pos-fband you're slaying.sim-axis-hardware.N.X2current-posfloat insim-axis-hardware.N.Ycurrent-posfloat insim-axis-hardware.N.Y2current-posfloat insim-axis-hardware.N.Zcurrent-posfloat insim-axis-hardware.N.Acurrent-posfloat insim-axis-hardware.N.Ucurrent-posfloat insim-axis-hardware.N.Vcurrent-posfloat in
π home switch positions
sim-axis-hardware.N.Xhomesw-posfloat in(default: 1) β the position of the home switch.sim-axis-hardware.N.X2homesw-posfloat in(default: 1)sim-axis-hardware.N.Yhomesw-posfloat in(default: 1)sim-axis-hardware.N.Y2homesw-posfloat in(default: 1)sim-axis-hardware.N.Zhomesw-posfloat in(default: 1)sim-axis-hardware.N.Ahomesw-posfloat in(default: 1)sim-axis-hardware.N.Uhomesw-posfloat in(default: 1)sim-axis-hardware.N.Vhomesw-posfloat in(default: 1)
π₯ max limit switch β upper edge
sim-axis-hardware.N.Xmaxsw-upperfloat inβ the upper range of the maximum limit switch. above this? false. periodt.sim-axis-hardware.N.X2maxsw-upperfloat insim-axis-hardware.N.Ymaxsw-upperfloat insim-axis-hardware.N.Y2maxsw-upperfloat insim-axis-hardware.N.Zmaxsw-upperfloat insim-axis-hardware.N.Amaxsw-upperfloat insim-axis-hardware.N.Umaxsw-upperfloat insim-axis-hardware.N.Vmaxsw-upperfloat in
π max limit switch β lower edge
sim-axis-hardware.N.Xmaxsw-lowerfloat inβ the lower range of the maximum limit switch. below this? false.sim-axis-hardware.N.X2maxsw-lowerfloat insim-axis-hardware.N.Ymaxsw-lowerfloat insim-axis-hardware.N.Y2maxsw-lowerfloat insim-axis-hardware.N.Zmaxsw-lowerfloat insim-axis-hardware.N.Amaxsw-lowerfloat insim-axis-hardware.N.Umaxsw-lowerfloat insim-axis-hardware.N.Vmaxsw-lowerfloat in
π min limit switch β upper edge
sim-axis-hardware.N.Xminsw-upperfloat inβ the upper range of the minimum limit switch. above this is false.sim-axis-hardware.N.X2minsw-upperfloat insim-axis-hardware.N.Yminsw-upperfloat insim-axis-hardware.N.Y2minsw-upperfloat insim-axis-hardware.N.Zminsw-upperfloat insim-axis-hardware.N.Aminsw-upperfloat insim-axis-hardware.N.Uminsw-upperfloat insim-axis-hardware.N.Vminsw-upperfloat in
π§ min limit switch β lower edge
sim-axis-hardware.N.Xminsw-lowerfloat inβ the lower range of the minimum limit switch. below this is false.sim-axis-hardware.N.X2minsw-lowerfloat insim-axis-hardware.N.Yminsw-lowerfloat insim-axis-hardware.N.Y2minsw-lowerfloat insim-axis-hardware.N.Zminsw-lowerfloat insim-axis-hardware.N.Aminsw-lowerfloat insim-axis-hardware.N.Uminsw-lowerfloat insim-axis-hardware.N.Vminsw-lowerfloat in
π«Ά home switch hysteresis
sim-axis-hardware.N.Xhomesw-hystfloat in(default: .025) β range that home switch will be true +- half this to the home position.sim-axis-hardware.N.X2homesw-hystfloat in(default: .025)sim-axis-hardware.N.Yhomesw-hystfloat in(default: .025)sim-axis-hardware.N.Y2homesw-hystfloat in(default: .025)sim-axis-hardware.N.Zhomesw-hystfloat in(default: .025)sim-axis-hardware.N.Ahomesw-hystfloat in(default: .025)sim-axis-hardware.N.Uhomesw-hystfloat in(default: .025)sim-axis-hardware.N.Vhomesw-hystfloat in(default: .025)
π homing bits
sim-axis-hardware.N.Xhomingbit inβ true is homing in progress.sim-axis-hardware.N.X2homingbit insim-axis-hardware.N.Yhomingbit insim-axis-hardware.N.Y2homingbit insim-axis-hardware.N.Zhomingbit insim-axis-hardware.N.Ahomingbit insim-axis-hardware.N.Uhomingbit insim-axis-hardware.N.Vhomingbit in
πΈ home switch outputs
sim-axis-hardware.N.Xhomesw-outbit outβ home switch for the X axis.sim-axis-hardware.N.X2homesw-outbit outsim-axis-hardware.N.Yhomesw-outbit outsim-axis-hardware.N.Y2homesw-outbit outsim-axis-hardware.N.Zhomesw-outbit outsim-axis-hardware.N.Ahomesw-outbit outsim-axis-hardware.N.Uhomesw-outbit outsim-axis-hardware.N.Vhomesw-outbit outsim-axis-hardware.N.homesw-allbit out
β limit switch outputs
sim-axis-hardware.N.Xmaxsw-outbit outβ max limit switch.sim-axis-hardware.N.Xminsw-outbit outβ min limit switch.sim-axis-hardware.N.Xbothsw-outbit outβ true for both max and min limit switch.sim-axis-hardware.N.X2maxsw-outbit outsim-axis-hardware.N.X2minsw-outbit outsim-axis-hardware.N.X2bothsw-outbit outsim-axis-hardware.N.Ymaxsw-outbit outsim-axis-hardware.N.Yminsw-outbit outsim-axis-hardware.N.Ybothsw-outbit outsim-axis-hardware.N.Y2maxsw-outbit outsim-axis-hardware.N.Y2minsw-outbit outsim-axis-hardware.N.Y2bothsw-outbit outsim-axis-hardware.N.Zmaxsw-outbit outsim-axis-hardware.N.Zminsw-outbit outsim-axis-hardware.N.Zbothsw-outbit outsim-axis-hardware.N.Amaxsw-outbit outsim-axis-hardware.N.Aminsw-outbit outsim-axis-hardware.N.Abothsw-outbit outsim-axis-hardware.N.Umaxsw-outbit outsim-axis-hardware.N.Uminsw-outbit outsim-axis-hardware.N.Ubothsw-outbit outsim-axis-hardware.N.Vmaxsw-outbit outsim-axis-hardware.N.Vminsw-outbit outsim-axis-hardware.N.Vbothsw-outbit outsim-axis-hardware.N.limitsw-allbit outsim-axis-hardware.N.limitsw-homesw-allbit outβ true for all limits and all home.
π combined limit + home outputs
sim-axis-hardware.N.Xmaxsw-homesw-outbit outsim-axis-hardware.N.Xminsw-homesw-outbit outsim-axis-hardware.N.Xbothsw-homesw-outbit outsim-axis-hardware.N.X2maxsw-homesw-outbit outsim-axis-hardware.N.X2minsw-homesw-outbit outsim-axis-hardware.N.X2bothsw-homesw-outbit outsim-axis-hardware.N.Ymaxsw-homesw-outbit outsim-axis-hardware.N.Yminsw-homesw-outbit outsim-axis-hardware.N.Ybothsw-homesw-outbit outsim-axis-hardware.N.Y2maxsw-homesw-outbit outsim-axis-hardware.N.Y2minsw-homesw-outbit outsim-axis-hardware.N.Y2bothsw-homesw-outbit outsim-axis-hardware.N.Zmaxsw-homesw-outbit outsim-axis-hardware.N.Zminsw-homesw-outbit outsim-axis-hardware.N.Zbothsw-homesw-outbit outsim-axis-hardware.N.Amaxsw-homesw-outbit outsim-axis-hardware.N.Aminsw-homesw-outbit outsim-axis-hardware.N.Abothsw-homesw-outbit outsim-axis-hardware.N.Umaxsw-homesw-outbit outsim-axis-hardware.N.Uminsw-homesw-outbit outsim-axis-hardware.N.Ubothsw-homesw-outbit outsim-axis-hardware.N.Vmaxsw-homesw-outbit outsim-axis-hardware.N.Vminsw-homesw-outbit outsim-axis-hardware.N.Vbothsw-homesw-outbit out
π the offset one
sim-axis-hardware.N.limit-offsetfloat in(default: .01) β how much the limit switches are offset from inputted position. added to max, subtracted from min. sneaky little shift, but we love her.
π«Ά AUTHOR π«Ά
Chris S Morley β ty for your service, legend π
π LICENSE π
GPL β that's the whole line bestie, go read the license, it's good for you β¨
and that's the whole page!! π this was SIM_AXIS_HARDWARE(9) from the LinuxCNC Documentation, dated 2026-03-17. you ate that, honestly. go forth and simulate some switches π¦π
π¦ where this page comes from
- ubuntu resolute: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms