MG400 programming


#1

I have read MG400 Programming Guide. Okay, there is a DI command. But is there analogue of the WHILE command? The program waits for a DI signal (true or false it doesn’t matter) and does nothing.


#2

Hi Vladimir, for Blockly, the function exists:
lQLPDhrJYDpxEwJ9zQG3sDCZRa2Bp6gdAXctVEMACQA_439_125
But for script, the API is not available. You can try with the following sentence:


#3

Thanks for the answer. Blockly? Is this already a DobotStudio? I’m reading the DobotStudio manual right now. This tutorial uses DoboM1 as an example. I understand correctly that studio applies to MG400 too?
The second option is a little strange, but it needs to be tested.
I want to buy MG400, but interaction through the GPIO is very important for me.
Therefore, I study this topic.


#4

Hi Vladimir, you can use DobotSCStudio for do it. The user guide for DobotSCStudio can be downloaded from Dobot official website: https://www.dobot.cc/downloadcenter/mg400.html?sub_cat=213#sub-download


#5

There is a problem with this “wait digital input controler D1 on” function as it does not appear to be used in Blockly’s available functions with Dobot MG400.
As I can see some blockly functions are not available for the Dobot MG400. What are the ones that are not available?


#6

For example, it is important for me that the vacuum gripper takes the workpiece. In order to be sure of this, I placed an optical sensor(TCRT5000) on the gripper. And if the sensor does not give a signal, then the MG400 does not move.


#7

Sorry Victor, I noticed that the blockly is only available when you use CR. For MG400, you might need to use the script for this function


#8

Hi Vladimir, I think the sample script in my screenshot can solve your problem:

while true do
if DI(1) == 1 then
break
end
end

Which means if the sensor detects no signal, the loop will be going on and on until the it detects an obstacle. And when it does, it will jump out of the circle and move to another part of your program.


#9

A curiosity about and differentiates between the functions of Blockly using the DobotStudio2020 and the DobotSCStudio.
In the DobotSCStudio the “Wait x seconds” function does not appear while this Blockly function does appear in the DobotStudio2020.

Is this a mistake? Attached photo.


#10

Hi Victor, it’s the problem of the version, and after the update in the future, there will be the same block in DobotSCStudio as well