Unlimited custom outputs?
- sticky
- Offline
- Junior Member
-
Less
More
- Posts: 30
- Thank you received: 1
17 Aug 2026 23:34 #348823
by sticky
Unlimited custom outputs? was created by sticky
I need to setup a machine that will require 200 custom outputs. I was looking at using Mesa cards since I am familiar with them and they will allow me to control that many outputs using a 7i74 and a bunch of 7i73 cards. Will LinuxCNC allow that many custom commands? If so, how would I approach this? I am familiar with the M100-M199 User Defined Commands, is there a way to add more beyond M199?
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 21880
- Thank you received: 7461
18 Aug 2026 00:42 #348824
by tommylight
Replied by tommylight on topic Unlimited custom outputs?
Do you need to activate them from gcode or from GUI?
Why 7i73? See 7i71 or 7i72 at 48 outputs each.
Not much info to go on, but yes LinuxCNC should have no problems controlling "as many as you can wire in" outputs, granted the hardware is there.
But that will also depend of the first question.
Why 7i73? See 7i71 or 7i72 at 48 outputs each.
Not much info to go on, but yes LinuxCNC should have no problems controlling "as many as you can wire in" outputs, granted the hardware is there.
But that will also depend of the first question.
Please Log in or Create an account to join the conversation.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 18060
- Thank you received: 5308
18 Aug 2026 01:29 #348826
by PCW
Replied by PCW on topic Unlimited custom outputs?
If you want a lot of TTL level (open drainn) outputs, a 7I90HD in sserial remote mode
will provide 72 outputs (or inputs) per card.
will provide 72 outputs (or inputs) per card.
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 12111
- Thank you received: 4136
18 Aug 2026 09:26 #348832
by rodw
Replied by rodw on topic Unlimited custom outputs?
You could use ethercat. Start with a EK1100 coupler
www.beckhoff.com/en-en/products/i-o/ethe...-coupler/ek1100.html
and then add 32 output EL2407 modules as required.
www.beckhoff.com/en-en/products/i-o/ethe...l-output/el2407.html
6 would give you 192 outputs and an EL2008 rounds it off to exactly 200 inputs.
the EK1100 can supply for 2 amps but the power bus is can handle 10 amps. If you need more power you can insert a EL9410 power supply module between modules on the bus.
www.beckhoff.com/en-au/products/i-o/ethe...x-system/el9410.html
www.beckhoff.com/en-en/products/i-o/ethe...-coupler/ek1100.html
and then add 32 output EL2407 modules as required.
www.beckhoff.com/en-en/products/i-o/ethe...l-output/el2407.html
6 would give you 192 outputs and an EL2008 rounds it off to exactly 200 inputs.
the EK1100 can supply for 2 amps but the power bus is can handle 10 amps. If you need more power you can insert a EL9410 power supply module between modules on the bus.
www.beckhoff.com/en-au/products/i-o/ethe...x-system/el9410.html
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Offline
- Platinum Member
-
Less
More
- Posts: 4777
- Thank you received: 1469
18 Aug 2026 10:19 - 18 Aug 2026 10:23 #348836
by Todd Zuercher
Replied by Todd Zuercher on topic Unlimited custom outputs?
How do you want to command your outputs? There are a myriad of ways to control them with in Linuxcnc, custom M-codes being just one. In fact you could command up to 32 outputs with just a single custom M-code with the addition of a binary variable (M100 Pn) where n= an integer number that is written to a hal pin (Bitslice Hal component) who's binary value sets the value of each output pin. You could add another 32 by adding a Q variable to the M-code for a total of 64 outputs with a single M-code command. Now remembering all of your possible binary integer commands to turn on/off the correct outputs might be a bit of a trick, but that shouldn't be hard for a computer to do. I've done this before myself, but for only about 16 outputs.
Last edit: 18 Aug 2026 10:23 by Todd Zuercher.
Please Log in or Create an account to join the conversation.
- NWE
-
- Offline
- Elite Member
-
Less
More
- Posts: 258
- Thank you received: 80
18 Aug 2026 14:06 #348838
by NWE
Replied by NWE on topic Unlimited custom outputs?
If a lot of your outputs are related to some sort of logic that "just needs to run in a background program" you can control any or all of them using a custom hal component. There is also classicladder plc logic in LinuxCNC.
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 12111
- Thank you received: 4136
18 Aug 2026 21:47 #348846
by rodw
Replied by rodw on topic Unlimited custom outputs?
with a custom component you could also use an analog digital input. Say you had input numbers 10,20,30....
you could use ranges < 15, 15-24, 25-34 etc to decode you input number for a near infinite number of values on one pin and change with m67-m68
eg
M68 E0 Q30 (set relay #30 on)
M68 E0 Q31 (set relay #30 off)
With some creative hal programming, you could probably use arrays so the code would be very compact.
you could use ranges < 15, 15-24, 25-34 etc to decode you input number for a near infinite number of values on one pin and change with m67-m68
eg
M68 E0 Q30 (set relay #30 on)
M68 E0 Q31 (set relay #30 off)
With some creative hal programming, you could probably use arrays so the code would be very compact.
Please Log in or Create an account to join the conversation.
- sticky
- Offline
- Junior Member
-
Less
More
- Posts: 30
- Thank you received: 1
19 Aug 2026 00:19 #348848
by sticky
Replied by sticky on topic Unlimited custom outputs?
I would like to activate them from g-code.
Why 7i73? I used a Mesa Card Configurator and it showed multiple 7i73's but you are right, the 7i72's would be better.
Why 7i73? I used a Mesa Card Configurator and it showed multiple 7i73's but you are right, the 7i72's would be better.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- sticky
- Offline
- Junior Member
-
Less
More
- Posts: 30
- Thank you received: 1
19 Aug 2026 00:27 #348849
by sticky
Replied by sticky on topic Unlimited custom outputs?
I would like to use M codes. I had not considered using variables to increase the number of outputs. Is there an example of that available on the forum?
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Offline
- Platinum Member
-
Less
More
- Posts: 4777
- Thank you received: 1469
19 Aug 2026 10:15 - 19 Aug 2026 10:35 #348857
by Todd Zuercher
Replied by Todd Zuercher on topic Unlimited custom outputs?
I had posted one of my configs before that uses this for M101, M102, M111, and M112. The commands are for opening and closing a series of fixturing clamps (6 air solenoids) on each side of the machine. M101 and M111 are for closing the work holding clamps (left and right side respectively) in a sequence to help correctly position and hold the parts to be milled. They use both a P and Q variables (P sets the clamping value and Q an unclamping one.) The clamping sequence can also be changed depending on another parameter variable for different parts. M102 and M112 are primarily for opening the clamps to release the parts and only use the P variable, but depending on the P variable used, can also open or close any array of the clamps immediately without any sequence. All of these M-codes write the appropriate integer value to the appropriate Hal signal name (left-clamp-fl or right-clamp-fl) that then feed the Hal pins that make the magic happen.
Here is a link to the config.
forum.linuxcnc.org/media/kunena/attachments/3190/TwinCNC.zip
Here is a link to the config.
forum.linuxcnc.org/media/kunena/attachments/3190/TwinCNC.zip
Last edit: 19 Aug 2026 10:35 by Todd Zuercher.
Please Log in or Create an account to join the conversation.
Time to create page: 1.184 seconds