Reading file in RAPID does not work .
milerik
✭
in RobotStudio
Hello there !
I want to use OPEN command and read an TXT file. Offline mode is working like a charm ( txt file contains coordinates) , but when I uploaded the code to the real robot is writing an error on the pedant :
Error 41676 Device access error , and write the path that containts the *.txt files.
Its a simple code of lines :
PROC Reading()
VAR iodev file;
VAR string text;
Open "HOME:" \file:= "1.txt" , file \Read;
!TPWrite ReadStr(file);
Rewind file;
!text := ReadStr(file\Delim:=",");
Runnable:= ReadNum(file);
Close file;
ENDPROC
the HOME folder the default one.I did not change it . Its on my laptop hard drive
C:\Users\Hanokri\Documents\RobotStudio\Systems\IRB140_6kg_0.81m_typeC_28\HOME\1.txt
Maybe I need to calibrate the controller somehow, to see my laptop folder ? I connected the robot via Ethernet cable.
I welcome any answer , please : )
I want to use OPEN command and read an TXT file. Offline mode is working like a charm ( txt file contains coordinates) , but when I uploaded the code to the real robot is writing an error on the pedant :
Error 41676 Device access error , and write the path that containts the *.txt files.
Its a simple code of lines :
PROC Reading()
VAR iodev file;
VAR string text;
Open "HOME:" \file:= "1.txt" , file \Read;
!TPWrite ReadStr(file);
Rewind file;
!text := ReadStr(file\Delim:=",");
Runnable:= ReadNum(file);
Close file;
ENDPROC
the HOME folder the default one.I did not change it . Its on my laptop hard drive
C:\Users\Hanokri\Documents\RobotStudio\Systems\IRB140_6kg_0.81m_typeC_28\HOME\1.txt
Maybe I need to calibrate the controller somehow, to see my laptop folder ? I connected the robot via Ethernet cable.
I welcome any answer , please : )
0
Comments
-
Do you have a copy of the txt file on the robot or is it only on you laptop?0
-
It is only on my laptop. But I realized I can not used this methode , the robot is checking its on hard drive only, not on my laptop harddrive .Can I use Socket Messaging to get the same result? I mean my rapid code is already upload on my robot and Its in run mode, waiting for 1 value to begin reading incoming X and Y coordinates from my labview TCP/IP connection. I get the string(coordinates) from like this...
SocketReceive socket1 \Str:=received_string;...then received_string: = VAR NUM Y_coordinate . Could It work ?0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings