常见问题

Need technical support?

Reading/Writing UAQs in C-Code that are not available in C-Code

Question

In the Reference Manual, there are some UAQs that do not have a C-Code variable assgined to them. How can I read them in my C-Code?

Solution

The DataDictonary can also be read from C-Code, you just need to know the name of the UAQ that you want to read or write.

Here is an example, on how to read the UAQ Steer.Pfeffer.Eps.Trq_E using the User.c file:

  1. The first step is to create a Data Dictionary variable which is named Pfeffer in this case.


  2. After declaring the variable, you can read the desired UAQ and pass it to the Pfeffer variable using DDictGetEntry(). This should be done in the initialization function User_TestRun_Start_atEnd.


  3. In User_Calc, GetFunc() is used to copy the current value of Steer.Pfeffer.EPS.Trq_E to a local variable value.

To write the values, you should use the SetFunc function instead:

There is more information about the DataDict C-Code functions and structures in the DataDict.h file included in your installation directory (normally in Windows C:/IPG/carmaker/win64-/include)

Need technical support?
  • Date: 05.05.2021
  • Product: CarMaker
  • Version: 12.0
  • Component: C-Code Interface
  • Language: English

Tags

C-Code
User Accessible Quantity
Data Dictionary