Machine with 45 spindles

More
12 Mar 2019 19:35 #128466 by rodw
Replied by rodw on topic Machine with 45 spindles
Further to Todd's approach, I think a bitmap would be limited to a maximum of 32 spindles (32 bit integer). it might be possible to use a M68 command and use numeric ranges.

A couple of us played with this approach with plasma cutting. Most of the parameters we sent were decoded in the python screen handler so we could control variables from both the GUI and Gcode. However, there was one we needed real time gcode control over so we used a component described here. forum.linuxcnc.org/plasma-laser/32700-co...hc-from-within-gcode

So for example, the numeric range 0-99,999 might be control signals that affect all spindles;
100,000-199,999 controls spindle 1
200,000-299,999 controls spindle 2
430,000-439,999 controls spindle 43

Perhaps for say spindle 43 then 430,000 might turn it off, 430,001 turns it on and numbers between 430,002 to 439,999 might represent the spindle speed. eg speed would range from a minimum of 2 to 9,999.
This approach might be quite readable
M68 E0 Q0 (turn all spindles off)
M68 E0 Q430001 (turn spindle 43 on)
M68 E0 Q435000 (set spindle 43 to 5000 RPM)

So if your spindles do > 10000 rpm, you might need to change the numeric ranges and use up into the millions. The component might be tedious to write but it would not be complex stuff.

Just an idea....

Please Log in or Create an account to join the conversation.

More
12 Mar 2019 19:41 #128467 by andypugh
Replied by andypugh on topic Machine with 45 spindles

Further to Todd's approach, I think a bitmap would be limited to a maximum of 32 spindles (32 bit integer). i

The parameters from G-code are passed as double-precision floating point.
I think that this means that any integer up to 52 bits long should be passed exactly.

But you really would want to check that before relying on it.

Please Log in or Create an account to join the conversation.

More
13 Mar 2019 14:47 - 13 Mar 2019 14:58 #128521 by bevins
Replied by bevins on topic Machine with 45 spindles

in the video ther is only one Spindle and shure no space for 45 Spindles on the system
as there is a ATC in place that has quite a Action
Raising the tools one by one
why not the intire Col or Row
or make a chain and only one tool at the time


There are 40 drills that I am calling spindles which probably shouldn't as it would raise flags as you did.
There is only one spindle per say, and the other are drills that can be used as tools.There is one motor that turns all the 40 drills. That is what I need to control the drills.

I got it done with remapping m200 and it is working thanks to Shu.
I am back at my original classic interpreter issue which stems from the prolog and epilog which I am removing completely and doing everything in the remap as Michael suggests.
Everything is working except setting the parameters and giving emccanon.CHANGE_TOOL the pocket and setting the toolchange flag to true. Once I get that done everything should be ok.

The docs should really seperate NGC remap and pure python remap. It needs to be segregated, because what works for ngc really doesn't work for pure python, and the docs suggests that it does.
Last edit: 13 Mar 2019 14:58 by bevins.

Please Log in or Create an account to join the conversation.

More
13 Mar 2019 15:01 #128523 by bevins
Replied by bevins on topic Machine with 45 spindles
I just edited the topic because it is not really 45 spindles.

Please Log in or Create an account to join the conversation.

More
18 Mar 2019 12:28 #128886 by Todd Zuercher
Well I tested the M100Pn way over the weekend.and it worked fine up to at least 40 bits. So that is one way this could be done.
In the attached files is an example user M-code using a bash script to read the P# input and converts the float to an integer, interpret it's binary equivalent up to 40 places, and then sets signals named drill(1-40) to those binary bit values. There is also a hal file that creates those signal names, so the sets will work.

File Attachment:

File Name: 40drills.zip
File Size:1 KB


My bash script is not very pretty, and I'm sure it could be written far more efficiently by someone who knew what they were doing. but the important thing is it works.

The main reason I bothered going through with testing this example is that I would like to do a retrofit of a machine with a similar drill bank sometime in the future.
Attachments:

Please Log in or Create an account to join the conversation.

More
18 Mar 2019 15:44 #128903 by bevins
Replied by bevins on topic Machine with 45 spindles

Well I tested the M100Pn way over the weekend.and it worked fine up to at least 40 bits. So that is one way this could be done.
In the attached files is an example user M-code using a bash script to read the P# input and converts the float to an integer, interpret it's binary equivalent up to 40 places, and then sets signals named drill(1-40) to those binary bit values. There is also a hal file that creates those signal names, so the sets will work.

File Attachment:

File Name: 40drills.zip
File Size:1 KB


My bash script is not very pretty, and I'm sure it could be written far more efficiently by someone who knew what they were doing. but the important thing is it works.

The main reason I bothered going through with testing this example is that I would like to do a retrofit of a machine with a similar drill bank sometime in the future.


I just remapped M200 and and fired digital outputs. Works great.

Please Log in or Create an account to join the conversation.

Time to create page: 0.165 seconds
Powered by Kunena Forum