June 19, 2019, 03:37:10 AM
Robotforum | Industrial Robots Community

 Setting up some I/O on a KRC2 ed. 2005

veryhot_post Author Topic:  Setting up some I/O on a KRC2 ed. 2005  (Read 21866 times)

0 Members and 1 Guest are viewing this topic.

July 21, 2016, 02:26:29 PM
Reply #50
Offline

Wall-E


Hi SKyeFire,

Are you saying that I don't need these power lines to my Devicenet cable in my setup ?
My Turk friends had a different setup, with an external Beckhoff PLC used as a master, and the robot as a slave.
That Beckhoff PLC was nifty, with a touch screen by the way...

He has done dozens of robot integrations and knows what he's doing.


Today at 03:37:10 AM
Reply #51

Advertisement

Guest

July 21, 2016, 07:18:42 PM
Reply #51
Offline

SkyeFire

Global Moderator
No, you have to provide the power on the Comm cable -- the robot DN port requires that power, even if no other unit on the bus does.

July 25, 2016, 12:04:54 PM
Reply #52
Offline

Wall-E


OK, I re-wired the 24 V DC so that it reaches the Devicenet cable.
The reason why I had to plug it on the MFC card end is that the silly cable end that Beckhoff sold me has terminals so small that you can hardly plug the devicenet threads in, so there is absolutely no way to plug the juice here.
I would have been much better off with a simple (and MUCH cheaper) Combicon 5 pin terminal for both ends.

At the beginning, I thought I was going to flip the cable and have the big ending on the MFC side, but it's so big it doesn't fit !
Anyway, it looks silly, but at least it works, and I can see there are extra LEDs that lit up, and they are green, which has to mean I did something right :)

I also added 2A breaker switches as I have been advised.

Now there's only a digital input and a a digital output left, but I didn't have time to fool around with the IOSYS.INI file.
Once that is done, what is the usual way to check if the IO is working other than running a program that would make use of them ?

Cheers,

July 25, 2016, 12:16:29 PM
Reply #53
Offline

Wall-E


Tiny terminals of the fancy Beckhoff Devicenet ending
 :down:

July 25, 2016, 03:42:26 PM
Reply #54
Offline

SkyeFire

Global Moderator
What are the four empty terminals on the second green terminal block for?  Going by the labelling, you might be able to terminate power there, assuming those terminals are linked to the V+ and V- on the 5-pin connector.

Aside from that, usually the quick test for I/O is to wright a program that will "sweep" all the output bits and turn them on, then off, about 1/sec.  You run it while watching the output LEDs on the slave module, and confirm that the bits line up.

July 25, 2016, 03:56:24 PM
Reply #55
Offline

Wall-E


Hi SkyeFire,

This ending can act as a "terminal" , but also as a plug for a serial devicenet slave.
Therefor, there can be a second cable to daisy-chain components.
That's why there's also a little swith on the back to set it as the end or the middle of a Devicenet chain, and this is why I think it would not work to plug the power on the second green terminal.

I'll make a program as suggested, thanks !

Cheers,




July 25, 2016, 06:05:03 PM
Reply #56
Offline

panic mode

Global Moderator
that is easy to test, check continuity between two groups of terminals for both switch positions. switch is small, seem to be SPDT or at most DPDT...
1) http://www.robot-forum.com/robotforum/kuka-robot-forum/read-first/
2) if you want reply about robot, post it in forum
3) read 1 and 2

Today at 03:37:10 AM
Reply #57

Advertisement

Guest

August 29, 2016, 07:46:25 AM
Reply #57
Offline

Wall-E


The plasma cutter is online !

At least the digital IN and OUT, which is sufficient to control the torch and run the robot with the proper timing.
Next step is to try and use the analog "divided tension" input to adjust tool X in real time (if at all possible).

Thanks to SkyeFire and Panic ; your help was invaluable !

Video : https://goo.gl/photos/p5ciYGpMbNvyhFwa7

Cheers,

August 29, 2016, 10:52:33 PM
Reply #58
Offline

panic mode

Global Moderator
so now i get plasma cut souvenir of my choice?  :cheer:

August 30, 2016, 07:17:16 PM
Reply #59
Offline

Wall-E


"so now i get plasma cut souvenir of my choice? "

Sure ! As long as it's Mickey Mouse.

:)

May 16, 2017, 09:02:08 PM
Reply #60
Offline

Wall-E


UGH...

