gcode hal iocontrol pin association
- smc.collins
- Offline
- Platinum Member
Less
More
- Posts: 696
- Thank you received: 123
05 Dec 2022 22:19 - 05 Dec 2022 22:26 #258633
by smc.collins
gcode hal iocontrol pin association was created by smc.collins
how are pin names called across the various and sundary files ??? if I have
net iocontrol.1.turnmeon <= input.1.1.1.card
in my gcode I have
m66 P????? wait.for.turnmeon, where is PX coming from, how is it named, etc
how are the gcode pins mapped to the hal file ? search as I might, there is I haven't found any documentation that clearly and explicitly declares these relationships and how they are established. Do I delcare these in the hal file ? is there a invislble file somewhere that decides this ? are these runtime settings ?
where are these "digital io pins stores or named" and how are they associated ?
net iocontrol.1.turnmeon <= input.1.1.1.card
in my gcode I have
m66 P????? wait.for.turnmeon, where is PX coming from, how is it named, etc
how are the gcode pins mapped to the hal file ? search as I might, there is I haven't found any documentation that clearly and explicitly declares these relationships and how they are established. Do I delcare these in the hal file ? is there a invislble file somewhere that decides this ? are these runtime settings ?
where are these "digital io pins stores or named" and how are they associated ?
- M62 P- - turn on digital output synchronized with motion. The P- word specifies the digital output number.
- M63 P- - turn off digital output synchronized with motion. The P- word specifies the digital output number.
- M64 P- - turn on digital output immediately. The P- word specifies the digital output number.
- M65 P- - turn off digital output immediately. The P- word specifies the digital output number.
- M65 P- - turn off digital output immediately. The P- word specifies the digital output number.
- M64 P- - turn on digital output immediately. The P- word specifies the digital output number.
- M63 P- - turn off digital output synchronized with motion. The P- word specifies the digital output number.
Last edit: 05 Dec 2022 22:26 by smc.collins.
Please Log in or Create an account to join the conversation.
- tommylight
- Online
- Moderator
Less
More
- Posts: 19466
- Thank you received: 6529
05 Dec 2022 23:26 #258635
by tommylight
Replied by tommylight on topic gcode hal iocontrol pin association
M62 P0
will turn on
motion.digital.out-0 <<< check the naming, this is of the top of my head
M62 P1
will turn on
motion.digital.out-1
etc
so, something like this
-
net turn.the.lights.on => motion.digital.out-0 => hm2_pci.5i25.0.0.output-0
-
-turn.the.lights.on <<<<is any name for that pin, no spaces allowed
-motion.digital.out-0 <<<<are LinuxCNC internal pins, again please check the correct naming in your hal file
-hm2_pci.5i25.0.0.output0 <<<<are hardware pins on a mesa board, edit to your setup.
It is much easier to think of these as wires that connect to each other, so you add a Yellow wire(turn.the.lights.on) that you wire to the blue wire(motion.digital.out-0) on one side and to the green wire(hm2_pci_5i25.0.0.output-0) on he other side.
will turn on
motion.digital.out-0 <<< check the naming, this is of the top of my head
M62 P1
will turn on
motion.digital.out-1
etc
so, something like this
-
net turn.the.lights.on => motion.digital.out-0 => hm2_pci.5i25.0.0.output-0
-
-turn.the.lights.on <<<<is any name for that pin, no spaces allowed
-motion.digital.out-0 <<<<are LinuxCNC internal pins, again please check the correct naming in your hal file
-hm2_pci.5i25.0.0.output0 <<<<are hardware pins on a mesa board, edit to your setup.
It is much easier to think of these as wires that connect to each other, so you add a Yellow wire(turn.the.lights.on) that you wire to the blue wire(motion.digital.out-0) on one side and to the green wire(hm2_pci_5i25.0.0.output-0) on he other side.
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
Less
More
- Posts: 696
- Thank you received: 123
05 Dec 2022 23:47 - 05 Dec 2022 23:50 #258637
by smc.collins
Replied by smc.collins on topic gcode hal iocontrol pin association
so
Gcode
m62 P1 is motion.digital.out-1
M62 P2 is motion.digital.out-2
etc and so forth, is the same also true for
M66 P1 is motion.digital.in-1 ??
just trying to make sure I have a solid grasp of the IO naming scheme, I am trying to debug, so I am planning to make a flow chart of the code and commands to try and sort out my failure mode.
hal
net motion.digital.out-1 <= some.hardware.outpout.card.0.0
Gcode
m62 P1 is motion.digital.out-1
M62 P2 is motion.digital.out-2
etc and so forth, is the same also true for
M66 P1 is motion.digital.in-1 ??
just trying to make sure I have a solid grasp of the IO naming scheme, I am trying to debug, so I am planning to make a flow chart of the code and commands to try and sort out my failure mode.
hal
net motion.digital.out-1 <= some.hardware.outpout.card.0.0
Last edit: 05 Dec 2022 23:50 by smc.collins.
Please Log in or Create an account to join the conversation.
- tommylight
- Online
- Moderator
Less
More
- Posts: 19466
- Thank you received: 6529
05 Dec 2022 23:56 #258638
by tommylight
Replied by tommylight on topic gcode hal iocontrol pin association
Same goes for inputs.
And this
net motion.digital.out-1 <= some.hardware.outpout.card.0.0
will most probably not work as those pins are used by LinuxCNC
Again,
net ANY.WHATEVER.NAME => motion.digital.out-1 <= some.hardware.outpout.card.0.0
Also, => and <= do nothing, they are just to make it easier to follow things.
And this
net motion.digital.out-1 <= some.hardware.outpout.card.0.0
will most probably not work as those pins are used by LinuxCNC
Again,
net ANY.WHATEVER.NAME => motion.digital.out-1 <= some.hardware.outpout.card.0.0
Also, => and <= do nothing, they are just to make it easier to follow things.
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
Less
More
- Posts: 696
- Thank you received: 123
06 Dec 2022 01:49 #258654
by smc.collins
Replied by smc.collins on topic gcode hal iocontrol pin association
so which inputs and outputs are used by linuxcnc versus the Gcode ? Iis there a document describing this anywhere ?
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23170
- Thank you received: 4860
06 Dec 2022 02:13 - 06 Dec 2022 02:13 #258658
by andypugh
Replied by andypugh on topic gcode hal iocontrol pin association
I don't entirely understand the question, but the M65 etc pins work on the motion.digital-in/out and motion.analog-in/out pins.
The coolant commands toggle iocontrol.0.coolant-mist/flood
But pretty much _every_ HAL pin is under the influence of G-code in some way.
linuxcnc.org/docs/stable/html/man/man9/motion.9.html
linuxcnc.org/docs/stable/html/man/man1/io.1.html
linuxcnc.org/docs/stable/html/man/man1/halui.1.html
The coolant commands toggle iocontrol.0.coolant-mist/flood
But pretty much _every_ HAL pin is under the influence of G-code in some way.
linuxcnc.org/docs/stable/html/man/man9/motion.9.html
linuxcnc.org/docs/stable/html/man/man1/io.1.html
linuxcnc.org/docs/stable/html/man/man1/halui.1.html
Last edit: 06 Dec 2022 02:13 by andypugh.
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
Less
More
- Posts: 696
- Thank you received: 123
06 Dec 2022 02:53 - 06 Dec 2022 02:56 #258659
by smc.collins
Replied by smc.collins on topic gcode hal iocontrol pin association
linuxcnc.org/docs/stable/html/man/man1/i...LINUXCNC_HOME/bin/io
that's the piece of info I was looking for. I think what I will end up doing is building a hal file that handles the pins as almost a translation layer, to reduce the ease of mangling signals /. pins etc. I have a mild form of dyslexia and this is totally disorganized and it's driving me batshit.
that's the piece of info I was looking for. I think what I will end up doing is building a hal file that handles the pins as almost a translation layer, to reduce the ease of mangling signals /. pins etc. I have a mild form of dyslexia and this is totally disorganized and it's driving me batshit.
Last edit: 06 Dec 2022 02:56 by smc.collins.
Please Log in or Create an account to join the conversation.
Time to create page: 0.105 seconds