Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

With the emergence of Windows NT as a base for industrial control, several companies have introduced extensions to the NT system to enhance real-time performance. There are some timing issues with these extensions when using the ACR8K NT driver for controlling an Acroloop card.

Real-time extension packages (and some real-time-enhanced applications) typically need fine-grained system timing to assure that events are handled in a timely manner. One such technique used by the major package vendors involves the Windows NT multimedia timer, which is a low-level system resource. This timer has a default setting of 10 milliseconds (msec). Real-time packages often reduce this setting to 1 msec.

Changing the multimedia timer delta impacts our driver's performance. The stock driver settings are optimized for a 10 msec multimedia timer delta period. Going to a 1 msec delta can cause inordinate CPU usage, due to the internal timer configuration. (the Acroloop NT driver has 5 periodic timed DPC service threads per board) In testing, the best performance has been achieved by changing all timer delta defaults from 1 to 10. (this change is ratiometric, and restores the original internal timer durations) There are several ways to accomplish this adjustment:

  • Set new default values from the ACR8K Driver Setup Control Panel applet. Highlight the device to change, click `Settings' and reset the first 5 values from 1 to 10. (applicable to the current multi-card ACR8K driver) The settings to change are Binary Service Timer Delta, Fast Status Timer Delta, Status Timer Delta, Read Status Timer Delta and Write Status Timer Delta. (not available with the older, single-card ACR8K driver)

  • Set new default values directly in the registry, using the Registry Editor. These registry keys are all located at the path `HKEY_LOCAL_MACHINE/CurrentControlSet/Services/ACR8K/Parameters/', with key names of BinaryServiceTimerDelta, FastStatusTimerDelta, StatusTimerDelta, ReadStatusTimerDelta and WriteStatusTimerDelta. When placing new values, take care to select decimal input. A hex 10 is decimal 16, and will cause lower driver performance.

  • Set new delta values directly from your application, using the Acrolib API calls AcroSetBinaryTimerDelta(), AcroSetReadTimerDelta(), AcroSetWriteTimerDelta(),AcroSetFastStatusTimerDelta() and AcroSetStatusTimerDelta()

    As noted above, the current version multi-card ACR8K driver instantiates a group of 5 service threads per installed device. Multi-card users will want to reset timer delta values for each of the installed devices. The Control Panel applet is the preferred method for making these changes. If a user wants to edit the registry directly, the keys are found in the path HKEY_LOCAL_MACHINE/CurrentControlSet/Services/ACR8K/Parameters/Device0/
    HKEY_LOCAL_MACHINE/CurrentControlSet/Services/ACR8K/Parameters/Device1/
    and so on. keep in mind that this 1-to-10 adjustment assumes the application or real-time extension has set the multimedia timer to 1 msec. Consult the documentation for your particular package to confirm what change is being made. You may have to adjust the driver's default values accordingly.
    In all applications, you should closely monitor CPU usage during development. Having a minimized Task Manager in the system tray is very useful for this. If the system is still sluggish, the timer delta settings should be increased. This will have some effect on driver response, but overall, you're trading foreground time for kernel time anyway. The more the driver is asked to do, the more CPU it will consume. When tweaking timer deltas, users should take care to keep all the settings symmetrical, and try small increments (1 or 2 at a time). The deltas should be increased only to the point where the system responds well; too high a value will reduce driver performance and impact the quality of control.

    A note regarding IRQ settings: Our ACR8K driver requires a valid IRQ selection for each installed device. Even though your application may not make direct use of the IRQ, the Move Counter (a feature of the ACR8K driver and Acrolib support library) is incremented using hardware interrupts. Without a valid IRQ assignment, the driver will not run. In the case of a multi-card installation, an invalid IRQ setting will disable driver services for the improperly configured device.

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.