Drive stepper motor with potentiometer in Siemens PLC
You control the stepper motor with technology object TO_Axis. Then you have to configure units, lead screw pitch, gearbox transfer ratio, ...etc. You do use then the PLCopen commands, for example MC_MoveAbsolute or MC_MoveRelative.
As for your application you should home your axis to a reference position using active homing procedure by means of using a reference sensor. The axis shall move and search for reference sensor during MC_Home, once it finds its home position, you could use MC_MoveAbsolute and give the position setpoint as potentiometer reading to move the axis.