How To Configure DO or DI Signals for DENSO Robots in Master-Control Communication?
DENSO robots provide a large number of DO and DI ports. You can configure the mapping between DOs and DIs of DENSO robots and those of Mech-Viz.
Configure Mapping Between DOs of Robots and Those of Mech-Viz
|
To configure the mapping between DOs of the robot and those of Mech-Viz, open the cao_controller.py file and modify the value of _GO_Start_Num in line 5. For example, you can modify the value of _GO_Start_Num to 100 to indicate that DO0 of Mech-Viz corresponds to D0100 of the robot.
from win32com.client import Dispatch
_J_REG_Start = 10
_J_REG_MaxLimit = 90
_GO_Start_Num = 24
Configure Mapping Between DIs of Robots and Those of Mech-Viz
|
To configure the mapping between DIs of the robot and those of Mech-Viz, open the denso_robot_adapter.py file and modify IOB8 in line 39. For example, you can modify IOB8 to IOB100 to indicate that DI0 of Mech-Viz corresponds to DI100 of the robot.
...
def run(self):
time.sleep(0.5)
pythoncom.CoInitialize()
eng = Dispatch("CAO.CaoEngine")
ctrl = eng.Workspaces(0).AddController("RC1", "CaoProv.DENSO.RC8", "", "Server={}".format(self.host))
self.arm = ctrl.AddRobot("Arm1", "ID=0")
self.di = ctrl.AddVariable("IOB8", "") # DO: IOB24 DI: IOB8
while self.arm:
...