Documente Academic
Documente Profesional
Documente Cultură
FAQ 235
To solve such a problem at low speed there are the following approaches.
Method 1 Use wider sampling interval
Instead of executing the Encoder position block in each program step, it can be placed in a subsystem
(Triggered Subsystem, Function-Call Subsystem) that is executed with a greater step size.
When using a Triggered Subsystem it is even possible to implement a variable sampling interval for
the encoder measurement: The output of a configurable loop counter can be used as trigger signal.
This way a small sampling interval can be used for high sensor frequencies (high speed) and a wide
sampling interval can be realized for low sensor frequencies (low speed).
It is only necessary to divide the result by the correct time difference (cf. Image 1).
Method 2 Measure the time difference between encoder pulses
Instead of measuring the number of pulses in a given interval, another measurement principle can be
realized: Using interrupts and RTLib functions the time difference between successive encoder pulses
can be measured. The following images show the implementation with the RTI1104 blockset.
The custom code must completely be entered into the Function Declaration Code field of the System
Outputs block as shown in Image 5. This guarantees that the custom code is executed before any
generated code.
dSPACE recommends that you use the support request form on the internet to contact
dSPACE support.
It is available under
http://www.dspace.com/goto?supportrequest
Software Updates and Patches
dSPACE strongly recommends that you download and install the most recent patches for your
current dSPACE installation. Visit http://www.dspace.com/goto?patches for software updates
and patches.
FAQ
FAQ documents are available under http://www.dspace.com/goto?faq.
Important Notice
This document contains proprietary information that is protected by copyright. All rights are
reserved. Neither the documentation nor software may be copied, photocopied, reproduced,
translated, or reduced to any electronic medium or machine-readable form, in whole or in part,
without the prior written consent of dSPACE GmbH.
Copyright 2010 by:
dSPACE GmbH
Rathenaustr. 26
D-33102 Paderborn
Germany
This publication and the contents hereof are subject to change without notice.
For a list of registered trademarks of dSPACE products refer to
http://www.dspace.com/goto?Trademarks