3D-Printing : TCP Speed setpoint for extruder via Analogoutput

I’d like to use the TCPSpeed3DP as speed setpoint Anaolg Out for an extruder.

Therefor I added a module and programmed a dedicated procedure. Rapid OK, but errors/issues when starting the program:

++++++++++++++++++++++++++++++++

MODULE T_ROB1_EXTRUDER_IO_3DP

!Scale actual TCP speed (from PrintL command attribute) and link to Local_IO Analogout 1

PERS Num aoTCP_Mult:=1000;

PERS Num aoTCP_Div:=1000;

VAR Num aoTCP_Scaled;

PROC Extruder_SpeedSetpoint()

!aoTCP_Scaled:=aoTCP_3DP*aoTCP_Mult/aoTCP_Div; ! Scale TCP speed

!Local_IO_1_AO1:= aoTCP_Scaled; !Push to analog out 1

Local_IO_1_AO1:=aoTCP_3DP;!Push to analog out 1

ENDPROC

ENDMODULE

++++++++++++++++++++++++

Any comment on what is wrong or a better way to link and scale the TCPspeed to an Analogoutput is very much appreciated.

You do the scaling in the eio configuration, not in the program.

Thanks Lee. In the SystemIO there is aoOUT_1 Value I Min I Max. How can I scale the Value? For my understanding a mult and div should be there. Do you have an example or any reference manual page? Thx in advance.

You are welcome. I have posted some examples in the past. A search should bring them up.

not found any examples, Do you mind sending the link? thx

There is an example in this conversation:

I posted one here too:

https://www.robot-forum.com/robotforum/thread/25634-tcpspeed-system-output-over-profinet/?postID=108919&highlight=scaling%2BABB%2Banalog%2Boutput#post108919