Editing .ls files - how to renumber the lines?

  • So I connected via ftp and downloaded an .ls program. I an make changes just fine, but I am stuck with trying to enter new lines:



    Code
    10: !Segment1 ;
    
    11:J P[2] 100% FINE ;
    
    11:L P[3] 70mm/sec CNT75 ;

    to

    Code
    10: !Segment1 ;
    
    11:J P[2] 100% FINE ;
    
    11: !Segment2 ;
    
    11:L P[3] 70mm/sec CNT75 ;

    note that i have line 11 twice.


    How do I renumber those lines? I donwloaded notepad++ and ultraedit but could not figure it out.

  • In addition to what HawkME stated, you don't even need numbers on newer controllers. You could have the code as follows (and it should parse fine) - Keep in mind, you do need the ASCII Uploader Option to do anything in Notepad and be able to upload it:

    Code
    : !Segment1 ;
    
    :J P[2] 100% FINE ;
    
    : !Segment2 ;
    
    :L P[3] 70mm/sec CNT75 ;
  • Notepad++:

    Alt+Shift to column select just the numbers.


    Then, Edit menu, then select column editor. Once in there, select number to insert and you should be good to go.

    Check out the Fanuc position converter I wrote here! Now open source!

    Check out my example Fanuc Ethernet/IP Explicit Messaging program here!

  • What version of controller? On newer controllers it auto generates line numbers when compiled. Back in RJ2 you had to manually number them correctly in order to get it to compile.

    I think its a 30iA. You are right that it renumbers them automatically. It separates circular moves into two lines when exporting, i guess i entered a wrong line count because of that and that's why I didnt get it to work. Thanks!

Advertising from our partners