I am using a timed while loop and am unable to get the loop to run at a speed of less than 1ms (I am currently using the Wait(ms) function). How can I get a faster response?

I am trying to create a virtual engine within a timed while loop and am unable to get the loop to run at a speed of less than 1ms (I am currently using the Wait(ms) function). This does not however allow realistic engine speeds. How can I overcome this? I have access to a PCI-MIO-16E-4 board.

andyt writes:
> I am using a timed while loop and am unable to get the loop to run at
> a speed of less than 1ms (I am currently using the Wait(ms) function).
> How can I get a faster response?
>
> I am trying to create a virtual engine within a timed while loop and
> am unable to get the loop to run at a speed of less than 1ms (I am
> currently using the Wait(ms) function). This does not however allow
> realistic engine speeds. How can I overcome this? I have access to
> a PCI-MIO-16E-4 board.
Andy,
Unless you use a real time platform, getting extactly 1 ms loop rate
(or even less) is impossible. It starts getting troublesome at about
0.1 Hz for standard operating systems.
I'd tackle your problem with "if i mod 10 == 0 then sleep 1 ms".
Of
course this is jerky by design.
HTH,
Johannes Nie?

Similar Messages

Maybe you are looking for

  • Can i transfer purchases from one account to another?

    My son has an iCloud account for his iPod Touch that he has purchased many apps and songs on.  His school has assigned new iPads (that us parents have to buy out of pocket) and he was assigned to create a new iCloud account for that iPad that he will

  • How to use Print Control in Print List.

    Please any body can explain me how to use print control when creating Print list? Thanks in advance.

  • Why aren't thumbnails of pages are not showing preview with master applied?

    I was trying the basic tutorial, and noticed that when I click into the pages, the master is applied, but in the plan sitemap view, the master content is not showing up in their thumbnails. Meanwhile, the tutorial video shows the sitemap page thumbna

  • How can i put foto's from my canon 350 to my iPad ?

    Can you tell me how i can put foto's from my canon 350 to my iPad 2. With THE camera connection kit i have THE Message That hè can't recognize my device. Thanks

  • Please help another publishing error

    Hi I have checked around for answers (or at least a reasonable explanation of something fairly simple) and found nothing. I have just tried to add a new pictures page to my site, with a couple of holiday pics. All well and good. Then when I publish t