Jump to content
OMRON Forums

Triggered time base from ISR


Recommended Posts

I am trying to implement a triggered time base application very similar to the example given in the training class, but with arming the time base in the CaptCompISR function instead of a PLC.


(BACKGROUND: The application receives an external signal to arm the time base and the trigger event signal is also from a motor that the PPMAC does not control. Furthermore the arming event is not synchronized to the triggering event by the external system. Therefore the time from external arming signal to trigger can be extremely short. By using a RTICPLC (for example) for arming the time base, my probability of missing the 'first' triggering event is greater than 2000x more likely than if I can arm the time base inside the ISR.)


The issue I'm running into is that I need to check the status of the EncTable[x].Type within the ISR to verify that it is set to 10 (i.e. a frozen time base). However, I haven't found a way to access the type register for EncTable[x] in C code.


Inside the ISR I have tried:


if(pshm->EncTable[1].Type == 10) pshm->EncTable[1].Index1 = 3;


but this generates a build error 'struct EncData' has no member named 'Type'. A post from 2014 indicated that accessing the encoder table in this way causes problems (http://forums.deltatau.com/showthread.php?tid=1635).


What's the best way to access the type register for a given encoder table entry in C code?

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Yes - the case on the 't' in type was the difference. Thanks.


I have looked for the C API help, but I'm coming up blank as to where to find this. I don't see it anywhere on the online help through the IDE. And numerous searches of this forum just say - "its in the example projects". Which example, and how am I suppose to access the documentation? I'm stumped as to where this at, specifically. If there is a PDF document with the API for download - I haven't found it.



Link to comment
Share on other sites

Try changing the protocol in the URL to:




This URL string worked for me (do not include the double quotes that I added) - the forum software (MyBB) is automatically adding the http protocol stuff, so it would appear.


Thanks Steve.

Link to comment
Share on other sites

This topic is now closed to further replies.

  • Create New...