Jump to content
OMRON Forums

Reading piom space from C


Recommended Posts

I am now on the learning curve for C coding on the PPMAC. I would like to access I/O memory that I believe the ACC84E occupies. Mainly the raw data coming in from a Renishaw BiSS encoder. In script this is defined as


Sys.piom + $A00000; // address of lower 24 bit

Sys.piom + $A00004; // address of upper 8 bits


How can I access these using C ?

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

You should be able to do the following:


int *LowerWord, *UpperWord;
int EncoderValue;

LowerWord = (unsigned*)((unsigned)piom+0xA00000);
UpperWord = (unsigned*)((unsigned)piom+0xA00004);

EncoderValue = ((*UpperWord&0xFF)<<24)|(*LowerWord);


Thanks Sina, I am also trying to debug this user servo routine but I don't think the breakpoints are working or I am using the debugger incorrectly.


I entered it in the servo table and I know it's running because I can set a watchpoint on a Motor variable that I am incrementing inside of it.

Link to comment
Share on other sites



The user servo routine is running in real time kernel and is being called every servo interrupt. You wouldn't expect for us to be able to interrupt and interrupt, correct?


May I ask what you're trying to do in your user servo?


Not breaking in an interrupt context makes perfect sense, had not thought of it that way.


Right now I am just trying to become familiar with the Delta Tau architecture and environment. Quite a bit different from embedded controls programming I have done in the past.



Link to comment
Share on other sites

This topic is now closed to further replies.

  • Create New...