Hello everyone:
My motor desired position (Motor[0].DesPos) may jump randomly and sharply when motor servo on by orders like "jog/", "jog0:0".
I use a load cell voltage(-10V ~ +10V) as my motor position value, the corresponding code is shown as bellow.
----------------------------------------
// use encode convert table to right move adc raw data
EncTable[3].Type = 1
EncTable[3].pEnc = Gate3[2].Chan[0].AdcAmp[0].a // feedback source. AdcAmp: adc
EncTable[3].index1 = 0
EncTable[3].index2 = 16 // input raw data(type 1: WORD) right move bits
EncTable[3].ScaleFactor = 1
// use encode convert table to track filte data
EncTable[8].Type = 1
EncTable[8].pEnc = ect_ss_actor.PrevEnc.a // feedback source. AdcAmp: adc
EncTable[8].index1 = 1
EncTable[8].index2 = 245 // input raw data(type 1: WORD) right move bits
EncTable[8].ScaleFactor = 1
Motor[0].pEnc = ect_ss_actor_flt.a
Motor[0].pEnc2 = ect_ss_actor_flt.a
----------------------------------------
The value of desired position (Motor[0].DesPos) is equal to the actual position value when the servo loop is disabled. But once I close the servo loop by using "jog/", "jog0:0", etc. the value of Motor[0].DesPos will change to a random value immediately, and then change to actual position gradually.
The sharply position jump may cause great possition error and ServoOut.
How can I avoid this position jump?