• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Adams Car
  3. How can I trigger an external action from within the driver...

Following Cadence Design Systems’ acquisition of the Design & Engineering (D&E) business, the D&E Community Forum on the Nexus Community Center has been migrated in the Cadence Physical System Simulation Community. For more details and if you have any questions, please refer to the FAQ.

Stats

  • State Not Answered
  • Replies 9
  • Subscribers 1
  • Views 11
  • Members are here 0
More Content

How can I trigger an external action from within the driver control file?

o.jonson
o.jonson over 6 years ago
Hello,
 
I want to trigger an action from within the driver control files that is not an standard output (throttle/steering/clutch etc). Basically I want to do some minimaneuvers to achieve a certain vehicle state, then activate a parking lock torque in the gearbox, then deactivate it and continue the simulation.
 
Of course I could use some STEP(time) functions in the torque expression to activate the torque at the right moment, but that solution wouldn't be general for different driver control files . Any ideas on how to trigger such an action from within the driver control file?
 
Thanks
/Oskar
 
 
 
 
 
 
 
  • Sign in to reply
  • Cancel
Parents
  • Thomas Nygårds
    0 Thomas Nygårds over 6 years ago
    @Oskar Jonson​  That is actually expected.
    It is the name of a macro that the user can create. If will be executed at a custom macro entry point and they exist in several places in the acar code. in the actual example at the "post" step of the execution of the macro mac_ana_ful_sub.
    So if you need something custom run at such a point then you just create a macro with a specific name (eg. mac_ana_ful_sub_custom_pos) anywhere in the database (and add it to site or plugin for ease of use)!
    Look at the macro  .acar.macros.mac_ana_ful_sub to see in the file generation process when and how it is called.
    Then you will also see that the macro should take the parameters:
    assembly
    analysis_mode
    analysis_name
    simulation_type
    (all can be strings but maybe better if : model, string, string, string) Important is also to add a user entered command to it as it cannot be empty/"use macro name".
    Note that your macro, once created, will be called for all full vehicle simulations (in this case), so be sure to insert a an appropriate if statement in the macro to only do the modifications for simulations/models which needs them to be done.
     
    The other option is as you say to change the acf file with your cluster submission script (which I guess you mean with the --pre command) depending on the analysis type. That might be easier in some cases, but unless you want to hardcode it, you have to look up the id of the torque. This can of course be done in many ways, but if not done in adams it might require some adm text processing to be on the safe side.
     
    Regards
    Thomas
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • Thomas Nygårds
    0 Thomas Nygårds over 6 years ago
    @Oskar Jonson​  That is actually expected.
    It is the name of a macro that the user can create. If will be executed at a custom macro entry point and they exist in several places in the acar code. in the actual example at the "post" step of the execution of the macro mac_ana_ful_sub.
    So if you need something custom run at such a point then you just create a macro with a specific name (eg. mac_ana_ful_sub_custom_pos) anywhere in the database (and add it to site or plugin for ease of use)!
    Look at the macro  .acar.macros.mac_ana_ful_sub to see in the file generation process when and how it is called.
    Then you will also see that the macro should take the parameters:
    assembly
    analysis_mode
    analysis_name
    simulation_type
    (all can be strings but maybe better if : model, string, string, string) Important is also to add a user entered command to it as it cannot be empty/"use macro name".
    Note that your macro, once created, will be called for all full vehicle simulations (in this case), so be sure to insert a an appropriate if statement in the macro to only do the modifications for simulations/models which needs them to be done.
     
    The other option is as you say to change the acf file with your cluster submission script (which I guess you mean with the --pre command) depending on the analysis type. That might be easier in some cases, but unless you want to hardcode it, you have to look up the id of the torque. This can of course be done in many ways, but if not done in adams it might require some adm text processing to be on the safe side.
     
    Regards
    Thomas
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2026 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information