I hadn't been using the I/Os for some time, and I just ran into a "error on writing driver dn2drv" error message.
The coupler has got all it's LEDs green, but the digital Inputs and Outputs don't work when they are supposed to while running my program (they remain OFF).

I haven't changed anything, be it hardware or software.
The iosys.ini file is the same that got everything working last time.

I just have no idea why I get this error message...

« Last Edit: May 16, 2017, 09:23:43 PM by Wall-E »

May 17, 2017, 01:19:55 AM
Reply #61
Offline

panic mode

Global Moderator
be it hardware, or software or wiring or ...?  :-)

May 17, 2017, 06:23:27 AM
Reply #62
Offline

Wall-E


Hi Panic,

On the hardware side :
-The devicenet cable looks just fine, I checked that it had it's 24V.
-The Beckhoff coupler has green lights all over.

On the software side :
- I opened the Telnet console and typed "dnwho" to get some sort of diagnostic, as you suggested in an earlier post but I got an error message ; something like "syntax error".
I searched for some reference on that Telnet thing, but in vain.
-When I display the list of loaded drivers, I can see that the Devicenet driver is loaded
-The first time I run the program , it stops when I get the error message about the "dn2drv", but if I acknowledge, then close and re-open the program, I can run it from start to end, but IOs are ignored.
-If I display the I/O status panel, I can see that they are all off during execution of the program.

Where should I look from here ?
Thanks for your help.


May 17, 2017, 07:09:39 AM
Reply #63
Offline

Leon


have you tried resetting the driver? i have had same sort of problems once which where a result op power loss on the I/O side and it did not reconnect on its own as it normally does
Every problem has a solution, that isn't the problem. The problem is the solution.

Today at 03:37:10 AM
Reply #64

Advertisement

Guest

May 17, 2017, 07:17:02 AM
Reply #64
Offline

Wall-E


Hi Leon,

do you mean Configure > I/O Driver > Reconfigure I/O Driver ?
Yes, I have tried this, with no effect.


May 17, 2017, 09:17:01 PM
Reply #65
Offline

Wall-E


OK folks, I found the solution :

Configuration- IO Driver - Reconfiguration- Reset.
I just needed to log into the "Expert" profile to access this.

Cheers

June 13, 2018, 08:10:01 AM
Reply #66
Offline

Wall-E


Hi, it's me again.

For now, I've got a very simple setup working fine : a Digital Input with 4 channels and a Digital Output, also with 4 channels.
The I/O mapping is described in IOSYS.INI as follows :
OUTB0=5,0,x1  ;$OUT[1-8]
INB0=5,0,x1   ;$IN[1-8]

In fact, contrary to the example given by Panic Mode, it seems my Beckhoff coupler reads the outputs first, and then the inputs, but that's no big deal, and he mentionned that this could be the case : "you should read manual for your buscoupler!".
 
Now, I want to add analog inputs, and this forces me to actually understand the whole enchilada to type in the proper mapping description.
This is where I get lost : Panic mentions that, in the Input image and Output image, the bytes from the Analog signals always come first, before the Digital signals, but he proceeds to give the opposite as an example.
Am I missing something, or is this a mistake ?


June 13, 2018, 12:14:06 PM
Reply #67
Offline

panic mode

Global Moderator
i assure you, i made no mistake...


you seem to be confusing order of mapping statements in IOSYS.INI with order of data in the telegram ("image").


This:
Code: [Select]
OUTB0=5,0,x1  ;$OUT[1-8]
INB0=5,0,x1   ;$IN[1-8]


and this:

Code: [Select]
INB0=5,0,x1   ;$IN[1-8]
OUTB0=5,0,x1  ;$OUT[1-8]



are EXACTLY the same. order of lines does NOT matter. in fact those two lines are not even related. one is mapping INPUTs and other is mapping OUTPUTS. inputs and outputs are in two completely separate images (blocks of data).




What DOES matter is the order of DATA in the image/telegram. So when mapping something to robot I/O, you need to specify:


a) on one side (left of equal sign) what robot I/O you are mapping to

b) on the other side (right of equal sign) three things:
   1. What node we are mapping
   2. how many bytes are to be skipped to get to data we want
   3. how many bytes are in the data we want to use


try focusing on item b-2 ("how many bytes are to be skipped to get to data we want").


if you are mapping to inputs (left side is some sort of input), then right side is reading from INPUT image

if you are mapping to outputs (left side is some sort of output), then right side is writing to  OUTPUT image

both input and output image are data blocks composed by bus coupler.


« Last Edit: June 13, 2018, 12:19:52 PM by panic mode »

