CWRITE krl_fseek

  • Hello, i'm trying to use command CWRITE($FCT_CALL, State, Mode, "krl_fseek", FileHandle, #SEEK_BEGIN) like in the manual but compiler always gives NO ENUM data type specified... even if I try to use other two modes #SEEK_END or #SEEK_CUR with offset.


    Did any body got this command to work?

    Edited once, last by DannyDJ ().

  • Hello Danny,



    I find no trace of that ENUM declared anywhere but using INT variable as a substitute seem to compile....
    i would guess that those ENUM values would correspond to low integer values (0,1,2 or similar). hope this helps

    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

  • Hi panic, I tried with INT values from 0,1,2... but it doesn't do nothing with file pointer... you can even enter 100 and it will compile but will do nothing i'm testing in OL8.3 but I think it shouldn't matter... hmm really funny this KUKA CWRITE manual describing things which don't exist, not all of course but some for sure... :uglyhammer2:

    Edited once, last by DannyDJ ().

  • hmm... sorry, had no time to play with it. will see if i can find more about it...
    it is a shame it does not work as expected and - thank you for pointing it out (that is the only way things can get deserved attention).

    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

  • Well, it seem to be simpler than it was... one just has to read manuals... more carefully. :angel:
    Manual tells that MODE parameter can have values #SEEK_BEGIN, #SEEK_END and #SEEK_CUR


    Also data type for MODE is listed as SEEK_MODE_T


    Using this i got it to work... I did not test it in depth but it does work and i found that OFFSET works not just with #SEEK_CUR. :icon_wink:


    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

    Edited once, last by panic mode ().

  • Hello. Before posting I was trying to do just that, but it didn't work because I see now what was I doing wrong then, I declared STATE_T as ENUM type :waffen100: :toothy9: and again it was giving me ENUM type error, so thank you again :bravo: :merci:...

  • no problem, i did mistake too... failed to read and of course it took way longer than it should.... :uglyhammer2:

    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

Advertising from our partners