Hi @ozan, thanks for your answer!
It looks like in the end it’s sligthly different to what I thougth. Instead of sending the position of the component, the encoder sends the distance traveled by the belt of the conveyor in mm, which is triggered by a sensor signal (at the beggining of the conveyor) and it restarts when it reaches 10000 mm.
Theoretically, this distance should be the same as the position of the component that you showed me how to calculate, but if it isn’t syncronized (or if the component slides or something), those values will be different.
I guess I’m gonna have to play with pathSpeed property of my physics conveyor to calculate the distance traveled and then send it to PLCSIM, rigth?