Posts by ChrisFS

    hi PnsStarter,


    that's for the reply.


    OK, it was not working because i was using roboguide. sim gives 2014 for everything - duh!

    on the real robot, the correct status's are set.


    but....


    OPEN FILE LOG_FILE('AP', fn)

    fstatus = IO_STATUS(LOG_FILE)


    fstatus is always zero whether USB plugged in or not on sim and robot.

    No-one at our Fanuc contacts know why.


    OPEN FILE LOG_FILE('RO', fn)

    however, does give the correct status though. so this was used in the end (if anyone's insterested)..


    OPEN FILE LOG_FILE('RO',fn)

    fstatus = IO_STATUS(LOG_FILE)

    IF (fstatus = 0) OR (fstatus = 2014) THEN;

           IF (fstatus = 0) THEN;

                  -- log file exists..

           ENDIF

           IF (fstatus = 2014) THEN;

                  -- log file doesn’t exists..

           ENDIF

           CLOSE FILE LOG_FILE

           OPEN FILE LOG_FILE('AP',fn)

    fstatus = IO_STATUS(LOG_FILE)

           IF fstatus = 0 THEN

                  -- write log file..

           ENDIF

    ELSE

           IF (fstatus = 2068) THEN;

                  -- usb not plugged in..

           ENDIF

    ENDIF

    CLOSE FILE LOG_FILE


    Cheers,


    Chris

    Hi all,


    so i'm writing a KAREL program of which part of it logs to a file on USB (UD1) if the user has selected choice to log.

    if the user HAS selected choice to log then the USB MUST be inserted for logging - if not the program must abort it's process


    so...


    OPEN FILE LOG_FILE('AP', fn)fstatus = IO_STATUS(LOG_FILE)


    fstatus is always zero whether USB plugged in or not


    so it was suggested to me to try opening the file read-only as that gives the correct IO status...


    OPEN FILE LOG_FILE('RO',fn)

    fstatus = IO_STATUS(LOG_FILE)


    fstatus is zero if USB in and file already exists

    fstatus is 2014 if USB in and file doeasn't exist yet (FILE-014 File not found)

    fstatus is 2014 is USB is not in (FILE-014 File not found)


    It seems there’s no difference between..

    1. “the file doesn’t exist because usb NOT plugged in” (2014) and
    2. “the usb IS plugged in but the file doesn’t exist on it” (2014)


    another suggestion was to use

    flist : ARRAY[2] OF STRING[40]

    FILE_LIST(fn, 0, 3, flist, n_files, fstatus)


    but similarly, fstatus is always 0 whether USB is in or not. Hmmmm….


    basically all i need is,..


    IF USB connected THEN

    append log file

    ELSE

    ABORT

    ENDIF


    Anyone have any ideas what's going on, or how to solve it?


    Any help would be extremey appreciated


    Chris

    Hi all...


    after the battery change (in my previous topic).. i thought all was well... but...


    the x and y directions are about 20 degrees different from the base x and y directions (ie. z is rotated by about 20 degrees).


    i've looked but i just find the setting anywhere.. Tool Coordinates on the Aux Data Settings seemed like the nearest but that didnt seem to correct it.


    is there a was to basically align the x, y and z of the tool with the base x, y and z?


    thanks,
    chris


    [i thought i'd sorted it with tool coords and home position, but it actually didnt]

    hi all,


    i've just started getting this warning from my RS03N:-


    Control Warning
    W1013 <date>
    Encoder battery battery low voltage. [Servo(0)]


    can anyone tell me how to replace the battery (i have a spare one) and then what to do afterwards - need to do some zeroing apparently.


    I had a guy come down from kawasaki uk to do the same thing for an RS05 we have here as well. He did breifly tell me what to do but now coming to do it, nothing looks familiar and i can't even find where the battery goes!


    i would really appreciate any help.


    thanks in advance,
    chris.