We have an ACC24E2S card and connect a general purpose draw-wire encoder to give us some position readings.
In Turbo PMAC the card was set up as follows:
Base Address: Y:$079200 [ON-ON-OFF-ON-ON-ON]
I7410=7
Encoder9->X:$079201,0,24,s
This gave us simple access to x4 quadrature decode of the first channel on the card.
I'm trying to get the same access to the counts on PowerPMAC. I have done the following:
Base Address: $608000 [ON-ON-OFF-ON-ON-ON]
Gate1[8].Chan[0].EncCtrl = 7;
ptr Encoder9->i.io:$608004.0.32;
I have tried various combinations of bits to look at at that address but the only value I seem to get is some sort of strange velocity or delta numbers, not the counts.
Questions
1: I found looking at Gate1[8].Chan[0].PhaseCapt I think I get the counts I want, almost. Please can you confirm this is where I should be looking?
2: If it is, it is unsigned so do I have to manipulate the value myself to allow signing of the result? or is there a way to get it signed?
3: Also I use "zeroEnc9->X:$079205,10,1" in Turbo to perform a zeroing of the encoder. I found "ptr zeroEnc9->u.io:$608034.18.1;" works in PowerPMAC but I cannot find the documentation. Is this the correct way to zero the counts? Is there access to it in a structure?
Cheers
Dave