June 26, 2019, 06:25:51 PM
Robotforum | Industrial Robots Community


normal_post Author Topic:  I/O  (Read 261 times)

0 Members and 1 Guest are viewing this topic.

June 04, 2019, 04:23:45 PM
Read 261 times

Andrew Socha

I am using kuka's devicenet to control trumpf laser. It is possible to combine digital outputs so I can set power using decimal numbers?

Today at 06:25:51 PM
Reply #1



June 04, 2019, 07:27:16 PM
Reply #1



I'm going to make a wild assumption that you're using a KRC4 / KSS 8.3...

You can set a certain set of outputs as a SIGNAL type, and use simple data types. For example:

Code: [Select]
DECL SIGNAL start $OUT[100] ;for a boolian
DECL SIGNAL position $OUT[10] TO $OUT[17] ;for an 8-bit integer

For decimal values between -10.0 and +10.0, you could use an analog output.

Hope that helps.

June 04, 2019, 10:25:34 PM
Reply #2


Global Moderator
Any multi-bit SIGNAL declaration from 2 to 31 bits is treated as an unsigned integer.  Any SIGNAL declared 32bits in size is treated as a signed integer.  SIGNALs larger thatn 32bits are not legal.

Once the signal has been declared, the assigned name becomes available as an integer variable.  So:
Code: [Select]
DECL SIGNAL OutByte $OUT[1] TO $OUT[8] ; 8 bits
DECL SIGNAL OutNibble $OUT[9] TO $OUT[12] ; 4 bits
DECL SIGNAL OutPair $OUT[13] TO $OUT[14] ; 2 bits
DECL SIGNAL OutDblWord $OUT[17] TO $OUT[48] ; 32-bit signed integer
OutByte = 255 ; all 8 bits set True
OutByte = 128 ; only the 8th bit set true
OutPair = 3 ; both bits set true
OutPair = 4 ; too big for 2 bits, will fault program
OutDblWord = 2147483647 ; first 31 bits set true
OutDblWord = -1 ; 32nd and first bits set true

June 05, 2019, 04:48:40 PM
Reply #3

Andrew Socha

 I am using KRC 2. Thank you for helping.

June 05, 2019, 10:21:22 PM
Reply #4


Check on Laser side there are 16bit assigned for laser power.Use them as SIGNAL as previously described or link to analog output.

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