zros Posted July 16, 2018 Share Posted July 16, 2018 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 More sharing options...
steve.milici Posted July 18, 2018 Share Posted July 18, 2018 I believe it should be “type” – no capital “t”. See the C-api help, specifically “EncData Struct Reference”. Link to comment Share on other sites More sharing options...
zros Posted July 19, 2018 Author Share Posted July 19, 2018 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. Link to comment Share on other sites More sharing options...
steve.milici Posted July 23, 2018 Share Posted July 23, 2018 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: ftp://support.deltatau.com/DT-USA/milici/PPMAC%20IDE/Help%20Files/ Link to comment Share on other sites More sharing options...
sutty Posted July 23, 2018 Share Posted July 23, 2018 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: ftp://support.deltatau.com/DT-USA/milici/PPMAC%20IDE/Help%20Files/ Hi Steve! I cant access this link - server not found - any other link to get this document? Link to comment Share on other sites More sharing options...
zros Posted July 23, 2018 Author Share Posted July 23, 2018 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. Link to comment Share on other sites More sharing options...
Recommended Posts