VDefTool方法
描述
使用視覺偵測,計算TCP移動攝影機位置的工具偏移值。
注意:當工具為FixedCameraWithCal以外的類型時,機器人會根據目標偵測結果自動運作。小心機器人與周邊設備發生干擾。此外,這可用於避開各軸延伸姿態附近的奇點,防止工具設定期間發生錯誤。
語法
Sub VDefTool(ToolNumber As Integer, ToolDefType As SpelToolDefType, Sequence As String, Object As String)
Sub VDefTool(ToolNumber As Integer, ToolDefType As SpelToolDefType, Sequence As String, Object As String, Parent As Form)
Sub VDefTool(ToolNumber As Integer, ToolDefType As SpelToolDefType, Sequence As String, FinalAngle As Double, InitAngle As Double, TargetTolerance As Double)
Sub VDefTool(ToolNumber As Integer, ToolDefType As SpelToolDefType, Sequence As String, FinalAngle As Double, InitAngle As Double, TargetTolerance As Double, Parent As Form)
Sub VDefTool(ToolNumber As Integer, ToolDefType As SpelToolDefType, Sequence As String, FinalAngle As Double, InitAngle As Double, TargetTolerance As Double, RobotSpeed As Integer, RobotAccel As Integer)
Sub VDefTool(ToolNumber As Integer, ToolDefType As SpelToolDefType, Sequence As String, FinalAngle As Double, InitAngle As Double, TargetTolerance As Double, RobotSpeed As Integer, RobotAccel As Integer, Parent As Form)
參數
- ToolNumber
代表用以執行工具設定(1-15)之工具編號的整數 - ToolDefType
代表工具類型的整數。FixedCamera:透過使用未校正之固定攝影機,設定工具。J4Camera:計算移動J4攝影機的影像中心。J6Camera:計算移動J6攝影機的影像中心。FixedCameraWithCal:透過使用已校正之固定攝影機所設定的工具。 - Sequence
包含目前專案中視覺序列之名稱的字串運算式。 - Object
代表指定序列中視覺物件的字串運算式。當ToolDefType設為FixedCameraWithCal時,需要此參數。當ToolDefType不是FixedCameraWithCal時,物件應為空字串。 - FinalAngle
實數值,代表旋轉工具或攝影機工具的角度(度)。數值範圍:0、5~180、–5~–180。若省略,將被設為「90」。 - InitAngle
實數,代表設定暫時性工具時旋轉工具或攝影機工具的角度(度)。此值必須小於FinalAngle。數值範圍:-10~10。若省略,將被設為「5」。 - TargetTolerance
代表像素距離的實際值,將視覺偵測結果視為符合目標位置。數值範圍:0至3像素
如果省略,請設為「1」。 - Parent
視窗的父.NET表單(選用)。 - RobotSpeed
代表機器人速度(%)的整數變數(可省略)。數值範圍:0~100。若省略,將被設為「5」。 - RobotAccel
代表機器人加速度(%)的整數變數(可省略)。數值範圍:0~99。若省略,將被設為「5」。
另請參閱
VDefArm方法, VDefGetMotionRange方法, VDefLocal方法, VDefSetMotionRange方法, VGoCenter方法
VDefTool範例
VB 例:
m_spel.VDefTool(1, SpelToolDefType.J6Camera, "myseq", 45, 5, 3.0)
m_spel.VDefTool(1, SpelToolDefType.FixedCameraWithCal, "myseq", "myobj")
C# 例:
m_spel.VDefTool(1, SpelToolDefType.J6Camera, "myseq", 45, 5, 3.0);
m_spel.VDefTool(1, SpelToolDefType.FixedCameraWithCal, "myseq", "myobj");