I/O Control on RobotStudio
I have been crawling through Rapid and IRC5 manuals but have not yet found straightforward instructions on how to control I/O. The closest I got was this video, but it seems to use an older version of RobotStudio and following its instructions, we couldn't get it to work. After reading the Rapid Basic Overview, I tried writing this rapid script:
MODULE LED
PROC main()
SetDO do1, 1;
WaitTime 5;
SetDo do1, 0;
ENDPROC
ENDMODULE
But I don't know what the names of the digital outputs are or how to find them, so it gave me an error on do1.
Given my setup, what is the simplest way to turn on and off an I/O port. Is it a rapid script? The Configuration - I/O System table I managed to navigate to in RobotStudio? If someone could help me through the steps I would be quite grateful!
Comments
-
Have the real controller the DSCQ board configured? if so I suggest you use the go offline function I RS. The reason you get an error is that the io name isn't configured as an io signal in the virtual controllerPer Svensson
Robotics and Vision Specialist
Consat Engineering0 -
Thanks PerSvensson.
We followed a video tutorial ("How to configure I/O for a robot controller system in RobotStudio" by Henrik Berlin on youtube) and made some progress. In Controller > Configuration > I/O, we saw "d652" under Unit Type, on DeviceNet. So I added a new unit, type d652, connected to BUS devicenet. I then created a new signal, type DigitalOutput, assigned to my new unit.
We're not quite there though. Upon restart I got a controller error that it failed to communicate with the i/o unit, and that it was either not connected or at the wrong BUS address. The unit came installed with our irc5 so I think it is connected (there are a ton of wires from it going into the various cable bundles/ports within the controller box). I am thinking the problem must be the wrong bus address (the address assigned to it is 63). I have no clue how I'd find the "right" bus address for the d652. Any idea what steps I should take? Thanks a lot.
0 -
You can find the address by looking at the connector on the left:
"NA 0" through "NA 5" code the address in binary form. The connector will probably have a 'bridge' connecting some of the "NA" ports to 0 V. Check which "NA" ports are connected to calculate the address.0 -
By default the cards usually comes preconfigured starting with adress "10" but as GraafDerk says you can easily check that yourselfPer Svensson
Robotics and Vision Specialist
Consat Engineering0 -
Ok thanks guys, this is really helpful. So I thought it must be connected but I don't see anything connected to the NA0-NA5 pins. I've attached a picture. Does this mean it is not connected to the devicenet bus, and if so, how do I connect it? Thanks a lot.0
-
An update: I figured that plastic card sticking in there might be bridge Graafderk mentioned. I went back into RobotStudio and changed the bus address to 10, and I didn't get an error upon restart! Very exciting, seemed like it must be communicating.
Now I could open up IO System > DeviceNet1 > unit_lighttest, and under that, there was output_lighttest, the digital output I had created. I could toggle its value between 0 and 1. I thought this might be it, so I connected my LED circuit (already designed and tested to work at 24 V) to dsqc 652 pictured above. I connected the leads of the LED circuit to the upper green block labeled Digital Output. The power lead went to the "1" pin on the upper left side of the green port and the ground lead went to the "0" pin on the upper right side. However, when I turned the IRC5 back on and toggled the value of output_lighttest, nothing happened.
Confused, I connected my circuit to the "0" pin and "24V" pin of the Digital Output block. And surprisingly enough, when I turned on the IRC5, the LED still didn't light up. Am I connecting to the wrong place, or is my I/O initialization on robotstudio still flawed somewhere?
0 -
Sorry for all the posts - if there is a way to edit previous comments, I haven't found it. Just wanted to attach a couple pictures. The first is my first test. The two alligator clips go from "1" and "0V" to my LED circuit. The second shows the entire door of the IRC5. Hope this helps.0
-
I take it the LED on the card doesn't light up showing the output is high? Looking at your photo both Network and Module status LEDs are off, is there power to the IO board?0
-
I didn't know there was an output high LED on the card. Well, the IRC5 was open when those pictures are taken. I can't turn it on with the box open, so there's no way for me to see that.0
-
You need to add an external 24V power source to the output connector (either X1 or X2, the rightmost pin on the connector). The module does not forward power from the X5 connector (which is used to power the logic inside the module). P.S. you can edit your posts within a certain timeframe using the 'gear' button, which appears just below the time/date you've posted when you hover over the post. I think it only shows up within the first hour after posting.1
-
graafderk said:You need to add an external 24V power source to the output connector (either X1 or X2, the rightmost pin on the connector). The module does not forward power from the X5 connector (which is used to power the logic inside the module).
Follow up question. Once I've figured out the 24V issue and I want to use digital output 1, or 2, or 3. What determines which output pin I'm controlling? Is it the "Unit Mapping" variable when I am setting up my digital output signal in RobotStudio?
0 -
So I started editing the comment, but by the time I finished, it wouldn't allow me to save it because I was after the hour mark. What a forum. Anyway:
Do you know how that 24V is typically supplied? Got it, the XT31. Right now I've got 1 and 5 on the XT31 connected to 24V and 0V on the X1, respectively. With alligator clips. Is there a legitimate connector made for this? Without being able to have the IRC5 open when it's powered on, I still can't tell if the LEDs are on but I'm hoping they are.
Follow up question. Once I've figured out the 24V issue and I want to use digital output 1, or 2, or 3. What determines which output pin I'm controlling? Is it the "Unit Mapping" variable when I am setting up my digital output signal in RobotStudio? I unit mapped my digital output to 1 then connected to pin 1 on X1. Still nothing when I toggle the value.
0 -
Unit mapping starts at 0 which is physical no 1 on the DSQC card. What is the status of the MS and NS diods found on the card? If everything is working and 24V connected and signal configured in the controller the green output led should lit even if it's not connected. If you want you can send me a backup and I will have a look at it.Per Svensson
Robotics and Vision Specialist
Consat Engineering0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings