assuming XP1.E1_old is the original retained value, it would be like
XP1.E1 = XP1.E1_old + ( i * 360.0)
Calculation need to be done inside the local src file, before you have the motion to P1.
Unless you work with Global positions and variables.
ok, as far as I understood before the calculation
XP1.E1 = XP1_E1_old + ( i * 360.0)
I have to initialize the variable XP1_E1_old = XP1.E1
Something like that?
XP1_E1_old = XP1.E1
XP1.E1 = XP1_E1_old + ( i * 360.0)