All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Smolorz <ssm@domain.hid>
To: roland Tollenaar <rolandtollenaar@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] CAN problem continued
Date: Tue, 6 Mar 2007 17:17:52 +0100	[thread overview]
Message-ID: <E1HOcMA-000340-MK@mailer.emlix.com> (raw)
In-Reply-To: <bc4264770703060750v171e9c23kd79de79dcdec3169@domain.hid>

roland Tollenaar wrote:

>
> > - With your application running you state that the real-time behaviour of
> > the system is bad. How do you detect this?
>
> I measure the period times. Here is the snippet
>
>
> void cyclicloop(void *arg)
> {
> 	RTIME now, previous;
>
> 	/*
> 	 * Arguments: &task (NULL=self),
> 	 *            start time,
> 	 *            period (here: 1 ms=1000000)
> 	 */
> 	rt_task_set_periodic(NULL, TM_NOW, TASK_PERIOD);
> 	previous = rt_timer_read();
>
> 	while (!TasksHalt) {
> 		rt_task_wait_period(NULL);
> 		now = rt_timer_read();
> 		//Read inputs here
> 		atm60_configure(can_device);

What does this function do?

> 		//Set analog output here
> 		//Do controller calculations here
>
>
>
>
> 		//Get time period
> 		double TimeVarTemp=(double)(now - previous);
> 		Task1Period=TimeVarTemp/ 1000000;
> 		//printf("Time since last turn: %f ms\n",Task1Period);
> 		previous = now;
>
> 		/*
> 		 * NOTE: printf may have unexpected impact on the timing of
> 		 *       your program. It is used here in the critical loop
> 		 *       only for demonstration purposes.
> 		*/
>
> 	}
> }//cyclicloop

-- 
Sebastian


  reply	other threads:[~2007-03-06 16:17 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-06  8:03 [Xenomai-help] CAN problem continued roland Tollenaar
2007-03-06  8:18 ` Sebastian Smolorz
2007-03-06  9:29   ` roland Tollenaar
2007-03-06  9:53     ` Gilles Chanteperdrix
2007-03-06 10:10     ` Sebastian Smolorz
2007-03-06 12:55       ` roland Tollenaar
2007-03-06 13:04         ` roland Tollenaar
2007-03-06 13:29         ` Sebastian Smolorz
2007-03-06 13:46           ` roland Tollenaar
2007-03-06 13:48             ` roland Tollenaar
2007-03-06 14:06             ` Sebastian Smolorz
2007-03-06 14:37               ` roland Tollenaar
2007-03-06 15:05                 ` Sebastian Smolorz
2007-03-06 15:10                   ` roland Tollenaar
2007-03-06 15:17                     ` Sebastian Smolorz
2007-03-06 15:23                       ` roland Tollenaar
2007-03-06 15:35                         ` Sebastian Smolorz
2007-03-06 15:50                           ` roland Tollenaar
2007-03-06 16:17                             ` Sebastian Smolorz [this message]
2007-03-06 16:35                               ` roland Tollenaar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1HOcMA-000340-MK@mailer.emlix.com \
    --to=ssm@domain.hid \
    --cc=rolandtollenaar@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.