Search Results (Searched for: )
- epineh
- epineh
17 May 2025 13:05
Replied by epineh on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Category: Computers and Hardware
Hmm so I had checked the datasheet earlier, never actually looked at price and availability, I see what you mean.
The main idea was to save pins, they run out quickly on the tang nano. I guess the simplest solution is to step up to the spartan 6.
There is OctoQuad by DigitalChickenLabs for the pi pico that will do a similar thing for 8 encoders via I2C but as you say it would also require a new plugin.
Cheers.
Russell.
The main idea was to save pins, they run out quickly on the tang nano. I guess the simplest solution is to step up to the spartan 6.
There is OctoQuad by DigitalChickenLabs for the pi pico that will do a similar thing for 8 encoders via I2C but as you say it would also require a new plugin.
Cheers.
Russell.
- meister
- meister
17 May 2025 12:47
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Category: Computers and Hardware
Hi Russell,
the LS7366 are no longer manufactured and you would have to write a new plugin. The ones you can still get are also quite expensive.
can't you just make a plug-in board (on the top) and route all the encoder pins to the top via pin headers?
Cheers, Olli
the LS7366 are no longer manufactured and you would have to write a new plugin. The ones you can still get are also quite expensive.
can't you just make a plug-in board (on the top) and route all the encoder pins to the top via pin headers?
Cheers, Olli
- DonatasO
- DonatasO
17 May 2025 12:21 - 17 May 2025 12:33
G53 not ignoring tool length offset after a Python M6 remap was created by DonatasO
G53 not ignoring tool length offset after a Python M6 remap
Category: Advanced Configuration
Hi,
I'm writing an M6 remap in Python and encountered strange and dangerous behavior. After the first M6 call, G53 G0 takes into account the tool length offset, which should not be happening.
I'm unsure if I'm doing something wrong or if this is a bug in LinuxCNC. I hope you can help me clarify and resolve it.
LinuxCNC version: 2.9.4
UI (probably irrelevant): qtdragon_hd
This is a minimal working code to reproduce the issue:
Steps to reproduce the issue:
Attaching debug logs for each command:
T6 M6
Issuing EMC_TASK_SET_MODE -- ( +504,+24, +6, +3,)
NML_INTERP_LIST(0x55561aff7b10)::clear(): discarding 0 items
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=24,type=EMC_TASK_PLAN_SYNCH}) : list_size=1, line_number=0
emcTaskPlanSynch() returned 0
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=24, type=EMC_TASK_PLAN_SYNCH}, list_size=0
emcTaskPlanLevel() returned 0
Issuing EMC_TASK_PLAN_SYNCH -- ( +516,+24, +0,)
emcTaskPlanSynch() returned 0
Issuing EMC_TASK_PLAN_EXECUTE -- ( +509,+280, +7,t6\032m6\n,)
emcTaskPlanLevel() returned 0
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=280,type=EMC_OPERATOR_DISPLAY}) : list_size=1, line_number=0
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=24,type=EMC_TOOL_PREPARE}) : list_size=2, line_number=0
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=24,type=EMC_TOOL_SET_NUMBER}) : list_size=3, line_number=0
emcTaskPlanExecute(t6 m6
) returned 2
emcTaskPlanLevel() returned 1
emcTaskPlanSetWait() called
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=24,type=EMC_TASK_PLAN_SYNCH}) : list_size=4, line_number=0
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=280, type=EMC_OPERATOR_DISPLAY}, list_size=3
emcTaskPlanLevel() returned 1
Issuing EMC_OPERATOR_DISPLAY -- ( +13,+280, +0, +0,\032in\032prepare\032tool=6.000000\032pocket=6.000000,)
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=24, type=EMC_TOOL_PREPARE}, list_size=2
emcTaskPlanLevel() returned 1
Issuing EMC_TOOL_PREPARE -- ( +1104,+24, +0, +6,)
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=24, type=EMC_TOOL_SET_NUMBER}, list_size=1
emcTaskPlanLevel() returned 1
Issuing EMC_TOOL_SET_NUMBER -- ( +1109,+24, +0, +6,)
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=24, type=EMC_TASK_PLAN_SYNCH}, list_size=0
emcTaskPlanLevel() returned 1
Issuing EMC_TASK_PLAN_SYNCH -- ( +516,+24, +0,)
emcTaskPlanSynch() returned 0
emcTaskPlanClearWait() called
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=280,type=EMC_TASK_PLAN_EXECUTE}) : list_size=1, line_number=0
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=280, type=EMC_TASK_PLAN_EXECUTE}, list_size=0
emcTaskPlanLevel() returned 1
Issuing EMC_TASK_PLAN_EXECUTE -- ( +509,+280, +0,\255,)
emcTaskPlanLevel() returned 1
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=168,type=EMC_TRAJ_SET_OFFSET}) : list_size=1, line_number=0
emcTaskPlanExecute((null)) returned 0
emcTaskPlanLevel() returned 0
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=168, type=EMC_TRAJ_SET_OFFSET}, list_size=0
emcTaskPlanLevel() returned 0
Issuing EMC_TRAJ_SET_OFFSET -- ( +223,+168, +0,0.000000,0.000000,-50.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,)
mdi_execute_hook: MDI command 't6 m6
' done (remaining: 0)
tool_result(id=6, xoffset=0.0, yoffset=0.0, zoffset=-50.0, aoffset=0.0, boffset=0.0, coffset=0.0, uoffset=0.0, voffset=0.0, woffset=0.0, diameter=6.0, frontangle=0.0, backangle=0.0, orientation=0)
G53 G0 Z0
Issuing EMC_TASK_PLAN_EXECUTE -- ( +509,+280, +8,g53\032g0\032z0\n,)
emcTaskPlanLevel() returned 0
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=208,type=EMC_TRAJ_LINEAR_MOVE}) : list_size=1, line_number=15
emcTaskPlanExecute(g53 g0 z0
) returned 0
emcTaskPlanLevel() returned 0
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=208, type=EMC_TRAJ_LINEAR_MOVE}, list_size=0
emcTaskPlanLevel() returned 0
Outgoing motion id is 15.
Issuing EMC_TRAJ_LINEAR_MOVE -- ( +220,+208, +0,0.000000,628.000000,-50.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000, +1,100.000000,100.000000,1000.000000, +0, -1,)
Motion id 15 took 0.708401 seconds.
Motion id 0 took 0.000000 seconds.
mdi_execute_hook: MDI command 'g53 g0 z0
' done (remaining: 0)
G49
Issuing EMC_TASK_PLAN_EXECUTE -- ( +509,+280, +9,g49\n,)
emcTaskPlanLevel() returned 0
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=168,type=EMC_TRAJ_SET_OFFSET}) : list_size=1, line_number=15
emcTaskPlanExecute(g49
) returned 0
emcTaskPlanLevel() returned 0
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=168, type=EMC_TRAJ_SET_OFFSET}, list_size=0
emcTaskPlanLevel() returned 0
Issuing EMC_TRAJ_SET_OFFSET -- ( +223,+168, +0,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,)
mdi_execute_hook: MDI command 'g49
' done (remaining: 0)
G43
Issuing EMC_TASK_PLAN_EXECUTE -- ( +509,+280, +11,g43\n,)
emcTaskPlanLevel() returned 0
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=168,type=EMC_TRAJ_SET_OFFSET}) : list_size=1, line_number=15
emcTaskPlanExecute(g43
) returned 0
emcTaskPlanLevel() returned 0
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=168, type=EMC_TRAJ_SET_OFFSET}, list_size=0
emcTaskPlanLevel() returned 0
Issuing EMC_TRAJ_SET_OFFSET -- ( +223,+168, +0,0.000000,0.000000,-50.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,)
mdi_execute_hook: MDI command 'g43
' done (remaining: 0)
G53 G0 Z0
Issuing EMC_TASK_PLAN_EXECUTE -- ( +509,+280, +12,g53\032g0\032z0\n,)
emcTaskPlanLevel() returned 0
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=208,type=EMC_TRAJ_LINEAR_MOVE}) : list_size=1, line_number=15
emcTaskPlanExecute(g53 g0 z0
) returned 0
emcTaskPlanLevel() returned 0
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=208, type=EMC_TRAJ_LINEAR_MOVE}, list_size=0
emcTaskPlanLevel() returned 0
Issuing EMC_TRAJ_LINEAR_MOVE -- ( +220,+208, +0,0.000000,628.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000, +1,100.000000,100.000000,1000.000000, +0, -1,)
Motion id 15 took 0.713359 seconds.
Motion id 0 took 0.000000 seconds.
mdi_execute_hook: MDI command 'g53 g0 z0
' done (remaining: 0)
I'm writing an M6 remap in Python and encountered strange and dangerous behavior. After the first M6 call, G53 G0 takes into account the tool length offset, which should not be happening.
I'm unsure if I'm doing something wrong or if this is a bug in LinuxCNC. I hope you can help me clarify and resolve it.
LinuxCNC version: 2.9.4
UI (probably irrelevant): qtdragon_hd
This is a minimal working code to reproduce the issue:
# REMAP=M6 modalgroup=6 prolog=change_prolog python=is_this_a_bug epilog=change_epilog
def is_this_a_bug(self):
if self.task == 0: # ignore the preview interpreter
return INTERP_OK
emccanon.CHANGE_TOOL_NUMBER(self.selected_pocket)
yield INTERP_EXECUTE_FINISH
pose = EmcPose()
pose.z = -50
emccanon.USE_TOOL_LENGTH_OFFSET(pose)
yield INTERP_OKSteps to reproduce the issue:
- Turn on and home the machine
- T6 M6: the tool is loaded and offsets are set correctly.
- G53 G0 Z0: the spindle rapids down to -50mm. This is not expected.
- G49: cancel tool length compensation.
- G43: enable tool length compensation
- G53 G0 Z: the spindle rapids back up to zero. This is expected.
Attaching debug logs for each command:
T6 M6
Warning: Spoiler!
Issuing EMC_TASK_SET_MODE -- ( +504,+24, +6, +3,)
NML_INTERP_LIST(0x55561aff7b10)::clear(): discarding 0 items
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=24,type=EMC_TASK_PLAN_SYNCH}) : list_size=1, line_number=0
emcTaskPlanSynch() returned 0
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=24, type=EMC_TASK_PLAN_SYNCH}, list_size=0
emcTaskPlanLevel() returned 0
Issuing EMC_TASK_PLAN_SYNCH -- ( +516,+24, +0,)
emcTaskPlanSynch() returned 0
Issuing EMC_TASK_PLAN_EXECUTE -- ( +509,+280, +7,t6\032m6\n,)
emcTaskPlanLevel() returned 0
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=280,type=EMC_OPERATOR_DISPLAY}) : list_size=1, line_number=0
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=24,type=EMC_TOOL_PREPARE}) : list_size=2, line_number=0
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=24,type=EMC_TOOL_SET_NUMBER}) : list_size=3, line_number=0
emcTaskPlanExecute(t6 m6
) returned 2
emcTaskPlanLevel() returned 1
emcTaskPlanSetWait() called
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=24,type=EMC_TASK_PLAN_SYNCH}) : list_size=4, line_number=0
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=280, type=EMC_OPERATOR_DISPLAY}, list_size=3
emcTaskPlanLevel() returned 1
Issuing EMC_OPERATOR_DISPLAY -- ( +13,+280, +0, +0,\032in\032prepare\032tool=6.000000\032pocket=6.000000,)
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=24, type=EMC_TOOL_PREPARE}, list_size=2
emcTaskPlanLevel() returned 1
Issuing EMC_TOOL_PREPARE -- ( +1104,+24, +0, +6,)
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=24, type=EMC_TOOL_SET_NUMBER}, list_size=1
emcTaskPlanLevel() returned 1
Issuing EMC_TOOL_SET_NUMBER -- ( +1109,+24, +0, +6,)
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=24, type=EMC_TASK_PLAN_SYNCH}, list_size=0
emcTaskPlanLevel() returned 1
Issuing EMC_TASK_PLAN_SYNCH -- ( +516,+24, +0,)
emcTaskPlanSynch() returned 0
emcTaskPlanClearWait() called
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=280,type=EMC_TASK_PLAN_EXECUTE}) : list_size=1, line_number=0
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=280, type=EMC_TASK_PLAN_EXECUTE}, list_size=0
emcTaskPlanLevel() returned 1
Issuing EMC_TASK_PLAN_EXECUTE -- ( +509,+280, +0,\255,)
emcTaskPlanLevel() returned 1
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=168,type=EMC_TRAJ_SET_OFFSET}) : list_size=1, line_number=0
emcTaskPlanExecute((null)) returned 0
emcTaskPlanLevel() returned 0
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=168, type=EMC_TRAJ_SET_OFFSET}, list_size=0
emcTaskPlanLevel() returned 0
Issuing EMC_TRAJ_SET_OFFSET -- ( +223,+168, +0,0.000000,0.000000,-50.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,)
mdi_execute_hook: MDI command 't6 m6
' done (remaining: 0)
tool_result(id=6, xoffset=0.0, yoffset=0.0, zoffset=-50.0, aoffset=0.0, boffset=0.0, coffset=0.0, uoffset=0.0, voffset=0.0, woffset=0.0, diameter=6.0, frontangle=0.0, backangle=0.0, orientation=0)
G53 G0 Z0
Warning: Spoiler!
Issuing EMC_TASK_PLAN_EXECUTE -- ( +509,+280, +8,g53\032g0\032z0\n,)
emcTaskPlanLevel() returned 0
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=208,type=EMC_TRAJ_LINEAR_MOVE}) : list_size=1, line_number=15
emcTaskPlanExecute(g53 g0 z0
) returned 0
emcTaskPlanLevel() returned 0
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=208, type=EMC_TRAJ_LINEAR_MOVE}, list_size=0
emcTaskPlanLevel() returned 0
Outgoing motion id is 15.
Issuing EMC_TRAJ_LINEAR_MOVE -- ( +220,+208, +0,0.000000,628.000000,-50.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000, +1,100.000000,100.000000,1000.000000, +0, -1,)
Motion id 15 took 0.708401 seconds.
Motion id 0 took 0.000000 seconds.
mdi_execute_hook: MDI command 'g53 g0 z0
' done (remaining: 0)
G49
Warning: Spoiler!
Issuing EMC_TASK_PLAN_EXECUTE -- ( +509,+280, +9,g49\n,)
emcTaskPlanLevel() returned 0
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=168,type=EMC_TRAJ_SET_OFFSET}) : list_size=1, line_number=15
emcTaskPlanExecute(g49
) returned 0
emcTaskPlanLevel() returned 0
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=168, type=EMC_TRAJ_SET_OFFSET}, list_size=0
emcTaskPlanLevel() returned 0
Issuing EMC_TRAJ_SET_OFFSET -- ( +223,+168, +0,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,)
mdi_execute_hook: MDI command 'g49
' done (remaining: 0)
G43
Warning: Spoiler!
Issuing EMC_TASK_PLAN_EXECUTE -- ( +509,+280, +11,g43\n,)
emcTaskPlanLevel() returned 0
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=168,type=EMC_TRAJ_SET_OFFSET}) : list_size=1, line_number=15
emcTaskPlanExecute(g43
) returned 0
emcTaskPlanLevel() returned 0
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=168, type=EMC_TRAJ_SET_OFFSET}, list_size=0
emcTaskPlanLevel() returned 0
Issuing EMC_TRAJ_SET_OFFSET -- ( +223,+168, +0,0.000000,0.000000,-50.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,)
mdi_execute_hook: MDI command 'g43
' done (remaining: 0)
G53 G0 Z0
Warning: Spoiler!
Issuing EMC_TASK_PLAN_EXECUTE -- ( +509,+280, +12,g53\032g0\032z0\n,)
emcTaskPlanLevel() returned 0
NML_INTERP_LIST(0x55561aff7b10)::append(nml_msg_ptr{size=208,type=EMC_TRAJ_LINEAR_MOVE}) : list_size=1, line_number=15
emcTaskPlanExecute(g53 g0 z0
) returned 0
emcTaskPlanLevel() returned 0
NML_INTERP_LIST(0x55561aff7b10)::get(): {size=208, type=EMC_TRAJ_LINEAR_MOVE}, list_size=0
emcTaskPlanLevel() returned 0
Issuing EMC_TRAJ_LINEAR_MOVE -- ( +220,+208, +0,0.000000,628.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000, +1,100.000000,100.000000,1000.000000, +0, -1,)
Motion id 15 took 0.713359 seconds.
Motion id 0 took 0.000000 seconds.
mdi_execute_hook: MDI command 'g53 g0 z0
' done (remaining: 0)
Time to create page: 0.417 seconds