variable Robtarget
Hello to all..
i am trying this code....
X-Coordinates := a; (From external plc)
Y-Coordinates := b; (From external plc)
Z-Coordinates := c; (From external plc)
VAR Robtarget delta
delta.trans.x := a; (From variable a to robtarget trans.x)
delta.trans.y := b; (From variable b to robtarget trans.y)
delta.trans.z:= c;
i am getting an error. I am writing the code in Robot Pendant, and to equate the variable a,b,c with trans.x,trans.y,trans.z values of robtarget , when i use the assign function ":=" and data type Robtarget. I can select robtarget "delta" but how to write trans.x,trans.y,trans.z to move values from a,b,c to robtarget delta. if i select all and write it myself it gives error. If some guidance on how to write and use each value trans.x,trans.y,z..
i am trying this code....
X-Coordinates := a; (From external plc)
Y-Coordinates := b; (From external plc)
Z-Coordinates := c; (From external plc)
VAR Robtarget delta
delta.trans.x := a; (From variable a to robtarget trans.x)
delta.trans.y := b; (From variable b to robtarget trans.y)
delta.trans.z:= c;
i am getting an error. I am writing the code in Robot Pendant, and to equate the variable a,b,c with trans.x,trans.y,trans.z values of robtarget , when i use the assign function ":=" and data type Robtarget. I can select robtarget "delta" but how to write trans.x,trans.y,trans.z to move values from a,b,c to robtarget delta. if i select all and write it myself it gives error. If some guidance on how to write and use each value trans.x,trans.y,z..
0
Comments
-
Are a, b and c declared as num type? After selecting delta, edit, abc. Type .trans.x and such.Lee Justice0
-
yes sir..
a,b and c are num type. as the coordinates data from plc is moved into a,b and c.0 -
i use the same method as you respectable mentioned, selected delta and edit. when write ".trans.x" etc and equate it with "a".
a:= delta.trans.x
it turns the writing "trnas.x" into red colour like wrong syntax or something.
0 -
delta.trans.x:=a; is correct syntax. Did you make a typo?
it turns the writing "trnas.x" into red colour like wrong syntax or something.Lee Justice0 -
Sorry for the late reply i was suffering from fever.
Sir, that issue is resolved the problem was not with the "trans.x" syntax. In the motion command right after the trans.x, trans.y and trans.z values i have to use "Wobj1" from optional arguments for my job which i was missing.0 -
There is a query regarding programming if you kindly give it a check
For some numeric value like "4" saved as Input sent from the external plc,
if i see the IO tab the value is shown "4" but saving the value in some variable "reg1", and check the Program data > "num" reg1 it is 3.999999..
Using this variable in IF command generates an error like " IF reg1 := 4 then" ... it always go for the second option "IF reg1 < 4 then"..
i think Round() function can't be used in IF condition..
0 -
Round it first then.Lee Justice0
Categories
- All Categories
- 5.5K RobotStudio
- 394 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 309 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