Running Example Jog through IDLE


#1

I’m trying to run python scripts to control the Dobot outside of Studios. However, I can’t even get the example jog code to run. When I try I get this error

Traceback (most recent call last):
File “H:/MyDobot/test jog.py”, line 3, in
dType.SetJOGJointParams(api, 150, 150, 150, 150, 150, 150, 150, 150)
NameError: name ‘dType’ is not defined

The example (which does run in Studio)

import math

dType.SetJOGJointParams(api, 150, 150, 150, 150, 150, 150, 150, 150)

while(True):
dType.SetJOGCmd(api, 1, 1, 1)
dType.SetWAITCmd(api, 500, 1)
dType.SetJOGCmd(api, 1, 0, 1)
dType.SetWAITCmd(api, 200, 1)

dType.SetJOGCmd(api, 1, 2, 1)
dType.SetWAITCmd(api, 500, 1)
dType.SetJOGCmd(api, 1, 0, 1)
dType.SetWAITCmd(api, 200, 1)