Jump to content
OMRON Forums

Directing compensation table output to memory


zros

Recommended Posts

I have a compensation table that I would like to write the output to a memory location instead of the tradition Motor[x].CompPos or Motor[x].CompDesPos registers. For my comp table setup I attempted:

 

...
CompTable[1].Target[0] = Sys.Fdata[123].a
...

 

which threw an 'error #70' Struct Write Data Error. Before attempting this, I had this same code working with the exception that the target address was assigned as:

 

...
CompTable[1].Target[0] = Motor[3].CompDesPos.a
...

 

Can anyone enlighten me on the right way to assign the comp table output to a memory location?

 

Thanks,

Rick

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

What are you trying to accomplish? I ask because I have a feeling there is an easier method that will not require fooling the PMAC.

 

You can set CompTable[1].Target[0]=Motor[x].CompPos.a, where x is an unused motor structure. (This will not require Motor[x].ServoCtrl=1) Then you can grab the value of Motor[x].CompPos in some kind of program. If timing is critical, you will probably have to grab the values in a custom phase or servo algorithm. Take a look at page 65 and 66 of the Users Manual for the order of phase/servo tasks. Otherwise you should be able to use a PLC.

Link to comment
Share on other sites

Eric,

 

Thanks for the reply. I had not considered using an unused motor register for the comp table output. Good idea.

 

My application is based on a lathe, where I have added a linear motor as a secondary X axis (i.e. u axis). I need to generate a trajectory for the U axis that is the superposition of two motions that depend on the Z axis position and the spindle position (theta), u = u1 + u2 where u1 = f(z) and u2 = g(z)*h(theta). I have implemented two 1-D compensation tables to generate the f(z) and g(z) functionality. I now need to get the product of g(z) and h(theta). I plan on implementing the h(theta) functionality, generating the product (g*h), and finally the summation of u1 to u2 as a c function at the servo update rate.

 

I'm really just trying to take advantage of the existing functionality that already exists within the PPMAC to avoid writing my own look up table functions.

 

Hope this sheds a little light on more of the big picture I am attempting.

 

Thanks,

Rick

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...