Hi,

it took a while to setup a working environment, but meanwhile I'm on the way 
and could debug rs274.

If you recall - I got strange numbers for initial offset and on tool-length 
compensation.
I found the source, but can't explain, why it happens in standalone mode only.

The error happens at the end of Interp::init(), when the _setup.origin_* 
members are set by preprocessor macro USER_TO_PROGRAM_LEN(...).

_setup.length_units are CANON_UNITS_MM as the log states:
        init:  DISABLE_FANUC_STYLE_SUB = 0
            1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM)

at this time, nothing from gcode-file is already read.
Entries of linuxcnc.var look like this:
        5220    1.000000
        5221    300.000000
        5222    500.000000
        5223    -200.000000

and after setup with USER_TO_PROGRAM_LEN, G54 offset is converted like this:
            2 N..... SET_G5X_OFFSET(1, 7620.0000, 12700.0000, -5080.0000, ...

Then I added the startup code from ini-file as first line to the gcode-file, 
which leads to these logs:
        execute:auto line='N01 G17 G21 G49 G64 P0.001 G94 G97 M5 M9 G40 G80'    
mdi_int=0 o_type=O_none o_name=(null) cl=0 rl=0 type=*unset* state=CS_NORMAL
            7 N01    SET_SPINDLE_MODE(0 0.0000)
            8 N01    COMMENT("interpreter: feed mode set to units per minute")
            9 N01    SET_FEED_MODE(0, 0)
           10 N01    SET_FEED_RATE(0.0000)
           11 N01    STOP_SPINDLE_TURNING(0)
           12 N01    MIST_OFF()
           13 N01    FLOOD_OFF()
           14 N01    SELECT_PLANE(CANON_PLANE_XY)
           15 N01    USE_LENGTH_UNITS(CANON_UNITS_MM)
           16 N01    COMMENT("interpreter: cutter radius compensation off")
           17 N01    USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 
0.0000, 0.0000 0.0000 0.0000)
           18 N01    SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.001000)
           19 N01    SET_NAIVECAM_TOLERANCE(0.0010)
           20 N01    COMMENT("interpreter: motion mode set to none")

So units are stil and explicitly set to mm - tool lenght offset is 0
Then tool 6 is loaded, which has a line in tool.tbl like this:
        T6 P3 Z30 D6 

... and again the units get wrong converted as these logs show:
        Interp::read:|N04 G43 H6 Z0|
        execute:auto line='N04 G43 H6 Z0' mdi_int=0 o_type=O_none ...
        convert_tool_length_offset h_flag=1 h_number=6 toolchange_flag=0 
                        current_pocket=3

        convert_tool_length_offset: using index=3 spindle_toolno=6 
pocket_toolno=6
           34 N04    USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 762.0000, 0.0000 ...

I would be very happy, if some of the senior developers could verify that 
issue.


cheers Reinhard





_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to