Summary/Issue Description
Sometimes there is a need to create an M-Variable definition for a given PMAC structure element that specifies specific bits not separately available in that element or sub element(s). This example will use “Gate3[0].Chan[1].ABC”, specifically defining the “C” bit (encoder C-channel bit).
Root Cause
There is no structure element that specifies this specific bit alone.
Solution
Using the SRM “memory map” to find the top-level (base) address, offsets and bit location one can build the “raw” address. The “Gate3[0].Chan[1].ABC” is a partial-word element of “Gate3[0].Chan[1].Status”.
From “Power PMAC ASIC Register Element Addresses” -> “DSPGATE3 (PMAC3-Style General ASIC) Register Elements”:
The top-level base address for “Gate3[0]” is “$9000000”. The offset from base address for “Chan[1]” is “$80”. The offset from the channel base to the “Status” element is “$0”. So the “full” address is then the sum of these: “$900080”. The “C” pin is at bit 6 for a width of 1 bit.
This would “generate: the following M-variable definition:
m99->u.io:$900080.6.1
Using the IDE’s “PMAC Project Enhanced Script Language” one can declare a pointer variable with a more functional “name”:
ptr EncoderC-chanBit->u.io:$900080.6.1
Date/Revision History
First review 3/24/2025 V1.0
Author:
Stephen Milici, Technical Support Engineer
References
Power PMAC Software Reference Manual: https://assets.omron.com/m/76e3f5e50c46e0e9/original/Power-PMAC-Software-Reference-Manual.pdf
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article