- Posts: 238
- Thank you received: 0
M function during move
- TheRoslyak
- Topic Author
- Offline
- Elite Member
-
Less
More
5 years 10 months ago #190850
by TheRoslyak
M function during move was created by TheRoslyak
Tell me how to implement the function while driving? It is desirable that it be recorded from the time or distance parameter to the end point.
Please Log in to join the conversation.
5 years 10 months ago #190851
by Aciera
Replied by Aciera on topic M function during move
Hm, is this example taken from a document? If so can you provide a link to it?
Please Log in to join the conversation.
- TheRoslyak
- Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 238
- Thank you received: 0
5 years 10 months ago #190852
by TheRoslyak
Replied by TheRoslyak on topic M function during move
No. I painted myself in Adobe Illustrator :laugh:
Please Log in to join the conversation.
5 years 10 months ago #190853
by Aciera
Replied by Aciera on topic M function during move
I see. I don't think you will get this done with standard gcode.
Maybe with a python remap?
linuxcnc.org/docs/html/remap/remap.html#...ming-embedded-python
[edit]
There is a hal-pin that might be useful:
motion.distance−to−go OUT FLOAT
Distance remaining in the current move
Maybe with a python remap?
linuxcnc.org/docs/html/remap/remap.html#...ming-embedded-python
[edit]
There is a hal-pin that might be useful:
motion.distance−to−go OUT FLOAT
Distance remaining in the current move
Please Log in to join the conversation.
- TheRoslyak
- Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 238
- Thank you received: 0
5 years 10 months ago #190855
by TheRoslyak
Replied by TheRoslyak on topic M function during move
Now I do that.
Using halcmd lcec.0.D2.dout-0 1
But may be I can use own new hal componet and any else for solving task?
Using halcmd lcec.0.D2.dout-0 1
But may be I can use own new hal componet and any else for solving task?
Please Log in to join the conversation.
5 years 10 months ago #190856
by Aciera
Replied by Aciera on topic M function during move
sure, can't see why not. Do you need this for all moves or just for some?
Please Log in to join the conversation.
- TheRoslyak
- Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 238
- Thank you received: 0
5 years 10 months ago #190858
by TheRoslyak
Replied by TheRoslyak on topic M function during move
Randomly. Now an external script is running that sends linuxcnc rsh command and switch output. To do this, I calculate the time at the script level. But if it is included in the G-code, it will be easier to calculate.
Please Log in to join the conversation.
5 years 10 months ago #190860
by Aciera
Replied by Aciera on topic M function during move
What about the distance to the end of the path, is that a constant value or does that change?
[edit]
I mean the "t" or "S" value in your picture.
[edit]
I mean the "t" or "S" value in your picture.
Please Log in to join the conversation.
- TheRoslyak
- Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 238
- Thank you received: 0
5 years 10 months ago #190861
by TheRoslyak
Replied by TheRoslyak on topic M function during move
Constant value. But to find this value need to conduct an experiment to find an acceptable. If calculate in script level I need to change a lot of parameters. If calculate in G-code only one
UPD
motion.distance−to−go It's that me need!!!
Is there a similar variable for time?
UPD
motion.distance−to−go It's that me need!!!
Is there a similar variable for time?
Please Log in to join the conversation.
5 years 10 months ago #190863
by Aciera
Replied by Aciera on topic M function during move
So, if you write a hal component that constantly switches a pin at the desired distance before reaching the end point you could use M64 P0 with an and2 block to "enable that signal to go out and then M65 P0 to disable the output again. Maybe you could even find a way to automatically disable the output after motion.distance-to-go as reached 0.
Your S value could be defined in the INI or in the GUI.
Just an idea.
Your S value could be defined in the INI or in the GUI.
Just an idea.
Please Log in to join the conversation.
Time to create page: 0.105 seconds
