Dat file wont upload and only uploads as a keep file

  • I am running into a problem that when I try to upload a program from a usbstick onto my KRC2 controller where it will upload the .src file without any problem, but with the .dat file it gives me an error that has as source: FILEHANDLER. Then if i proceed to still upload it it becomes a: keep0 file and it the icon isnt the correct one what am I doing wrong? Thankyou for you help in advance!


    This is the code that im trying to run:


    &ACCESS RVO1

    &COMMENT

    DEF martenn( )

    ;FOLD INI

    ;FOLD BASISTECH INI

    GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )

    INTERRUPT ON 3

    BAS (#INITMOV,0 )

    ;ENDFOLD (BASISTECH INI)

    ;FOLD USER INI

    ;Make your modifications here


    ;ENDFOLD (USER INI)

    ;ENDFOLD (INI)


    ;FOLD PTP HOME Vel=30 % DEFAULT Tool[1] Base[0];%{PE}%R 8.3.22,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 3:, 5:30, 7:DEFAULT

    $BWDSTART=FALSE

    PDAT_ACT=PDEFAULT

    FDAT_ACT=FHOME

    BAS(#PTP_PARAMS,30)

    PTP XHOME

    ;ENDFOLD



    ;INSERT STARTING LOCATION FOR MOVING Z AXIS

    INTERRUPT DECL 1 WHEN $IN[1]==TRUE DO TOOLM()

    MOVEZ()

    INTERRUPT OFF 1


    ;FOLD PTP HOME Vel=30 % DEFAULT Tool[1] Base[0];%{PE}%R 8.3.22,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 3:, 5:30, 7:DEFAULT

    $BWDSTART=FALSE

    PDAT_ACT=PDEFAULT

    FDAT_ACT=FHOME

    BAS(#PTP_PARAMS,30)

    PTP XHOME

    ;ENDFOLD

    $OUT[1]=FALSE

    END

    DEF MOVEZ()

    INTERRUPT ON 1

    ;INSERT END LOCATION FOR MOVING OVER THE Z AXIS


    ;FOLD WAIT Time= 0.0 sec;%{PE}%R 8.3.22,%MKUKATPBASIS,%CWAIT,%VWAIT,%P 2:0.0

    WAIT SEC 0.0

    ;ENDFOLD

    END

    DEF TOOLM()

    INTERRUPT OFF 1

    BRAKE

    $OUT[1]=TRUE

    ;FOLD WAIT Time= 3 sec;%{PE}%R 5.4.33,%MKUKATPBASIS,%CWAIT,%VWAIT,%P 2:3

    WAIT SEC 3

    ;ENDFOLD

    RESUME

    END



    SPECS:

    KRC V5.5.10

    GUI version: 2.0.6.6 b65

    Kernel system version: KS V5.5.64

    Robot:KR16 C2 FLR ZH16

  • That is indeed a smart move to do... This is the dat code that is automatically produced when i safe my file in orangeedit


    DEF martenn( )

    ;FOLD INI

    ;FOLD BASISTECH INI

    GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )

    INTERRUPT ON 3

    BAS (#INITMOV,0 )

    ;ENDFOLD (BASISTECH INI)

    ;FOLD USER INI

    ;Make your modifications here


    ;ENDFOLD (USER INI)

    ;ENDFOLD (INI)


    ;FOLD PTP HOME Vel=30 % DEFAULT Tool[1] Base[0];%{PE}%R 8.3.22,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 3:, 5:30, 7:DEFAULT

    $BWDSTART=FALSE

    PDAT_ACT=PDEFAULT

    FDAT_ACT=FHOME

    BAS(#PTP_PARAMS,30)

    PTP XHOME

    ;ENDFOLD



    ;INSERT STARTING LOCATION FOR MOVING Z AXIS

    INTERRUPT DECL 1 WHEN $IN[1]==TRUE DO TOOLM()

    MOVEZ()

    INTERRUPT OFF 1


    $OUT[1]=FALSE

    END

    DEF MOVEZ()

    INTERRUPT ON 1

    ;INSERT END LOCATION FOR MOVING OVER THE Z AXIS


    ;FOLD WAIT Time= 0.0 sec;%{PE}%R 8.3.22,%MKUKATPBASIS,%CWAIT,%VWAIT,%P 2:0.0

    WAIT SEC 0.0

    ;ENDFOLD

    END

    DEF TOOLM()

    INTERRUPT OFF 1

    BRAKE

    $OUT[1]=TRUE

    ;FOLD WAIT Time= 3 sec;%{PE}%R 5.4.33,%MKUKATPBASIS,%CWAIT,%VWAIT,%P 2:3

    WAIT SEC 3

    ;ENDFOLD

    RESUME

    END

    Edited once, last by martenH ().

  • SRC file has structure


    Code
        DEF program_name()
           ; blah blah
        END


    DAT file structure is


    Code
    DEFDAT program_name
       ; blah blah
    ENDDAT


    notice that DEF/END are used in SRC, while DEFDAT/ENDDAT are used in the DAT file

    also notice that after module name there are parenthesis but - only in SRC file...!

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • you can also confirm that by generating new program module on the robot. in fact that is what you should definitely do first to establish baseline for your robot programs. they contain other things (based on installed options) that are on your robot. those things end up in both SRC and DAT files (check INI fold for example)

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • I have adjusted the .dat file according to your sugestion however now i get a lot of errors saying illegal or unknown block... What am i doing wrong? am i a complete idiote?


  • as already stated - create new program module using teach pendant then look what is inside those SRC and DAT files.


    SRC file is used for instructions

    DAT file is used for declarations


    you are putting content of SRC file into DAT file. that is not allowed.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • I have made a new program on the teach pendant however when in transport those onto a usb they show up on the KR2C but once i try to transport them to my computer they are not on the usb anymore and also dont show up once i plug the usb back into the KR2C.... allright i have figured this out by just duplicating the program.


    This shows up in my .Dat file

  • sounds like a user to me... :grinning_squinting_face:


    either the KRC did not finish writing files (files not closed properly or usb stick was not ejected properly before removal)

    or

    there is something on your computer that removes the file(s), perhaps antivirus...


    and if you want to program robots, do not just look AT file icons. look INSIDE files if you want to see what is going on. use another machine to verify that files are there and in correct format. for example after you remove USB stick from KRC... you COULD connect the stick right back to that same KRC and look inside files. if all ok then you know that files disappear WHEN you connect USB drive to your computer.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • I ejected the print as soon as my usb stopped flashing lights but maby still to soon... dont really have a antivirus activated :$ from now on ill check inside them aswel. my program now fully functions so im a happy man al thanks to you XD

Advertising from our partners