Analog output from -1 to 1 ?

Started by Xylotica, January 17, 2022, 01:10:35 PM

Previous topic - Next topic

Xylotica

I've never needed analog output until now that I have a HSD spindle.
On the KSS, the values I can enter for the Analog output that controls the spindle speed range from 0 to 10.
With KUKA|prc, the values I can set in the "STATE" input for the "ANALOG OUT" component range from -1 to 1...

So what's the trick here ?

Johannes @ Robots in Architecture

Hello,

If you say 0-10, do you mean 0-10V?
KSS should normalize the values, so a value between 0.0 and 1.0 could be 0-10V or 4-20mA, depending on the physical output.
I'll need to double-check on the robot, but believe that it should be correct.

Best,
Johannes

Xylotica

#2
Hi Johannes,

If I try to set the value of ANALOG 01 manually on the pendant, it will only authorize an input in the range 0-10.
This has probably been set-up that way by the integrator.
So when I type "1", I get 10% of my max speed (spindle rpm), while if I type "10", I get 100%.

I tried a KUKA|prc-generated program with the value "0.75".
Indeed, it writes "$ANOUT[1]= 0.75" in the .src file, but in effect, the spindle runs at 75% of it's max speed, just like if I had entered "7.5" as a value for that analog output on the pendant.

My problem is kind of solved, as I know how to get my target speed, but it's a bit weird...

Also, I'd like to mention that the "Reset Digital/Analog Outputs at start" option in the advanced settings is a bit misleading / dangerous.
Indeed, it only resets DIGITAL OUT from 1 to 8 and ANALOG OUT from 1 to 4.
Incidentally, my critical DIGITAL OUT was N° 9...

Xylotica

Another strange issue with IOs : KUKA|prc seems to discard "conflicting" orders.
In the attached, you will see that only the last states in my sequence are written to the .src file
This is a problem, because I wanted to reset my IOs myself, since I can't rely on the option as stated previously.

Johannes @ Robots in Architecture

Hello,
So if there is zero time in-between, it does not really make a difference.
If you want to force it, I would go for Custom KRL instead!

Best,
Johannes

Xylotica

I don't agree with you here.
There's not "zero time" ; the IOs are executed in a certain sequence for a reason.
For example, I have a security switch DIGITAL INPUT for the spindle that depends on certain DIGITAL OUTPUTS to be trigered in a specific sequence.

Regarding the "Reset Digital/Analog Outputs at start" option, I remain of the opinion that you should make clear that it doesn't affect the full range of IOs.

Johannes @ Robots in Architecture

If the IOs are executed in sequence, the time difference would be negligible for most external devices, in my experience. They switch more or less at exactly the same time.
The sequence might be relevant for some code "inside" the controller.
Noted the comment about the Reset option!

Best,
Johannes

Xylotica

I think it makes a difference for the safety strategy of the inverter for the spindle.
Anyways, I added it as KRL code.

Still not sure why KUKA|prc juges fit to "concatenate" the IOs like that...

Xylotica

I had some advice from my robot integrator : there needs to be a small delay between IO switching for the process to correctly activate and set the Inverter of the spindle

OUT[1] : "Forward"
OUT[9] : "Security switch"
OUT[10] :  "Spindle fan relay"
ANOUT[1] : "Spindle speed (rpm)"


;RESET AND START ROUTINE

$OUT[9]=FALSE
WAIT SEC 0.2
$OUT[10]=FALSE
WAIT SEC 0.2
$OUT[1]=FALSE
WAIT SEC 0.2
$ANOUT[1]= 0.00
WAIT SEC 1
$ANOUT[1]= 0.75
WAIT SEC 0.2
$OUT[9]=TRUE
WAIT SEC 0.2
$OUT[10]=TRUE
WAIT SEC 0.2
$OUT[1]=TRUE
WAIT SEC 1



;TURN OFF ROUTINE
$OUT[9]=FALSE
WAIT SEC 0.2
$OUT[10]=FALSE
WAIT SEC 0.2
$OUT[1]=FALSE
WAIT SEC 0.2
$ANOUT[1]= 0.00
WAIT SEC 1