Setpoint Mcode

More
30 May 2020 10:42 #169411 by lorisdag
Setpoint Mcode was created by lorisdag
hi after a long time here I am, I'm building a new machine and need to do the setpoint from M code inside the program I tried in different ways but it doesn't work someone has already done this function?

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

More
30 May 2020 18:09 - 30 May 2020 18:10 #169441 by Aciera
Replied by Aciera on topic Setpoint Mcode
I'm not sure I understand what you are trying to do when you say:

do the setpoint from M code inside the program

What kind of "setpoint" are you referring to?
Last edit: 30 May 2020 18:10 by Aciera.

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

More
30 May 2020 18:42 #169442 by tommylight
Replied by tommylight on topic Setpoint Mcode

I'm not sure I understand what you are trying to do when you say:

do the setpoint from M code inside the program

What kind of "setpoint" are you referring to?

+1

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

More
31 May 2020 06:37 #169479 by lorisdag
Replied by lorisdag on topic Setpoint Mcode
hello the new machine works with the piece moving on the x-axis above a tape with a laser sensor I have to setpoint each program but I can't write an M code that does this. An example is on youtube " brema vector "

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

More
31 May 2020 07:45 - 31 May 2020 07:57 #169482 by Aciera
Replied by Aciera on topic Setpoint Mcode
So you are loading the piece with the conveyor belt and want to set the X-axis to zero as a reference point when the work piece triggers the laser sensor ?

When you say you want to "setpoint using an Mcode in the program" do you mean you want to set the x-axis in your part's Gcode or automatically do it through HAL when LinuxCNC is running? If you load one part at a time and wait until that part has finished I don't see a need to do it as an M-command in the Gcode.

What kind of control hardware do you use (e.g. MESA)?
Last edit: 31 May 2020 07:57 by Aciera. Reason: More questions
The following user(s) said Thank You: tommylight

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

More
31 May 2020 08:05 #169486 by rodw
Replied by rodw on topic Setpoint Mcode
Your requirements are very vague. You could use offsets and coordinate systems to save a position.
You could also pass values from gcode to Hal via M67/M68.

Please be specific.

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

More
31 May 2020 16:33 #169530 by lorisdag
Replied by lorisdag on topic Setpoint Mcode
Exactly I have to do this. I don't use Mesa but it brings lpt

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

More
31 May 2020 16:53 #169531 by tommylight
Replied by tommylight on topic Setpoint Mcode
Something like rolling axis that changes the 0 position each time a plank passes a sensor ?
That should be fairly easy to do, until a certain point:
Have that axis set to immediate homing, so no homing or limit switches for that axis,
Set that plank sensor to home that axis, any offset can be set in the ini file,
That would leave only the issue of homing an already homed axis, as that requires pressing enter or clicking on OK on the screen, but that should also be possible as i recall a while back someone made the machine that would home automatically on power up.
The following user(s) said Thank You: Aciera

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

More
31 May 2020 17:07 #169533 by Aciera
Replied by Aciera on topic Setpoint Mcode
Well I'm sorry but I find this a somewhat tedious way to communicate.
If you want people here to help you with your problem it might be worth your while to write more than two sentences at a time.

Anyway :

If you need to set the X offset to 0 you could just use the laser sensor as an Hal input pin and call an MDI command when it becomes active:

Define MDI command in your INI:
[HALUI]
MDI_COMMAND = G10 L20 P0 X0 ( Set X to zero )

Then you can call this in your HAL:
net MDI-zerox <= your.sensor.input => halui.mdi-command-00
The following user(s) said Thank You: tommylight

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

More
31 May 2020 17:12 #169534 by tommylight
Replied by tommylight on topic Setpoint Mcode
Or what Aciera said, that is even more elegant solution.
Thank you, Aciera.

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

Time to create page: 0.092 seconds
Powered by Kunena Forum