回家判断,运动到指定点,获取当前位置,如何获取运动结束判断

This commit is contained in:
zhengxuan.zhang
2022-10-17 20:21:56 +08:00
parent 7861cdf511
commit 3473b1d637
9 changed files with 330 additions and 82 deletions
+2 -2
View File
@@ -68,7 +68,7 @@ namespace HSI_SEVENOCEAN_EF1_CsTest.HSI
var eventFunctionId = (Def.HSI_EVENT_FUNCTION_ID)eventId;
switch (eventFunctionId)
{
case Def.HSI_EVENT_FUNCTION_ID.HSI_EVENT_MOTION_DCC_HOME:
case Def.HSI_EVENT_FUNCTION_ID.HSI_EVENT_MOTION_DCC_HOME://准备回家
{
MessageBox.Show(Resources.Interface_Tips_Home_Machine, Resources.Interface_Tips,
msgBtn, MessageBoxIcon.Information);
@@ -80,7 +80,7 @@ namespace HSI_SEVENOCEAN_EF1_CsTest.HSI
msgBtn, MessageBoxIcon.Information);
break;
}
case Def.HSI_EVENT_FUNCTION_ID.HSI_EVENT_MOVE_POINT:
case Def.HSI_EVENT_FUNCTION_ID.HSI_EVENT_MOVE_POINT: //定位完成
{
MessageBox.Show(Resources.Interface_Tips_Motion_Finished, Resources.Interface_Tips,
msgBtn, MessageBoxIcon.Information);
@@ -121,6 +121,7 @@
<EmbeddedResource Include="Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
+2 -1
View File
@@ -66,7 +66,8 @@ namespace HSI_SEVENOCEAN_EF1_CsTest
dPos[1] += 10.0;
rStatus = Motion.SetPositionXyz(Def.HSI_MOTION_AXIS_ALL, dPos[0], dPos[1], dPos[2],
Def.HSI_MOTION_MOVE_TYPE.HSI_MOTION_MOVE_NOWAIT, 0.0);
Console.WriteLine("Motion.SetPositionXyz:{0},{1},{2} {3}", dPos[0], dPos[1], dPos[2],rStatus);
break;
case ConsoleKey.Enter:
rStatus = Motion.GetPositionXyz(Def.HSI_MOTION_AXIS_ALL, ref dPos[0], ref dPos[1],