Opening a Text File Via USB on a Flex Pendant
Jasper_B
✭
in RobotStudio
I'm currently working on a project where we have to read a text file in order to pull values out of cut lumber to stack. We are able to put the file on a usb and read it via the virtual flex pendant with the file location / path being
" VAR string File_Location:="F:/CutList(Test).TRS"; " Then calling it later with " Open File_Location,File\Read; "
However when it comes to opening it on the pendant through the USB port on it, we are having trouble. We've tried many different paths "USB" "RemovableDisk" ect. But we either get an error saying it can't find it, or errors opening it for some reason. Could it just be the wrong path, maybe wrong usb. Any help would be appreciated.
" VAR string File_Location:="F:/CutList(Test).TRS"; " Then calling it later with " Open File_Location,File\Read; "
However when it comes to opening it on the pendant through the USB port on it, we are having trouble. We've tried many different paths "USB" "RemovableDisk" ect. But we either get an error saying it can't find it, or errors opening it for some reason. Could it just be the wrong path, maybe wrong usb. Any help would be appreciated.
Tagged:
0
Comments
-
I have done some tests myself using bd3: on the main computer, also using the pendant to select another predifined "object", usbdisk3, but with errors also. Seems to be a bug there, I even tried a smaller usb with less files on it. However, when I copy the file to the disktemp, it works! I assume diskhome will also work.Lee Justice0
-
You can not access the USB on the FlexPendant from RAPID.
There used to be a USB port on the front of the controller but this was removed shortly after the introduction of the USB port on the FlexPendant.
You can purchase from ABB aftersales the USB connector for the front of the cabinet and connect this to one of the USB ports on the main computer (if you want access to the USB port without opening the controller door).
VAR dir Directory; VAR string Filename; VAR iodev PartFile;!open the directory for reading
OpenDir Directory, usbdisk1;WHILE ReadDir(Directory,Filename) DOLoad usbdisk1\File:=FileName;
!do other stuff as required
ENDWHILE
!Close directory
Close PartFile; CloseDir Directory:0 -
Like @graemepaulin said: make sure the port is hooked up. Does the USB disk have a light that flickers?"F:/CutList(Test).TRS": Not sure if your file name above is the actual or just for example, but if it's actual, I'd remove the parenthesis and make the name as simple as possible to test.
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 798 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings