Jump to content
OMRON Forums

RTI, servo tasks and interrupts


AnthonyLH

Recommended Posts

Dear all,

How can i know, in a servo task, if the corresponding servo interrupt is the one starting a new rti cycle (rti interrupt) ?

 

I need to acquire data from a 59E3 card with the minimum jitter (use of servo task) and i need a data every rti (i would like to do the acquisition in the servo task call made between to the rti interrupt and the rti task call)

 

Also, from servo task, how can i know which motor is currently calling the task? Can i find the Motor index in the Motor structure (Mptr->?) ?

 

Thank you

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

The best solution would be for your routine to monitor the system time (sys.time) value to exceed the current setting for a servo cycle. In the C environment the units of this register are CPU clock cycles. To convert this value to microseconds multiply by Sys.ClockSf (μsec / clock cycle). Note that the RTI will not execute until the servo has finished.
Link to comment
Share on other sites

Thank you Steve,

Sorry, I don't understand how looking at the Sys.time can help to detect the "rti interrupt".

 

I know that the RTI will not execute until the servo has finished and that excatly what i want to use...

I want the acquisition to be done in the first servo call after the "RTI interrupt", and before the "RTI execusion". I have the following frequencies :servo at 4KHz, RTI at 1KHz, so i need to find the right servo call between the 4 calls made.

 

Do you have a way to detect RTI interrupts? (not the RTI execusion).

 

If there is no direct way using deltatau/xenomai available status/structures, i guess i will increment a count the beginning of the RTI task, then count servo calls so that i execute my code on the 4th servo call after my RTI execusion increment (this work if we assume the RTI task always starts its execusion between the first and the second servo calls. This should be the case, but, theoretically it depends on MotionProg and other Deltatau tasks executed every RTI interrupt before the RTI task).

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...