Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ABB IRC5 - Problem with I/O
#1
Hello everyone,
I want to know what's the proper way to use a Digital Output in a ABB Robot with IRC5 Compact Controller.
I'm using ethernet connection (so the driver in the robot is RDK_DriverSocket.mod) and everything regarding connection and movements works fine (this means that I am able to move the robot using RoboDK without any problem).
Now I'm trying to use a Digital Output (I've already configured the I/O system in the robot) but when we use the setDO function in python or even the "Set or Wait I/O Instruction" it doesn't seem to do anything... looking in the .mod file I've realized that the setDO function is actually commented (from line 273):

Code:
case 121:
COM_SendNum(121);
num1 := COM_ReadNum();
num2 := COM_ReadNum();
!DO_Signal := num1;
!DIO_Value := num2;
!SetDO DO_Signal, DIO_Value;
TPWrite "Implement setting Digital Outputs";
COM_SendNum(128);

Well, I just uncommented these 3 lines and there is a Error Message (40223), so apparently this lines are commented because of an issue???
Is there a way to fix it?

Thanks in advance!
#2
Hi Nox,

You should properly map your IO numbers provided from RoboDK to corresponding digital input/output and value variables (dignaldi, signaldo and dionum types as stated by RAPID programming language).

Albert
#3
I've managed to connect and control the I/O from the IRC5 Controller, but the problem is that when I try to use them with RoboDK the controller doesn't do anything, mainly because the driver file that you provide is not doing anything in that piece of code, like I said, the code is commented, and if I uncomment those lines, the controller prompts an error.
#4
Hi Nox,
I can try to take a look at that this week, but if you are on a hurry, you can correct this situation yourself.
Simply modify the ABB IRC5 post processor so that it gives you the proper I/O lines of code.
The fact that the I/O lines are commented directly comes from the post processor behavior.
If you find where those lines are generated, you can also modify them so that they fit with your controller I/O mapping.

Have a great day.
Jeremy
#5
I've seen the postprocessor and I think there's no problem with it, the file that I've shown is the file that is inside the robot controller (RDK_DriverSocket.mod) and this is the file that apparently doesn't work...
#6
是的,you are right it's my bad.

Still, you can modify those lines of code in the driver so that they match the way ABB/RAPID expect the I/O to be activated.
#7
That's the problem, I'm not that good in RAPID to modify this in order to get it working, and apparently just uncommenting those lines doesn't solve the error...
#8
Hi Nox,

I took a look at the situation and I think I found the way to activate your digital output.

The code should look a bit like this for the SetDo.
Code:
Var dionum DIO_Value;


num1 := COM_ReadNum();
num2 := COM_ReadNum();


IF num2 = 0 OR num2 = 1 THEN
DIO_Value := num2;
ENDIF

%"SetDO DO_Signal_" + NumToStr(num1) + ", DIO_Value;"%

And for the WaitDI.
Code:
%"WaitDI DI_Signal_" + NumToStr(num1) + ", DIO_Value;"%

There is still some integration to be done.
Inside your controller parameters, you need to correctly map your I/Os.
你还需要给名字匹配您的I / Othe "DO_Signal_X" and "DI_Signal_X" found in the code.
(See data type "signalxx" from the RAPID manual :https://library.e.abb.com/public/688894b...evJ_en.pdf)

Note that I didn't test that code, some modification may be needed.

Have a good day.
Jeremy
#9
Thank you Jeremy!
I'll take a look to this code later today and comment the results!
#10
So I tried the code that you sent, and it's still not working
[Image: LAfrWf9.png]
I had to comment the line 278 because of an error with the VAR.
Then I also changed the %" "% thing because of a syntax error.
And the red color line on "custom_DO_" says that the function is expecting a "num"...




Users browsing this thread:
2 Guest(s)