Setting up a servo motor with the PLC 16DIO 4AIO OPCUA


I´m trying to set up a system where I need a servo motor for position control.
I´ve been looking through the guides but I can´t seem to find anything where a servo motor is used.

Does anyone have information/example?
How would you set it up in the Global Variable List in Codesys?



There are two different kinds of servo motors published:
1: “FESTO CMMT-AS servo drive”: that works like a OPCUA PLC component. The position can be controlled by setting a variable in the third party program that matches the name of the public variable “setpoint_variable” in he component.

2: “Servomotor”: The position is controlled by changing the voltage on the analog port “setpoint_pos”.



I´m having some problems with the Festo servo motor.

I have it running and it moves what I want it to move but I cant seem to get any feedback from it.
I´m running Codesys with the setpoint_variable as a int and axis_relation and ang_value as real (I have tried word as well).

The thing is that I can´t figure out how to get a position and a feedback on the movement and without that I don´t know how to be able to program it properly.