June 13, 2018, 12:35:22 PM
Reply #68
Offline

Wall-E


Panic,

The issue is not in the order in which are given the Input image and Output image, but the fact that you mention that the ANALOG bytes are generally read before the DIGITAL bytes, and then in the example, you do the opposite :

INB0 = 11, 4, x4  ; $in[1-32]
ANIN1 = 11, 0, 16,2, cal32767 
ANIN2 = 11, 2, 16,2, cal32767

« Last Edit: June 13, 2018, 12:38:19 PM by Wall-E »

June 13, 2018, 01:07:24 PM
Reply #69
Offline

panic mode

Global Moderator
that is NOT the opposite.... sequence of statements in IOSYS.INI does NOT matter. lines CAN be shuffled...

for example:
Code: [Select]
INB0 = 11, 4, x4  ; $in[1-32] ; line "1"
ANIN1 = 11, 0, 16,2, cal32767 ; line "2" 
ANIN2 = 11, 2, 16,2, cal32767  ;line "3"

is same as
Code: [Select]
ANIN2 = 11, 2, 16,2, cal32767  ;line "3"
INB0 = 11, 4, x4  ; $in[1-32] ; line "1"
ANIN1 = 11, 0, 16,2, cal32767 ; line "2" 

is same as
Code: [Select]
ANIN2 = 11, 2, 16,2, cal32767  ;line "3"
ANIN1 = 11, 0, 16,2, cal32767 ; line "2"
INB0 = 11, 4, x4  ; $in[1-32] ; line "1"
is same as
Code: [Select]
INB0 = 11, 4, x4  ; $in[1-32] ; line "1"
ANIN2 = 11, 2, 16,2, cal32767  ;line "3"
ANIN1 = 11, 0, 16,2, cal32767 ; line "2"

is same as
Code: [Select]
ANIN1 = 11, 0, 16,2, cal32767 ; line "2"
ANIN2 = 11, 2, 16,2, cal32767  ;line "3"
INB0 = 11, 4, x4  ; $in[1-32] ; line "1"
etc.

note that CONTENT of the lines is always the same, only order is changed. order does not matter but content does.



Back to the basics:
bus coupler checks attached IO cards, SOMEHOW determines order how the data is to be composed into an image (usually but not always, analogs are placed at the begin of image), then it transmits that image in a telegram when master/scanner tells it to do so.

once the telegram is received by the robot, you need to create assignments that are going to extract data from that image.
image is just an ARRAY of bytes.

i guess YOU would expect to see them like this (analogs first):



ANIN1 = 11, 0, 16,2, cal32767 ; line "2"
ANIN2 = 11, 2, 16,2, cal32767  ;line "3"
INB0 = 11, 4, x4  ; $in[1-32] ; line "1"


now focus on SECOND parameter in each line (value after "11"), it has values 0, 2 and 4 in this case. that tells how many image bytes to skip (from begin of image/array) to get to data we need.



so called line "2", reads FIRST analog input, which is at the begin of image so it skips ZERO bytes because it needs access to bytes 0,1 from array  (first analog input is at the begin of image/array)


so called line "3", reads second analog input so it must skip TWO bytes (bytes 0, 1) because they are data representing first analog input


so called line "1" is reading digital inputs. they come AFTER analog inputs. so skip FOUR bytes from begin of array (those would be the two analog inputs we need to skip in order to get to digital inputs...).


« Last Edit: June 13, 2018, 01:17:39 PM by panic mode »

June 13, 2018, 02:12:18 PM
Reply #70
Offline

Wall-E



Quote
i guess YOU would expect to see them like this (analogs first):
ANIN1 = 11, 0, 16,2, cal32767 ; line "2"
ANIN2 = 11, 2, 16,2, cal32767  ;line "3"
INB0 = 11, 4, x4  ; $in[1-32] ; line "1"

Yes, because as I'm trying to wrap my head around this mapping horror, I tend to get confused with the slightest thing !
Thanks for your patience ; things are sinking in... slowly.

