April 25, 2019, 02:13:45 AM
Robotforum | Industrial Robots Community

 Devicenet need help

Author Topic:  Devicenet need help  (Read 1537 times)

0 Members and 1 Guest are viewing this topic.

April 28, 2018, 06:38:33 AM
Read 1537 times
Offline

iljalways


Hi, I have 3 devicenet modules Turck's and all of them connect to the robot, the Net light is solid, base on the manual it's connected, but only one of them works.
I'm just learning devicenet and don't really know what I'm doing.

this FDNL-S1600-W one was in the kuka devicenet utility and I just select it and added the I/O's and it worked but the other 2 I just coded manually.


I'm wondering if it has something to do with the below lines, what do those 2 lines do?
POLL_RESPL
POLL_CMDL

Code: [Select]
DNSC_2SL.ini

[1]    ;This one works good.
;NAME=16 In - FDNL-S1600-W
;USERNAME=
MAC_ID=34
VENDOR_ID=256
PRODUCT_TYP=7
PRODUCT_CODE=2001
POLL_RESPL=3
POLL_CMDL=0

[2]     ;Not working
;NAME=8 In / 8 Out - FDNL-SO8O8I-MM
;USERNAME=
MAC_ID=35
VENDOR_ID=48           ;recieved from turck
PRODUCT_TYP=7          ;From Manual
PRODUCT_CODE=3009  ;From Manual
POLL_RESPL=3
POLL_CMDL=2


[3]     ;Not working
;NAME=4 AIn / FDNQ-4AI-V/IT
;USERNAME=
MAC_ID=36
VENDOR_ID=48              ;recieved from turck
PRODUCT_TYP=100         ;recieved from turck
PRODUCT_CODE=32145   ;recieved from turck
POLL_RESPL=4
POLL_CMDL=0


iosys.ini




[CONFIG]
VERSION=1.00
[DRIVERS]
MFC=0,mfcEntry,mfcdrv.o
DIAGDRV=22,cp_DiagInit,diagdrv.o
DNSC2=13,dnsc2Init,dnsc2drv.o
;DNSC1=12,dnsc1Init,dnsc1drv.o
[MFC]

[RIO]
[DIAGDRV]
;COMMENT=Configuration not required

[DNSC2]
INB53=34,0
INB54=34,1
OUTB0=35,0
OUTB1=35,1
ANIN0=36,0,16,2,CAL32767
ANIN1=36,1,16,2,CAL32767
ANIN2=36,3,16,2,CAL32767
ANIN3=36,4,16,2,CAL32767

I Hope somebody can guide me in the right direction.

Today at 02:13:45 AM
Reply #1

Advertisement

Guest

April 30, 2018, 12:52:24 PM
Reply #1
Offline

SkyeFire

Global Moderator
What do you mean, "only one of them works"?

According to the files you posted, you have one module with 2 bytes of inputs, and 3 bytes of outputs, another module with just 3 bytes of inputs, and... an analog input module whose configuration makes no sense.

POLL_RESPL is the number of "input" bytes the module sends to the robot.  POLL_CMDL is the number of "output" bytes that the module will accept from the robot.

Your IOSYS.INI includes 4 16-bit analog inputs, but the module (MAC ID 36) they're associated to only has 4 bytes total POLL_RESPL.  This can't possibly work.

What error messages is the robot generating?  There should be several.

Who configured this robot?

April 30, 2018, 05:12:10 PM
Reply #2
Offline

iljalways


Thanks for explaining POLL_RESPL and CMDL
The module that has just 3 bytes of inputs works its a 16 io it came with the robot and was configured like that.
The others I added and try copy from the one that was already configured, and the inputs work but the outputs don't work on the 8in and 8out
I have been reading the devicenet manual a lot this weekend and have changed my settings as follows, and don't have any errors
Code: [Select]
[1]
;NAME=16 In - FDNL-S1600-W
;USERNAME=
MAC_ID=34
VENDER_ID=256
PRODUCT_TYP=7
PRODUCT_CODE=2001
POLL_RESPL=3
POLL_CMDL=0

