Reading command string from .txt file
Hey guys,
Is there any way I can read a MoveL command stored on a txt file? I've been trying to use the ReadStr function but the path to the text file on my pc is not being acknowledged by the compiler. The program runs perfectly until it stops at the Open file line with the path.
I'm trying to follow this example I saw on RAPID's manual:
Instead of "HOME:/file.doc" I'm using "C:\test\test_v1", which is the location of the txt file on my pc. I'm sorry if it sounds stupid but I'm just beginning to work with the RAPID language and I'm still not familiar with its synthax.
What is this "HOME:\" in the beginning of the example path? I inittially assumed it was there just for the sake of the example and that this would actually be my C:\ drive, but I keep getting errors if I refer to C:\. Is it something I have to set on RobotStudio?
Btw, I've connected the pc directly to the robot i.e., there's no intervention through the FlexPendant. The robot is an IRB 1600, 6kg, 1.45m with an IRC5 controller.
Any ideas on what the correct synthax for the path should be?
Any help would be greatly appreciated!
Alessandra
Comments
-
Hello Alessandra,hd0a is the flash drive of the robot. hd0a\system\home is the directory where HOME:/ is linked to.You can save the data you want from the string to the disired RAPID-data. Then you can use this data in an already existing move instruction.If you want to create the entire instruction offline you would have to create the entire module, with the data, routine, and instructions inside, and use the LOAD instructionRobWelding
The Netherlands0 -
Hi SjoLi,Thanks a lot for your answer! I had no idea it was that simpleI just want to read coordinates from the txt file in order to use them in a simple MoveL instruction on the RAPID code. These coordinates will be constantly updated as needed and that's why I think the ReadStr instruction would be appropriate. But I'll take a look at LOAD as well to learn what I can do with it.Anyways, thank you once again!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