Jump to content
OMRON Forums

Reading encoder position at the phase rate


coles55
 Share

Recommended Posts

We are currently going through some development effort with the PPMAC system and we have a question with regard to capturing high resolution encoder readings. Basically we have an ACC28E in the system collecting analog data from third party sensors at the phase rate. At the same time, we are reading the Motor[#].ActPos at the servo rate (ACC24E2A). Ultimately we would like to combine the 2 sets of data(encoder position with sensor data). However, our phase rate is running at 4 times the servo rate. Is there any way we could get higher resolution encoder readings (at the phase rate) without having to re-tune the motors (having to change the servo rate)? One suggestion was to increase the servo rate up to match the phase rate then use Motor[x].Stime to lower motor servo rate but this overloaded the PPMAC processor with 100% CPU usage.

 

Thanks,

Lei

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

The ASIC in the ACC-24E2A automatically latches the encoder count every phase cycle. This data can be found in Gate1.Chan[j].PhaseCapt.

 

This data is the raw encoder count, referenced to power-on/reset position, and without the 1/T sub-count extension you are probably using in servo feedback.

Link to comment
Share on other sites

The ASIC in the ACC-24E2A automatically latches the encoder count every phase cycle. This data can be found in Gate1.Chan[j].PhaseCapt.

 

This data is the raw encoder count, referenced to power-on/reset position, and without the 1/T sub-count extension you are probably using in servo feedback.

 

Is the Acc-24E3A likewise latched for every Phase interrupt (expecially the ArcTan position)?

 

Link to comment
Share on other sites

Yes, the ACC-24E3 latches the encoder position every phase clock cycle. The data can be found in Gate3.Chan[j].PhaseCapt.

 

The functionality is enhanced compared to the older card. If saved setup element Gate3.Chan[j].AtanEna is set to 1, there will be 12 bits of fractional count resolution (14 bits of fractional line resolution) from the automatically computed arctangent value in this 32-bit register.

 

If AtanEna is set to 0, there are 8 bits of fractional count resolution (10 bits of fractional line resolution) in the register. If saved setup element Gate3.Chan[j].TimerMode is set to 0, this fraction comes from the 1/T sub-count extension. If TimerMode is set to a value greater than 0, the fractional value is forced to 1/2 count.

 

Link to comment
Share on other sites

There are probably multiple ways of doing this but given the Gate1.Chan[j].PhaseCapt in raw encoder counts, what would be the most accurate method of converting the counts to Motor position? (comparable to Motor[x].ActPos)?
Link to comment
Share on other sites

In the manual chapter "Synchronizing Power PMAC to External Events", in the section on position capture, there is a lengthy discussion on converting the raw captured encoder position to motor (and axis) position. It uses the trigger-latched "HomeCapt" position, but all of the equations are equally valid for the clock-latched "PhaseCapt" position as well.
Link to comment
Share on other sites

As a register in a hardware device, it is technically not part of shared memory, which is in RAM. In the Script environment, this is hidden from you, so you can access it through the element in the same manner that you would an element in RAM. This works in foreground (real-time) routines as well as background.

 

In C, you must access hardware registers in a different manner from memory registers. The User's Manual chapter on "Writing C Functions and Programs" explains this in detail.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...