# Analog Output Voltage 0-10 V

• Hi !

I am trying to transform a spindle speed RPM as an analog output from Kuka program to a Beckhoff Ethercat module EK1100-EL4004 ( 0-10V, 12 bit) to manage analogical command on spindle inverter, according with RPM speed inserted in program with a voltage between 0-10V. Kuka system is KSS 8.3.18.

I have fallowing syntax, one, two three.jpg , I tried one with two combination but didn't work, spindle try to rotate but do not run properly. Then I read that \$ANOUT[1]= cannot be a math formula, just -1 to 1, which means probably -100%...0%....100% scale, so \$ANOUT[1]=1 maybe the correct synatx???

Can you confirm me that?

Or maybe there is another syntax variant:

\$ANOUT[1]=VOLTAGE, WHERE VOLTAGE IS CALCULATED AS IN spindle_on()

\$ANOUT[1]=1

I would appreciate your help !

Thank you

## Images

• Quote

Then I read that \$ANOUT[1]= cannot be a math formula, just -1 to 1, which means probably -100%...0%....100% scale, so \$ANOUT[1]=1 maybe the correct synatx???

Can you confirm me that?

1 is equal to 10V.

• Hello, \$ANOUT[1]=FACTOR*SET_RPMs formula should be OK, i have just programmed the same last week to set spindle speed from KRL program but on KRC2, but it should work also on KRC4.

Did you measure with meter the actual voltage on EK1100-EL4004 on it's output, when you change the variable for the speed?

So if you set maximum RPMs you should measure 10V and if you set max RMPs/2 you should get 5V etc...

• DECL REAL CONST MAX_RPMs = 3600.0 ; whatever the value may be

DECL REAL SET_RPMs ; variable your program is to control

\$ANOUT[1]=SET_RPMs/MAX_RPMs

1) read pinned topic: READ FIRST...

2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

3) read 1 and 2

• Then I read that \$ANOUT[1]= cannot be a math formula, just -1 to 1, which means probably -100%...0%....100% scale,

That is correct. The thing to keep in mind is that Analog hardware modules come in many varieties: 0V to 10V, -10V to +10V, 4 to 20mA, -5V to +5V, and others. Also, on the I/O side, they can come in 8-bit, 12-bit, 14-bit, and 16-bit binary ranges, not to mention they can be signed or unsigned.

So ANOUT and ANIN can be seen as representing the signal range of the analog hardware module, from -100% to +100%. As such, ANOUT doesn't really know what voltage (or amperage) the module is actually producing (or receiving).

So, sending ANOUT=1.0 to a 0-5V module would produce 5V, but setting ANOUT=-0.5 to a module with a -10V to +10V range would generate a -5V output at the physical layer. And so on.

• Hi Skyfire,

and what about first two opinions above?

I cannot understand how worked for DannyDJ.

The matter is RPM is variable, so allocation value 0%-100% should happen function of programmed RPM, therefore a math formula is a must, but PanicMode sugestion is contrary:

\$ANOUT[1]=SET_RPMs/MAX_RPMs or must add also

\$ANOUT[1]=1, meaning both code lines ?

• Did you measure with meter the actual voltage on EK1100-EL4004 on it's output, when you change the variable for the speed?

yes, and is zero V.

Beckhoff EL4004 is new and is ok.

This is why I thought is a matter of syntax program that do not match and not sending to EL4004, right voltage in range 0-10V.

• \$ANOUT[1]=SET_RPMs/MAX_RPM and \$ANOUT[1]=FACTOR*SET_RPMs gives you the same result

in your FACTOR calculation you must divide with 1 not with 10 because \$ANOUT[1] is max 1.0 not 10.0

FACTOR=1.0/MaxRPM

so \$ANOUT[1]=(1/MaxRPM)*SET_RPMs = SET_RPMs/MAX_RPM

• yes, and is zero V.

Beckhoff EL4004 is new and is ok.

This is why I thought is a matter of syntax program that do not match and not sending to EL4004, right voltage in range 0-10V.

By zero V you mean it is 0 all the time regardless if you change the analog output values?

• Thank you all !

Variant that works is one from attached photo.

Is fine, speed spindle got it from program.

## Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Sign in
Already have an account? Sign in here.