Hi Joe.
It's Dhananjay. I'm trying to program for the Device Task Definition workbench in DELMIA. This is in the DNBIgpSetupInterfaces framework. Below is part of the class. It think it is a bug because while I can use the command "SetJointTarget", I can't get "SetAuxillaryAxisValues"to work.
Imports DNBDevice
Imports DNBRobot
Public Class OLP
Public Property ProgramName As String
Private Property Device As ProductStructureTypeLib.Product
Private Property Aux As ProductStructureTypeLib.Product
Private Property OLP As DNBIgpTagPath.RobotTask
Private Property Operations As List(Of DNBIgpTagPath.Operation)
Public Property RobotMoves As List(Of DNBIgpTagPath.RobotMotion)
Private Property count As Int16 = 0
Public Sub New(ByVal programName As String, ByRef device As Object, ByRef aux As Object)
Me.ProgramName = programName
Me.Operations = New List(Of DNBIgpTagPath.Operation)
Me.RobotMoves = New List(Of DNBIgpTagPath.RobotMotion)
Me.Device = device
Me.Aux = aux
Dim objRobotTaskFactory As DNBIgpTagPath.RobotTaskFactory
objRobotTaskFactory = device.GetTechnologicalObject("RobotTaskFactory")
Dim objRobotTask As DNBIgpTagPath.RobotTask
Me.OLP = objRobotTask
objRobotTaskFactory.CreateRobotTask(programName, Me.OLP)
End Sub
'MotionType
'0 = Joint Move
'1 = Linear Move
Public Sub AddPoint(ByVal Target() As Object, ByVal MotionType As Int16)
Dim objOperation As DNBIgpTagPath.Operation
'Dim operations()
'Me.OLP.GetAllOperations(operations)
If (count = 0) Then
Me.OLP.CreateOperation(objOperation, Nothing, objOperation)
Else
Dim operations(999)
Me.OLP.GetAllOperations(operations)
Me.OLP.CreateAfterOperation(operations(count - 1), objOperation)
End If
count += 1
Me.Operations.Add(objOperation)
Dim objRobotMotion As DNBIgpTagPath.RobotMotion
objOperation.CreateRobotMotion(objRobotMotion, False, objRobotMotion)
objRobotMotion.SetJointTarget(Target)
Dim Motion(1)
Motion(0) = -0.25
Motion(1) = -0.25
objRobotMotion.SetMotionType(MotionType)
objRobotMotion.SetAuxillaryAxisValues(Me.Device, "Aux", Motion)
End Sub
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP