iclim Posted April 11, 2014 Share Posted April 11, 2014 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 Link to comment Share on other sites More sharing options...
curtwilson Posted April 16, 2014 Share Posted April 16, 2014 You have several options here. 1. You can set the outer-loop Motor[x].pDac to Sys.Idata.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.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. Link to comment Share on other sites More sharing options...
Recommended Posts