Skip to content

Multiple Regex lines #7

@Xchrisd

Description

@Xchrisd

Hey, first of all, thank you for your work!

If i use more than one regex definition it seems they get screwed up.
I use a 3dChameleon setup (like MMU with endstop trigger to pull filament out of the hotend and trigger again to put it back in) with gcode actions.

If i change the filament color, the filament gets out of the head, the gcode requests
M118 E1 filament outside check start
M119; endstop status
M118 E1 filament outside check end

afterwards it gets back in and request the status again,
M118 E1 filament inside check start
M119; endstop status
M118 E1 filament inside check end

The regex definition works in regex101.com but i am not able to get the terminal response to work with this "complex" definitions (text of course work all the time).
If i use the two following lines, it seems the inside check gets triggered with the "extruder1: open" and not like the intended "TRIGGERED".

Outside regex
filament outside check start[\s\S]*?filament_extruder1: open[\s\S]*?filament outside check end
Inside regex
filament inside check start[\s\S]*?filament_extruder1: TRIGGERED[\s\S]*?filament inside check end

Terminal output which should action a pause command:

Outside:

Recv: echo:filament outside check start
Recv: ok
Send: N3101 M119*25
Recv: Reporting endstop status
Recv: x_min: open
Recv: x_max: open
Recv: y_min: open
Recv: y_max: open
Recv: z_min: open
Recv: z_max: open
Recv: z_probe_proximity_switch: open
Recv: z_probe_left_optocoupler: open
Recv: z_probe_right_optocoupler: open
Recv: filament_extruder0: open
Recv: filament_extruder1: open
Recv: ok
Send: N3102 M118 E1 filament outside check end*35
Recv: echo:filament outside check end
Recv: ok

Inside:

Recv: echo:filament inside check start
Recv: ok
Send: N3109 M119*17
Recv: Reporting endstop status
Recv: x_min: open
Recv: x_max: open
Recv: y_min: open
Recv: y_max: open
Recv: z_min: open
Recv: z_max: open
Recv: z_probe_proximity_switch: open
Recv: z_probe_left_optocoupler: open
Recv: z_probe_right_optocoupler: open
Recv: filament_extruder0: open
Recv: filament_extruder1: TRIGGERED
Recv: ok
Send: N3110 M118 E1 filament inside check end*73
Recv: echo:filament inside check end

I am sorry if i miss something, this is the first time i use regex but i tried a lot and cant get more than one regex trigger to work.

Thank you!
Chris

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions