PC SDK: read and write RECORD in C#
ko414du4
✭
in RobotStudio
Greetings all,
I have a RECORD and a variable array of that type as follows:
How can I access myRecs in C#? I tried using structure but then I am not sure how to use it or if have defined it correctly. Here is my structure:
Any help and hints are deeply appreciated.
I have a RECORD and a variable array of that type as follows:
RECORD rec
num num1;
robtarget tgt;
ENDRECORD
TASK PERS rec myRecs{3}:=[
[2,[[200,300,400],[1,1,1,1],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]]],
[2,[[200,300,400],[1,1,1,1],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]]],
[2,[[200,300,400],[1,1,1,1],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]]]];
[2,[[200,300,400],[1,1,1,1],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]]],
[2,[[200,300,400],[1,1,1,1],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]]],
[2,[[200,300,400],[1,1,1,1],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]]]];
How can I access myRecs in C#? I tried using structure but then I am not sure how to use it or if have defined it correctly. Here is my structure:
public struct Rec : IRapidData
{
private Num num1;
private RobTarget tgt;
public Rec(Num num1, RobTarget tgt)
{
this.num1 = num1;
this.tgt = tgt;
}
public Num Num1
{
get
{
return num1;
}
set
{
num1 = value;
}
}
public RobTarget Tgt
{
get
{
return tgt;
}
set
{
tgt = value;
}
}
public void Fill(string value)
{
throw new NotImplementedException();
}
public void Fill(DataNode root)
{
throw new NotImplementedException();
}
public void FillFromString(string newValue)
{
throw new NotImplementedException();
}
public DataNode ToStructure()
{
throw new NotImplementedException();
}
}Any help and hints are deeply appreciated.
0
Categories
- All Categories
- 5.6K RobotStudio
- 401 UpFeed
- 21 Tutorials
- 15 RobotApps
- 306 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.9K Robot Controller
- 363 IRC5
- 81 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 853 RAPID Programming
- 31 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 110 Collaborative Robots
- 5 Job listings