question

Anutt K avatar image
0 Likes"
Anutt K asked Anutt K commented

How to send value from Globel Tabel to Robot Motion Paths.

Hello.

When I have some Globle Tabel for collect the value of Joint. How i can use the value in Tabel to create a Motion paths. Than So much for guid me.1661335742383.png

FlexSim 22.2.0
global tablerobotemulationmotion paths
1661335742383.png (29.0 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Anutt K commented

You can copy the values from the Global Table over into the robot's attribute tree with code. (Replace RobotName and PathName with the respective names)

Table pathtable = Model.find("RobotName>variables/pathtables/PathName/table");
for(int row = 1; row <= pathtable.numRows; row++)
{
    for(int col = 1; col <= 6; col++)
    {
        pathtable[row][col] = Table("GlobalTable1")[row][col];
    }
}

I assume you want to do this to change the paths of many robots at once (because otherwise I don't see a reason to not make the changes directly in the path GUI).

For this, another way would be to copy the entire 'pathtables' node from one robot on which you do the changes to all others. To reference the robots you could put them in a group together.

The following code would copy the path data from the first robot in the group "Robots" to all others in the same group.

treenode pathtable_first = Group("Robots")[1].find(">variables/pathtables");
for(int i = 2; i <= Group("Robots").length; i++)
{
    treenode pathtable_current = Group("Robots")[i].find(">variables/pathtables");
    createcopy(pathtable_first, pathtable_current, 1, 0, 0, 1);
}
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Anutt K avatar image Anutt K commented ·

Thank You! I'll try to implement your advice.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.