Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Triggered time base from ISR
#1
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:

Code:
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?
Reply
#2
I believe it should be “type” – no capital “t”.

See the C-api help, specifically “EncData Struct Reference”.
Reply
#3
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.

Thanks.
Reply
#4
The C-API help was not rolled in to the latest IDE versions due to an “import” issue. The “external” help files can be downloaded from the ftp-site here:
http://ftp.support.deltatau.com/DT-USA/m...p%20Files/
Reply
#5
(07-23-2018, 11:00 AM)steve.milici Wrote: The C-API help was not rolled in to the latest IDE versions due to an “import” issue. The “external” help files can be downloaded from the ftp-site here:
http://ftp.support.deltatau.com/DT-USA/m...p%20Files/
Hi Steve! I cant access this link - server not found - any other link to get this document?
Reply
#6
Try changing the protocol in the URL to:

"ftp://support.deltatau.com/DT-USA/milici/PPMAC%20IDE/HELP%20FILES"

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)