So first, just to ease my headache, I'm going to re-position my blocks to match the order stated in the documentation (attached) : Coupler->AO->DO->AI->DI->Terminator
(Since I don't have any AO, this is going to be : Coupler->DO->AI->DI->Terminator).

My DO has 4 outputs, so that's 4 bits = 1/2 byte
My AI has 2 inputs, so that's 2*16 bits =  4 bytes
My DI has 4 inputs, so that's 4 bits = 1/2 byte

Soooo, here's a first attempt at translating this into a proper mapping :

[DEVNET]
OUTB0=5,0,x1  ;$OUT[1-8] (Only 1 to 4 will be usable)
ANIN1 = 11, 0, 16,2, cal32767  ; this will read 16-bit (2 bytes: 0 and 1)
ANIN2 = 11, 2, 16,2, cal32767  ; this will read 16-bit (2 bytes: 2 and 3)
INB3=5,4,x1   ;$IN[1-8] (Only 1 to 4 will be usable)

Am I close ?

Today at 03:37:10 AM
Reply #71

Advertisement

Guest

June 13, 2018, 02:29:40 PM
Reply #71
Offline

panic mode

Global Moderator
your map shows that you have two bus couplers:
One is node 5 and it connects to digital IO. other is node 11 and connects to analog IO.
digital inputs mapping is ok but comment stating range is wrong (INB3 is inputs 25-32)
And your analog outputs are not mapped at all...


does that sound like you are close?  :icon_mrgreen:


if there are no analog outputs and node is 5, i would expect this:
Code: [Select]
[DEVNET]
OUTB0 = 5, 0, x1  ;$OUT[1-8] (Only 1 to 4 will be usable)
ANIN1 = 5, 0, 16,2, cal32767  ; this will read 16-bit (2 bytes: 0 and 1)
ANIN2 = 5, 2, 16,2, cal32767  ; this will read 16-bit (2 bytes: 2 and 3)
INB0   = 5, 4, x1   ;$IN[1-8] (Only 1 to 4 will be usable)



and if there are two analog outputs, i would expect this:


Code: [Select]
[DEVNET]
 ; map outputs image
ANOUT1 = 5, 0, 16,2, cal32767  ; this will write 16-bit (2 bytes: 0 and 1)
ANOUT2 = 5, 2, 16,2, cal32767  ; this will write 16-bit (2 bytes: 2 and 3)
OUTB0 = 5, 4, x1  ;$OUT[1-8] (Only 1 to 4 will be usable)


  ; map inputs image
ANIN1 = 5, 0, 16,2, cal32767  ; this will read 16-bit (2 bytes: 0 and 1)
ANIN2 = 5, 2, 16,2, cal32767  ; this will read 16-bit (2 bytes: 2 and 3)
INB0   = 5, 4, x1   ;$IN[1-8] (Only 1 to 4 will be usable)
« Last Edit: June 13, 2018, 02:44:49 PM by panic mode »

June 13, 2018, 05:01:35 PM
Reply #72
Offline

Wall-E


I was so CLOSE !
I just forgot to edit my Copy-Paste for the node number, but I knew it ! Honnest !

Thank you so much, Panic !
I'll try that as soon as possible !

June 13, 2018, 05:16:22 PM
Reply #73
Offline

panic mode

Global Moderator

if you say so. in my book that is being miles off course... :grinning-smiley:

June 15, 2018, 08:13:10 AM
Reply #74
Offline

Wall-E


No bananas...

I ran a plasma cutting program and monitored my analog I/Os, and at the same time measured the Analog input with a Voltmeter :
Voltmeter gives changing values around 2~3 volts, but the monitor on the pendant stays at zero...

https://photos.app.goo.gl/x852AjS5vUbCq96M6

EDIT :

I checked the Digital input just for the heck of it and I realized that it recieving data during the plasma cutting !!! :

https://photos.app.goo.gl/TWybPgLRzxN776po7

Analog input signal received as Digital input signal ?
Why so much cruelty ?

« Last Edit: June 15, 2018, 09:15:48 AM by Wall-E »


Share via facebook Share via linkedin Share via pinterest Share via reddit Share via twitter

xx
Undervoltage PM1 error - KRC2 ed 2005

Started by arpica2001 on KUKA Robot Forum

1 Replies
1440 Views
Last post December 12, 2016, 02:32:37 PM
by Schilberg
xx
KRC2 2005 loses mastering

Started by JRHII on KUKA Robot Forum

3 Replies
999 Views
Last post September 26, 2017, 03:54:54 PM
by panic mode
clip
Need help KRC2 ed 2005 safety bypass

Started by vvelikov on KUKA Robot Forum

93 Replies
38753 Views
Last post September 22, 2016, 05:10:48 PM
by panic mode
xx
X11 standalone jumper on KRC2 ed 2005 108 pins

Started by Robot-CNC on KUKA Robot Forum

9 Replies
3635 Views
Last post August 20, 2016, 09:13:27 AM
by vvelikov