textscriptingeditingcnc

Convenient way to alter CNC code when post processor fails


Due to ugliness of paid overpriced abandonware "ESPRIT" the post processor is generating code in wrong way and this is a snipped from already regexed on the last line. But the illogical placing of high pressure coolant line persists. Which would basically end up with high pressure on while optionally stopped via toggle.


M1
 
 
T0400 (SRIEG ER 0.36 QS-SMALR 1212 E3 HP-M)
MB2 (ON)
MB13 (OFF)

M1
 
 
T0200 (35L QS-SVJCR 1212 E11 HP-M)
MB3 (ON)
MB12 (OFF)

These are two snippet examples where the last line should be placed over the top line.


MB13 (OFF)
M1
 
 
T0400 (SRIEG ER 0.36 QS-SMALR 1212 E3 HP-M)
MB2 (ON)

MB12 (OFF)
M1
 
 
T0200 (35L QS-SVJCR 1212 E11 HP-M)
MB3 (ON)

Perhaps someone could show an example or suggest what software to use for this.


Solution

  • Using Kate text editor

    via 'CTRL + R' search and replace.

    Searching for this:


    ^(MB)([1-9] \(OFF\))$
    

    Replacing with:

    \11\2
    

    Worked for me.