[2]
;NAME=8 In / 8 Out - FDNL-S0808I-MM
;USERNAME=
MAC_ID=35
VENDER_ID=256
PRODUCT_TYP=7
PRODUCT_CODE=3009
POLL_RESPL=2
POLL_CMDL=1

[3]
;NAME=4 Ain - / FDNQ-4AI-V/IT
;USERNAME=
MAC_ID=36
VENDER_ID=48
PRODUCT_TYP=100
PRODUCT_CODE=32145
POLL_RESPL=8
POLL_CMDL=0

IOSYS
INB53=34,0
INB53=34,1
INB49=35,0
OUTB49=35,0
ANIN1=36,1,16,3,CAL32768
ANIN2=36,3,16,3,CAL32768
ANIN3=36,5,16,3,CAL32768
ANIN4=36,7,16,3,CAL32768
I found the eds files on old.turck.us and I'm a little confused about what RESPL AND CMDL  numbers to take from the eds but with my current configuration I have no errors
All Digital inputs work
Outputs don't work when I trigger them the output monitor shows they are true but the led on the turck does not light up
Analog $ANIN[] the numbers are just 0.0

Thanks
« Last Edit: May 01, 2018, 01:03:31 PM by iljalways »

April 30, 2018, 05:14:30 PM
Reply #3
Offline

iljalways


On the analog my device has the option for 4-20ma 0-20ma and 0-10v what is the best option for kuka?

Also when I run telnet 192.0.1.1 All I get is full window of lines  "Meldung Nr. 1324"
It won't allow to type anything it seems telnet freezes

Am I using telnet wrong?

Thanks

« Last Edit: April 30, 2018, 05:27:45 PM by iljalways »

April 30, 2018, 07:43:10 PM
Reply #4
Offline

iljalways


I got the outputs working
I didn't know that Turck devise required an auxiliary power for the output side of the module

I got the analog inputs sort of working, I use a laser measuring tool seem like there is noise as the numbers jump around a bit
« Last Edit: April 30, 2018, 07:59:14 PM by iljalways »

April 30, 2018, 08:59:07 PM
Reply #5
Offline

iljalways


Why do I get an analog number like 6.400887E-04
Can it be change to a 3 decimal number?

April 30, 2018, 11:59:54 PM
Reply #6
Offline

panic mode

Global Moderator
Quote
I didn't know that Turck devise required an auxiliary power for the output side of the module


this is nothing new - ALL output modules regardless of maker, always have separate power for output drivers. this way outputs can be powered from safety-controlled source.




Quote
I got the analog inputs sort of working, I use a laser measuring tool seem like there is noise as the numbers jump around a bit


also perfectly normal...


Quote
[size=0px]Why do I get an analog number like 6.400887E-04[/size][/size][size=0px]Can it be change to a 3 decimal number?[/size]
[size=0px]


sure... do you have an example of that 3 decimal number?[/size]
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 02:13:45 AM
Reply #7

Advertisement

Guest

May 01, 2018, 02:32:55 AM
Reply #7
Offline

iljalways


Thanks Panic mode for your answers,
we have 3 different size of hoppers that we are using the robot on, I'm using a laser distance meter, 50mm to 3000mm to find the diameter of the hopper, and offset the base when the hoppers change sizes, so one program can do all of them and also the laser will compensate for the parts variability,

but with the current 6.400887E-xx scientific number format, the base doesn't offset, but once I put a real number in my variable the base shifts.

any real number would work, since our parts accuracy only needs to be within 1.5mm at this point I'm not to concerned about the 3 decimal. if I could get numbers in 0.5mm increments would be perfect, I would even be happy if I could just have an INT of 50mm to 3000mm no decimal, if that makes it easier.

the rage the base needs shifting is about 900mm,

I have right now a global variable "H_LASER_CAL" where the analog is stored to shifts the base,


a formula to do this would be much appreciated.

