RobotStudio event

Accessing USB drive through Rapid Coding

Good Day.

I have inserted an 8gb Flash Drive (FAT32 format) inside the controller on the Main Computer Unit. 

I can see the USB when accessing the File Explorer on the TP and via RS in File Transfer.





I want to move all my Saved Modules and Reporting files to this flashdrive and do all the saving and loading of this items to the Flashdrive instead of the Controller HDD to save up some space on the HDD.

Question: How do I connect with the USB via Rapid Code with instructions?

I have tried the following:
    LOCAL VAR dir Directory;

    LOCAL VAR string Filename;

    LOCAL VAR iodev PartFile;

    PROC Main()
        CloseDir Directory;
        Close PartFile;
        !open the directory for reading
        OpenDir Directory,":/bd1:1/";
        !        WHILE ReadDir(Directory,Filename) DO
        Open ":/bd1:1/",PartFile\Write;
        Write PartFile,"YES";
        !        ENDWHILE
        !Close directory
        Close PartFile;
        CloseDir Directory;
    ENDPROC
I get only errors when running this code.
Error 40529 - File Access Error
Error 40228 - Execution Error

I am running RW6.09 on the system.

Regards

Answers

  • lemster68
    lemster68 ✭✭✭
    When I tried to do the same, also without success, I used these IO objects as found in the technical reference manual:


    Lee Justice
  • Is there any ABB admin who can give something on above mentioned?
    I have been through manuals from RW5 - RW7 and see nothing that indicates that this has been changed in the changelogs. 
    Is this a bug or are we just missing something? 
  • Have you tried connect the USB to the USB port outside the cabinet? I have succeeded to read from that port with the IO objects found in the technical reference manual ("usbdisk1" e.t.c.). 
    Best regards,
    Anders Spaak
    ABB Robotics
  • I have no other ports outside the cabinet except the one on the TP Unit, which I have also tried, and still no luck.

    The only USB ports that I have in my controller is the ones shown in the pictures.