Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Set param

#1
When I try to do in a program
Var x =Prog.setParam(ins_id);
Prog2.SetParam("Last",x);
Only to duplicate the entire program, works well except on Set tool instructions, aparentally is ok, but when execute the instruction, this tool change to O.
It's is the same on c# Api and python Api.
The same appears in the example that you provide to generate weaving (you do a copy of all instruction)
Perhaps is s bug?

On other hand , Do you have some documentation to know all the tricks and possibles Params of the instruction SetParam? Like if you use it on Item type program you can do it, in a Item type machining program yo can do...
#2
If i do this trick, it work well, but i don't undersetand becouse dont work without the modifcation of Frame and Tool.

var s = prog.SetParam(counter.ToString());

dynamic jsonObj = Newtonsoft.Json.JsonConvert.DeserializeObject(s);
jsonObj["Name"]="prueba "+ counter.ToString();
if (jsonObj["Type"] == "4")
{
prog.SetTool(DGH_DK._rdk.GetItemByName("Tool 0 Antorcha Fronius"));
}
else if (jsonObj(“类型”)= =“3”)
{
prog.SetFrame(DGH_DK._rdk.GetItemByName("UFRAME 1"));
}

else
{

string output = Newtonsoft.Json.JsonConvert.SerializeObject(jsonObj, Newtonsoft.Json.Formatting.Indented);
prog.SetParam("Last", output);
}
#3
Hi,

If the "Force original pose" is set on the source Program (ForcePose==1 in the JSON), which is typically the case on Machining projects, copying the instruction will result in the tool being reset. You can set the ForcePose to 0 on the copied instruction to fix this issue. We'll add the original pose in the JSON in a future update.

To list all available commands for RDK.Command() and Item.SetParam: RoboDK->Tools->Run Script->Show Commands
Please read theForum Guidelinesbefore posting!
Find useful information about RoboDK by visiting our2022世界杯32强赛程表时间 .
#4
Force pose don't work, but I can do the trick




Users browsing this thread:
1 Guest(s)