Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Allowed Setup Variables
#1
Hello,

I am trying to setup a cascaded servo loop.

I have my outer loop output an
"emulated" target encoder pointing to &Mptr->PrevPhaseLoadEnc. However the setup variable for the EncTable[x].pEnc will not allow me to assign the address e.g.

EncTable[5].pEnc = Motor[5].PrevPhaseLoadEnc.a
stdin:90:19: error #70: Struct Write Data Error: EncTable[5].pEnc = Motor[5].PrevPhaseLoadEnc.a

Can you please suggest a list of allowed register addresses that can be written to and allocated to the EncTable.pEnc

AND/OR

Can you please tell me if there is a file with allowed script/setup variable commands which can be edited

Thank you
Reply
#2
You have several options here.

1. You can set the outer-loop Motor[x].pDac to Sys.Idata[i].a to write to a 32-bit integer in the user shared memory buffer. The conversion table can then pick this up with a single-register read using EncTable[n].type=1 and EncTable[n].pEnc=Sys.Idata[i].a.

2. Without caring where the outer loop writes its servo output, you can have the ECT pick it up directly from the (floating-point) holding register using EncTable[n].type=11 and EncTable[n].pEnc=Motor[x].IqCmd.a.

The latest User's Manual has an expanded section on the setup of cascaded servo loops.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)