also what is better a tool offset or base offset? both seem to be working fine.



Thanks.

« Last Edit: May 01, 2018, 02:34:38 AM by iljalways »

May 01, 2018, 11:50:12 AM
Reply #8
Offline

panic mode

Global Moderator
Sounds like you did not scale your analog signal

May 01, 2018, 11:56:58 AM
Reply #9
Offline

iljalways


How do I do that in kuka?
In Siemens PLC its easy but I have no clue how its done in kuka


May 01, 2018, 12:22:46 PM
Reply #10
Offline

panic mode

Global Moderator
How would you do it without computer? Math work's with pen and paper too... is the sensor output linear?

May 01, 2018, 12:26:53 PM
Reply #11
Offline

iljalways


yes it's linear,

May 01, 2018, 01:14:47 PM
Reply #12
Offline

SkyeFire

Global Moderator
Simplest way to scale an analog input is to simply establish the linear relationship between the robot position and the sensor.  For a laser-rangefinder type application, I usually start by positioning the robot with the laser dot hitting a target just inside the laser's maximum range, measure the actual distance, then move the robot down to the laser's minimum range in fixed mm increments, recording the analog feedback at every stop.  Assuming the sensor response is linear, this should result in a simple y=f(x) type formula.  Taking a decent number of samples will help reduce the noise effects.

It's important to remember that the $ANIN inputs on a KRC only range between -1.0 and +1.0, representing essentially the % of full-scale swing of the analog input (as defined in IOSYS).  A reading of 6.111111E-6 is essentially zero, there's just a lot of analog noise past the 3rd or 4th decimal point.

May 01, 2018, 01:54:44 PM
Reply #13
Offline

panic mode

Global Moderator

Raw  = changing input value
Raw1, Raw2 = two input values (domain)
Eng = scaled output (engineering value)
Eng1, Eng2 = two output values (range) that correspond to Raw1 and Raw2

then:

Eng = Eng1 + (Eng2-Eng1)*(Raw-Raw1)/(Raw2-Raw1)

Today at 02:13:45 AM
Reply #14

Advertisement

Guest

May 01, 2018, 02:46:11 PM
Reply #14
Offline

iljalways


Thank you guys it all works,

May 17, 2018, 06:01:03 AM
Reply #15
Offline

iljalways


We got the robot up and running, but I'm not all the way happy with my analog input, I'm not sure if it's a setting or a module problem,

the laser distance meter is accurate from A to B, about 1200mm distance using 4-20ma, but the robot $ANIN[] will only update every 0.15ma which in my case is about 22mm I like the robot to be a bit more accurate than this, it works for now but I see a future collision with the part.
I have 2 laser distance meter 4-20ma, and both do the same,

I tried to change the {res} from 8 to 16, but then whenever ANIN2 laser is move, it also changes the data in ANIN1, I don't understand why.
tried changing CAL to 32767, have tried different numbers with same results.

==========iosys.ini==========
ANIN1=36,1,8,0,CAL 8     
ANIN2=36,3,8,0,CAL 8
ANIN3=36,5,8,0,CAL 8
;ANIN4=36,7,8,0,CAL 8   ;if I enable this one I get and error I don't need this I/O just bugs me knowing it's not working.

can somebody explain to me why this is happening?

thanks.

May 17, 2018, 01:54:55 PM
Reply #16
Offline

panic mode

Global Moderator
 :icon_eek:  :icon_eek:  :icon_eek:  :icon_eek:  :icon_eek:  :icon_eek:

CAL 8...?  ??? that is way waaaay WAAAAY too low.

use
CAL 32767

lower values will reduce resolution (which is what you are seeing)
« Last Edit: May 17, 2018, 02:00:05 PM by panic mode »

May 17, 2018, 02:37:48 PM
Reply #17
Offline

SkyeFire

Global Moderator
The key insight here is that you're not really dealing with analog signals -- you're dealing with "digilog," or analog signals translated into digital.

