Loop Termination Bug


#1

In DobotStudio2020 and DobotSCStudio, I’ve encountered an issue of a loop iterating even after the break condition is fulfilled. I’ve tried programming the arm using T&P, Blockly, and Lua, but they all exhibit the same issue.

A simple example of what I’m talking about:

while (DI(0) == 1)
// Loop body
end

If DI(0) is changed from high to low during the loop body, the arm performs extra iterations as if the break condition wasn’t fulfilled.

Here’s a Google Drive link with a video demonstrating the issue:
https://drive.google.com/file/d/11SaDHSPCYVMQwtUBJ6q3NxJAIxEicDXg/view?usp=sharing

So far, the problem is fixed using the C# interface so I’ve been using that, but some of the functions aren’t working. MovJ and MovL work as expected, but JointMovJ, RelMovJ, and RelMovL return “invalid parameters”. I’ve triple-checked the data and number of parameters I’m passing, but no response from the arm.

An example of how I’m calling the RelMovJ:

OffsetXYZ offsetXYZ = new OffsetXYZ();
offsetXYZ.OffsetX = 5;
offsetXYZ.OffsetY = 0;
offsetXYZ.OffsetZ = 0;
bool blocked = false;
RelMovJ(ref offsetXYZ, blocked);

Could I get some examples on how to use these functions in case I’m using them incorrectly?


#2

Hello, JointMovJ, RelMovJ, and RelMovL are not applicable to MG400 in DobotSDK1.4.1
We use a new SDK to replace the old version. The new SDK is based on TCP/IP remote protocol and can be called as long as the programming language supports TCP/IP communication. Details can be viewed: https://github.com/Dobot-Arm/TCP-IP-Protocol/tree/EN-Version