Jump to content
OMRON Forums

Recommended Posts

Posted
I am writing a custom servo algorithm for a lathe cutting tool and need to read the position of another motor (a spindle) for use in my feedback calculations. What is the best way to access the spindle position data within the usrcode.c function I'm writing? Thanks, Scott
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted
You have several methods, which fall into the categories of "absolute" and "relative" specification of the motor. If you want "absolute" specification of the motor (say, Motor 7 regardless of which motor is executing the algorithm), the best way is probably just to access it the same way as you would in the script language, e.g.: Motor[7].ActPos If you want "relative" specification of the motor (say, the next higher numbered motor than the one executing the algorithm), you can use either something like: Mptr[1].ActPos or Mptr2 = Mptr + 1; Mptr2->ActPos... Curt
Guest
This topic is now closed to further replies.

×
×
  • Create New...