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.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
- 60 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 797 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings