Jump to content
OMRON Forums

Sys.PosCtrl in a cascaded loop


steveneads

Recommended Posts

I'm running an application that uses a 0D compensation table to cascade loops. The first "PID" actually just passes through a position command - so it doesn't do any real loop closure - there is no feedback and all the gains except the proportional term are set to zero. I originally wrote the code to use "Sys.PidCtrl" to minimise unnecessary calculations in this process, and it works as expected.

 

I read in the manual that there was an even simpler possibility for passing through position commands - "Sys.PosCtrl". However, when I change to this, the cascaded loop stops working. Is this to be expected - or have I forgotten something?

 

Thanks

Steve

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

I'm running an application that uses a 0D compensation table to cascade loops. The first "PID" actually just passes through a position command - so it doesn't do any real loop closure - there is no feedback and all the gains except the proportional term are set to zero. I originally wrote the code to use "Sys.PidCtrl" to minimise unnecessary calculations in this process, and it works as expected.

 

I read in the manual that there was an even simpler possibility for passing through position commands - "Sys.PosCtrl". However, when I change to this, the cascaded loop stops working. Is this to be expected - or have I forgotten something?

 

Thanks

Steve

Link to comment
Share on other sites

I believe this is due to the different way position compensation is done between the two modes.

When Power PMAC is closing the servo loop, the value of Motor[x].CompDac is added to the actual position. When the motor is in position mode the compensation value is subtracted from the net commanded position before it is output to compensate for the missing feedback loop. Maybe using a negative proportional gain on the “fist PID” will fix this.

Link to comment
Share on other sites

I believe this is due to the different way position compensation is done between the two modes.

When Power PMAC is closing the servo loop, the value of Motor[x].CompDac is added to the actual position. When the motor is in position mode the compensation value is subtracted from the net commanded position before it is output to compensate for the missing feedback loop. Maybe using a negative proportional gain on the “fist PID” will fix this.

Link to comment
Share on other sites

My testing seems to show that with position control the table mechanism does not work. You could however use a regular PID loop with the feedback loop opened - just have the ECT look at an open memory of zero value, disable FFE and feed that with the normal master position. I will try this on my system and get back to you with the details.
Link to comment
Share on other sites

Here is my basic setup to make motor #5 a position mode motor. The output is to sys.udata[9]. The ECT looks at Sys.udata[8] set to zero to open the loop.

Sys.udata[8]=0

Motor[5].Ctrl=Sys.ServoCtrl

Motor[5].ServoCtrl=1

Motor[5].Servo.Kp=1

Motor[5].Servo.Kvifb=0

Motor[5].Servo.Kviff=0

Motor[5].Servo.Kvfb=0

Motor[5].Servo.Kvff=0

Motor[5].Servo.Kafb=0

Motor[5].Servo.Kaff=0

Motor[5].Servo.Ki=0

Motor[5].Servo.Kfff=0

Motor[5].FatalFeLimit=0

Motor[5].pDac=sys.udata[9].a

Motor[5].pEnc2=EncTable[5].a

Motor[5].pAmpEnable=0

Motor[5].pAmpFault=0

Motor[5].pLimits=0

Motor[5].pEnc=EncTable[5].a

EncTable[5].type=1

EncTable[5].index1=0

EncTable[5].index2=0

EncTable[5].index3=0

EncTable[5].index4=0

EncTable[5].index5=0

EncTable[5].pEnc1=Sys.udata[8].a

EncTable[5].pEnc=Sys.udata[8].a

EncTable[5].MaxDelta=0

EncTable[5].ScaleFactor=1

EncTable[5].TanHalfPhi=0

EncTable[5].CoverSerror=0

 

Here I process the the ouput in the ECT to scale it to “counts”:

EncTable[6].type=1

EncTable[6].index1=0

EncTable[6].index2=0

EncTable[6].index3=0

EncTable[6].index4=0

EncTable[6].index5=0

EncTable[6].pEnc1=Sys.udata[9].a

EncTable[6].pEnc=Sys.udata[9].a

EncTable[6].MaxDelta=0

EncTable[6].ScaleFactor=1/65536

EncTable[6].TanHalfPhi=0

EncTable[6].CoverSerror=0

 

It can now act as master position for my “real” motor #1 and should also work with the table method:

Motor[1].MasterPosSf = 1

Motor[1].MasterCtrl = 1

Motor[1].pMasterEnc = EncTable[6].a

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...