Jump to content
OMRON Forums

Inquiries about PowerPMAC EQU signal.


Choi Woo Shik

Recommended Posts

Q1. How to PowerPmac hardware encoder count reset?

 

PMAC2 Style.

M113->X:$78205,10 ; Hardware encoder count reset register

M113=1 ; Hardware encoder count reset

 

PMAC3 Style.

Gate[3].Chan[0].PhaseCapt ; Initial method?

Gate[3].Chan[0].ServoCapt ; Initial method?

 

Using this method, it is intended to be applied to the origin search program.

 

 

Q2. When the linear motor digital encoder value is negative, the EQU signal is turned on at a specific position.

 

I am trying to use EQU in a negative position.

Gate[3].Chan[0].CompA, Gate[3].Chan[0].CompB -> No negative input

 

I want to apply to equipment.

EQU1 = -1000mu ~ -100mu EQU On setting method

EQU2 = 100mu ~ 1000mu EQU On setting method

 

Please tell me the value that should be applied to Gate[3].Chan[0].CompA,

Gate[3].Chan[0].CompB

 

Thank you.

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

It is possible to reset the encoder counter in a PMAC3 IC to zero by setting Gate3.Chan[j].CountReset to 1. (The AmpEna output for the channel must be zero.)

 

However, we DO NOT recommend it because of the potential danger, and it is not needed for the origin search. When PMAC finds the trigger in the homing search move, it stores the captured encoder value in the Motor[x].HomeOffset register. This is the difference between motor zero and encoder zero positions, and you just need to use it in following calculations.

 

When you have registers that can roll over, they can be displayed as unsigned or signed values. It does not matter, as long as you understand how they work.

 

The 32-bit registers in the Gate3 are displayed as unsigned values, so show a range of 0 to +2^32-1. The low 12 bits are fraction, so the units are 1/4096 of a count, so the counts show a range of 0 to +2^20 (1 Meg).

 

But, if you write a negative value to the element, it will still work. So if you have the program or command line:

 

Gate3[0].Chan[0].CompA = -1000 * 4096

 

and then you query the value of CompA, you will see the value reported as:

 

Gate3[0].Chan[0].CompA=4290871296

 

This value is equal to 2^32 - (1000*4096).

 

But it will create a compare event at -1000 counts, which is what you want

 

Remember that in general, the encoder registers can rollover multiple times over the motor position range in many applications.

Link to comment
Share on other sites

  • 3 weeks later...

Hi all!

 

I would like to ask why EQU toggle when ServoCapt cross zero.

 

My suspect is that the compare registers are not dealing well with two's complement when the register becomes positive (example: 111111..... to 000000...)

 

When I use CompA and CompB on positive or negative domain strictly, it works as expected.

 

I put this question here because it seems to be related to Choi Woo Shik question.

 

Firmware: 2.5.4.0

IDE version: 4.3.2.19

 

Thanks!

George

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...