vanandel Posted August 5, 2010 Share Posted August 5, 2010 We've written a CPLC as part of our motion control system that uses the GetMotorStatus() function call. However, that function call doesn't seem to exist anymore, as of the July 2010 IDE/firmware release. I was able to find rtpmaccapi.h which defines other motion and motor related functions, but I don't see any replacement for GetMotorStatus(). (I didn't see this change mentioned in any release notes, but perhaps I didn't look in the right place.) Also, is there any documentation for using the function calls in rtpmaccapi.h ? Link to comment Share on other sites More sharing options...
bradp Posted August 5, 2010 Share Posted August 5, 2010 There is a better way to do this now. You still have the Motor[].Status[] structure but the better method is to use a GetResponse() with the command backup Motor[1].Status. This will report back the data structure name of each status bit and its value. This list is then easily parsed and used in an HMI display. In a CPLC you probably want to check the value of a particular bit. In that case use the pshm-> to access shared memory and the status bit name directly. So for in position check you would use if (pshm->Motor[1].InPosition == 1) { } Link to comment Share on other sites More sharing options...
Sina.Sattari Posted August 6, 2010 Share Posted August 6, 2010 For help on rtpmaccapi.h funtions, you can check the help with the new IDE released 7/22/2010. [attachment=1376:name] Link to comment Share on other sites More sharing options...
Recommended Posts