how to assign data to pos through external files
WuYue
✭
in RobotStudio
Hi,
I am reading the coordinate [x,y,z] from external txt file into an array. My questions are:
1) how to assign the array to pos type? for example, I have input=[1,2,3], and I define VAR pos position; can I use position :=input?
2) as my position is a VAR (variable) already. When I define
VAR pos position;
VAR num input{3};
VAR robtarget Target_20:=[position,[0.499999903,0,0.86602546,0],[0,0,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]];
the program has this error: the expression position is not a constant expression. How can I solve this problem?
Thanks!
Tagged:
0
Comments
-
Hi this may he PROC myTest() VAR pos myPos; VAR num myPosArray{3}:=[1,2,3]; VAR robtarget myTarget; myPos.x:=myPosArray{1}; myPos.y:=myPosArray{2}; myPos.z:=myPosArray{3}; myTarget.trans:=myPos; ENDPROCPer Svensson
Robotics and Vision Specialist
Consat Engineering0 -
Hi, PerSvensson, Thanks for your reply! It works!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)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings