我正在尝试写一个简单的脚本使用Zaber控制台。我基本上必须把我的机械臂移动到一个特定的位置(即43.9毫米),保持这个位置10分钟,然后回到原来的位置。
我找到了移动的所有命令(快/慢和一定的加速度),但我不能理解如何让机器停留在43.9 to的中毒状态10分钟。
有什么建议吗?我用“这门语言”写代码:
if(PortFacade.Port.IsAsciiMode)
{
Conversation.Request("move abs", 881890);
Conversation.PollUntilIdle();
}
else
{
Conversation.Request(Command.MoveAbsolute, 881890);
}非常感谢。
里卡多
发布于 2017-03-16 08:19:19
您可以在此处找到脚本页面:http://www.zaber.com/wiki/Software/Zaber_Console/Scripting
脚本中的语言使用的是C#,可以像这样编写一个快速程序来执行您想要做的事情:
#template(simple)
var device1 = PortFacade.GetConversation(1); // This is assuming your device
// is device 1 in the chain.
// The device list in Zaber Console will let you know the device number.
// Alternatively, you can use the renumber command to change the device number.
device1.Request("move abs 100000"); //the data value for 43.9 mm will vary
// from device to device. The formula would be 43.9[mm]/ Microstep size[mm] = Data value
// The microstep size can be found on the product page at www.Zaber.com, or
// email Contact@Zaber.com
Sleep(5000); //Sleep is in milliseconds
device1.Request("move abs 0"); 如果您有任何问题,请不要犹豫,给Contact@Zaber.com发邮件。
致以敬意,
阿尔伯特
https://stackoverflow.com/questions/42814552
复制相似问题