Supplying a SystemTime Variable

dSPACE FAQ 729
FAQ 729
Supplying a SystemTime Variable
Keywords
SystemTime variable, warning #10601, fatal #20005
Question
Code generation fails with the following messages:
Warning #10601:
<path>:No RTOS/SystemTime 'VariableObject' was found in the data
dictionary.
Fatal #20005:
The variable specified with variable key 'RTOS/SystemTime' is invalid.
Check the error messages above for further details.
OR
Error #10724:
The variable specified with DD path RTOS/SystemTime is invalid. Check the
error messages above for further details.
What does this mean, and what do I have to do to enable code generation?
Solution
Some of the TargetLink blocks, e. g., the Discrete Time Integrator and the Rate Limiter block, need the
time that elapsed since the last execution of the block. If these blocks are part of a periodically
executed subsystem, the elapsed time is the step size of the sample time. However, if you have
conditionally executed subsystems, you need an absolute time to verify how much time elapsed since
the last execution (in some cases, this might not be necessary, refer to the following sections.)
When the absolute time is needed, the RTOS/SystemTime variable is evaluated, regardless of the
active code generation mode. For more information, refer to TargetLink Advanced Practices Guide
Mapping of Subsystems and Functions – Controlling Subsystem Execution – Executing Triggered
Subsystems.
Your Data Dictionary must contain an object called “/Pool/Variables/RTOS/SystemTime”. The object
must have appropriate settings. If you start your model with the basic Data Dictionary template, no
SystemTime variable is specified. The advanced Data Dictionary template contains a SystemTime
variable.
With TargetLink 2.2 and later, perform the following steps:
1. Select View – Show DD Merge Explorer in the Data Dictionary Manager.
2. Load the advanced Data Dictionary template (the file
%DSPACE_ROOT%\Dsdd\Config\dsdd_master_advanced.dd).
3. In the DD Merge Explorer, go to /Pool/Variables and open the node.
4. Right-click the RTOS object.
5. From the context menu, select Copy Left (Merge-Overwrite).
The SystemTime variable is copied to the /Pool/Variables node of your Data Dictionary.
In all TargetLink versions (including the ones earlier than TargetLink 2.2), you can also proceed as
follows:
1. Open the advanced Data Dictionary template file
%DSPACE_ROOT%\Dsdd\Config\dsdd_master_advanced.dd.
Supplying a SystemTime Variable
FAQ Version: 4 / 2016-09-23
Page 1
dSPACE FAQ 729
2. Right-click /Pool/Variables/RTOS.
3. From the context menu, select Save As.
4. In the dialog that opens, specify a name and click OK.
5. Open your original Data Dictionary file.
6. Right-click /Pool/Variables.
7. From the context menu, select Load.
8. Select the Data Dictionary file you specified in step 4.
9. Change the name of new_loaded_node to “RTOS”.
You can then delete the temporary Data Dictionary file specified in step 4.
In some cases, the SystemTime variable is not necessary even though a block, such as the Discrete
Time Integrator or the Rate Limiter block, is located inside a conditionally executed subsystem. This is
the case if you are using function-call subsystems that are executed during each time step. In this
case, a SystemTime variable is not needed, because the difference between successive executions
always equals the sample time. Due to Simulink semantics, it is not possible to supply the sample time
via the block dialog of the the Discrete Time Integrator or the Rate Limiter block. As a solution, perform
the following steps:
1. Open the Trigger Port block of the subsystem.
2. Set the sample time type to periodic.
3. Specify the sample time.
TargetLink is now able to use the specified sample time inside the conditionally executed subsystem,
so it is not necessary to use the SystemTime variable.
Related FAQs
Supplying a SystemTime Variable
FAQ Version: 4 / 2016-09-23
Page 2
dSPACE FAQ 729
How to Contact dSPACE Support
dSPACE GmbH
Rathenaustraße 26
33102 Paderborn
Germany
++49 5251 1638-941
mailto:[email protected]
http://www.dspace.com/support
dSPACE recommends that you use the support request form on the Internet to contact
dSPACE Support.
It is available at:

http://www.dspace.com/go/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/go/patches for software updates
and patches.
FAQ
FAQ documents are available at http://www.dspace.com/go/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 2016 by:
dSPACE GmbH
Rathenaustraße 26
33102 Paderborn
Germany
This publication and the contents hereof are subject to change without notice.
A list of registered dSPACE trademarks is available at:
http://www.dspace.com/go/Trademarks
Supplying a SystemTime Variable
FAQ Version: 4 / 2016-09-23
Page 3