Jump to content
OMRON Forums

Gate1[x].PartData in C-code


Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic



I have looked at the manual, but it doesn't really answer my question.


In the terminal, I can type Gate1[4].PartData[0] to access this variable. In my C-code, I am currently doing this:


unsigned int *pPartData0 = (unsigned int *)(0xD00040 + piom);


I am asking if I there is a way to do this:


GateArray1 *pGA1 = GetGate1MemPtr(x);
unsigned int *pPartData0 = &pGA1->PartData[0];



Link to comment
Share on other sites

The information you find through Script in Gate1.PartData[k] does not have a comparable structure in C. These elements are hardware registers in the ID chips associated with the DSPGATE1 IC; they are not part of the gate array IC itself.


On power-on/reset, Power PMAC automatically reads these hardware registers and puts processed information from them into software elements. In Script, these are accessed as:







In C, these are accessed through separate software data structures:







If you want to read the actual hardware registers in your application, as to check the encoder-loss status bits, you will need to use the pointer technique you have already figured out.



Link to comment
Share on other sites

This topic is now closed to further replies.

  • Create New...