What the robot receives over DN from the sensor is not the actual analog signal, but a digital representation of it.  And this digilog signal is scaled in the analog input device.

For example, let's say we have two DN analog input devices, that accept the same analog signal of 4-20mA.  But one module has a 12-bit resolution, and the other has a 16-bit resolution.  For the first, the digilog representation of 4-20mA will be sent to the robot as a value between 0 (4mA) and 4095 (20mA).  For the higher-resolution module, the same 4-20mA input will result in integer values of 0-32767.

(I should note I'm ignoring sign and negative inputs, since you won't be dealing with those).

This is what the CAL value in IOSYS represents -- the "full scale" reading of the analog input device.  A 12-bit device will never send anything larger than 4095, so you would want a CAL value of 4095.  Using that CAL value for a 16-bit device would cause you to "lose" a lot of resolution, but using 32767 for a 12-bit device would cause you to lose a lot of range.

Remember that the ANIN value you see is simply a representation of the "percentage of max" of the sensor, scaled to 0.0-1.0.  If your sensor accepts inputs from 0-10V, then the ANIN representation of 5V would be 0.5.  OTOH, if your sensor accepts 4-20mA, then an ANIN of 0.5 would represent an input of 12mA.  And if your sensor was measuring 0-480V, the ANIN value of 0.5 would represent 240V.

The robot knows nothing about the analog inputs you are reading, in real-world terms.  It's just a number.  You have to set up the scaling of that number to re-match it to real-world conditions.  So, if you're using a 16-bit, 4-20mA input module, you need to set CAL in IOSYS to 32767 so that your ANIN value will scale, 0.0 to 1.0, with the 4-20mA input.  However, if you then want to do math in the robot based on actual mA, you would need to do a conversion in your program of ((ANIN * 20) + 4).

May 17, 2018, 06:11:52 PM
Reply #18
Offline

iljalways


Thanks SkyeFire and Panic mode, I wish I had your brains,

you are right 8 was way to low, and my {res} needed to be 16 instead of 8, I'm not familiar with EDS files, and understood them wrong.



Now that I change it to this:
ANIN1=36,0,16,3,CAL 32767   
ANIN2=36,2,16,3,CAL 32767 
;ANIN3=36,4,16,3,CAL 32767   
;ANIN4=36,6,16,3,CAL 32767   no more errors when I enable this one.

it updates on every 0.01ma change.

and now there is no interference between sensor 1 and sensor 2.
now I just run the math in the sps file to convert input to mm.

Quote
Remember that the ANIN value you see is simply a representation of the "percentage of max" of the sensor, scaled to 0.0-1.0.  If your sensor accepts inputs from 0-10V, then the ANIN representation of 5V would be 0.5.  OTOH, if your sensor accepts 4-20mA, then an ANIN of 0.5 would represent an input of 12mA.  And if your sensor was measuring 0-480V, the ANIN value of 0.5 would represent 240V.

this makes a lot more sense now.


Quote
The key insight here is that you're not really dealing with analog signals -- you're dealing with "digilog," or analog signals translated into digital.
Never heard of this before, so I will see if I find any info on it, would be a valuable thing to understand.



time to build the safety fence, and put it in operation.

Thanks for your time to help.





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

xx
Writing output data from KRC2 DeviceNet to DeviceNet network

Started by lzhr2x on KUKA Robot Forum

3 Replies
2720 Views
Last post July 14, 2014, 08:34:30 PM
by panic mode
xx
MFC-DeviceNet

Started by lzhr2x on KUKA Robot Forum

9 Replies
8018 Views
Last post July 02, 2014, 07:11:22 AM
by SkyeFire
xx
Devicenet Help

Started by jenesaisquoi on Fanuc Robot Forum

7 Replies
824 Views
Last post October 26, 2018, 06:12:26 PM
by SHIFT_Lock
xx
XRC I/O to Devicenet

Started by lcs226 on Yaskawa Motoman Robot Forum

1 Replies
315 Views
Last post November 19, 2018, 03:00:20 PM
by tony gast