Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting the RTI rate
How do I setup the RTI rate? I want it to interrupt every 10ms.
You can set this using Sys.RtIntPeriod, or I8008. The RTI occurs every (Sys.RtIntPeriod+1) servo cycles. Thus, if your servo clock is at the period "Sys.ServoPeriod" [ms/(Servo Cycle)], and if "T" is your desired interrupt interval [ms], and (Sys.RtIntPeriod+1) is in units of [(Servo Cycles)/RTI], then the formula for computing the necessary Sys.RtIntPeriod value is

Sys.RtIntPeriod = T/Sys.ServoPeriod - 1

For example, if your servo clock is at 5 kHz (1/Sys.ServoPeriod = 5), and if your desired T value is T = 10 ms as you mentioned in your post, then

Sys.RtIntPeriod = (10)/(Sys.ServoPeriod) - 1 = 49

This should give you an RTI period of 10 ms. Please see also Sys.RtIntPeriod in the Power PMAC Saved Data Structure Elements manual. Please be careful also, because the largest possible RTI period is actually 0.02 seconds; otherwise PMAC's Watchdog will trigger and PMAC will shut down.

Please keep in mind that having an RTI period this large is not advisable if you have very high programmed move block rates (small move times), or very high segmentation rates (small segmentation times). In these cases it is best to make Sys.RtIntPeriod as small as possible (preferably 0). Please also remember that the values Sys.RtIntPeriod can take only range from 0 to 255.

If you have additional questions about this, please post them.

Forum Jump:

Users browsing this thread: 1 Guest(s)