Posts: 4,179
Threads: 2
Joined: Apr 2018
Reputation:
190
The post processor and the result look good. I see you added the program calls in the header so if you generate the program (F6) you should be able to run it.
Where does it fail?
On the other hand, if you are using the driver ("Run on robot" option) it may fail as this command is not integrated in the driver. Is this what you are looking for?
Another detail: with Dobot you can buffer the commands so they are all executed in one step, avoiding jerky motion. This behavior can be changed using the isQueued flag.
Posts: 7
Threads: 1
Joined: Dec 2019
Reputation:
0
01-08-2020, 09:19 PM
(This post was last modified: 01-08-2020, 09:23 PM by amber.saffen.)
It runs but when it gets to the suctionOn() function call it just prints "Program suctionOn() does not exist. Skipping function call."
When I generate the program, it generates fine and even has the function call where it should be. The robot will do all it's joint movements but skips the call.
To be more clear, it moves when I have 'Run on Robot' selected (but skips the function call). When I generate and send the program (Ctr+F6) it doesn't move at all.
Posts: 74
Threads: 0
Joined: May 2019
Reputation:
7
01-13-2020, 07:06 PM
(This post was last modified: 01-15-2020, 10:13 PM by Phillip.)
The driver doesn't implement the suction on and as such the command gets skipped. The post processor generated program (Ctr+F6) not moving the robot at all means that the script is not running correctly. The console output from the program running often has useful insight on why it's not working.
For example the dobot library for python requires python 3.6.0 or later.
Posts: 7
Threads: 1
Joined: Dec 2019
Reputation:
0
The python is definitely up to date. As for the console output, when I run it through "Run on robot", the only output is that it skipped the funtion. When I generate and send (Ctr+F6) I don't get any output. A console window pops up and closes quickly and then nothing. Is there some error log somewhere I can open?
Posts: 74
Threads: 0
Joined: May 2019
Reputation:
7
When you choose the option generate a robot program as... (Shift+F6) you can choose a directory to generate the program in. You can then look at the generated files and run them outside of RoboDK . Running the program may require "DobotDll.dll" to be in the same directory as the program you are running. You can find find it in the "bin" folder of your RoboDK installation folder.
Posts: 74
Threads: 0
Joined: May 2019
Reputation:
7
To clarify, the difference between "run and robot" and "generate program" is that that when using "run on robot", robodk sends commands to the robot directly as the program is simulated in robodk but generally can't be easily modified by the user. "Generate program" generates a script using python that the robot executes. Since the dobot does not have a native scripting language the robodk post processor generates a python script that sends commands to the dobot. Generating the Program and Sending it simply automatically runs that script after it's generated.
The post processor is a python script so that you can add new functions to it like unique tools. The problem with you seem to having with running the script is that you don't have the python module "packaging" installed. You install python modules from the command line using a command like "pip install packaging"
Posts: 7
Threads: 1
Joined: Dec 2019
Reputation:
0
I finally found the problem with my python packages and got past that error (even though I downloaded python fresh, pip still wasn't updated). Now it's having problems with the DobotDll import. When I try to run the program MoveandSuck I get
PS C:\Users\amber.saffen> & C:/RoboDK/Python37/python.exe c:/Users/amber.saffen/Documents/RoboDK/MoveandSuck.py
Connecting to: COM10
Traceback (most recent call last):
File "c:/Users/amber.saffen/Documents/RoboDK/MoveandSuck.py", line 25, in <module>
dType.DobotConnect.DobotConnect_NoError: "DobotConnect_NoError",
NameError: name 'dType' is not defined
Posts: 4,179
Threads: 2
Joined: Apr 2018
Reputation:
190
The required DLL is here:
C:/RoboDK/bin/DobotDLL.dll
Did you install RoboDK 64 bit or 32 bit?
Can you provide the Python file you are trying to run?