hexagon logo

Contact incinident information

Hello,
 
I am trying to extract information about the contact incidents in Adams, in order to exact the times at wich more than 1 gear tooth pair of an involute gear model come into contact. I understand that after the simulation, I can look at the contact incidents and tracks, but if possible, I'd like to be able to extract the incidents during simulation, in the form of measurements.
 
Thanks,
 
Josef K.
Parents
  • Hi Josef,
     
    I have prepared a simple example of C code (sfosub.c) in which c_errmes is used and an Adams model (platform_isolator_start.cmx) which are attached here. You may use this example to check if you can generate a subroutine. Then you can modify this code to generate your subroutine.
     
    Open an Adams command prompt and navigate to the directory where your model and the source C code exist and use the following commands to generate the .dll file:
     
    adams20xx_x (for example adams2021_4) -> cr-user -> n -> the name of your C code file (for example sfosub.c) -> Enter -> name of .dll file (for example solverc.dll)
     
    As such, a .dll file is generated. Now you can import the attached Adams model to your Adams view session.
     
    Modify the force, damping_actuator, and insert the following expression in front of User Parameters:
     
    (.platform_isolator.base.MARKER_33.adams_id),(.platform_isolator.ground.MARKER_34.adams_id),1.0,0.0
     
    In order to use the subroutine insert, solverc, in front of Routine.
     
    Now if you run the simulation an error message should pops up. This shows that the function, c_errmes, in the code in working properly.
     
    Change the extension of the model from .cmx to .cmd before using.
     
    Thank you,
    Ghasem

    Attached Files (1)
Reply
  • Hi Josef,
     
    I have prepared a simple example of C code (sfosub.c) in which c_errmes is used and an Adams model (platform_isolator_start.cmx) which are attached here. You may use this example to check if you can generate a subroutine. Then you can modify this code to generate your subroutine.
     
    Open an Adams command prompt and navigate to the directory where your model and the source C code exist and use the following commands to generate the .dll file:
     
    adams20xx_x (for example adams2021_4) -> cr-user -> n -> the name of your C code file (for example sfosub.c) -> Enter -> name of .dll file (for example solverc.dll)
     
    As such, a .dll file is generated. Now you can import the attached Adams model to your Adams view session.
     
    Modify the force, damping_actuator, and insert the following expression in front of User Parameters:
     
    (.platform_isolator.base.MARKER_33.adams_id),(.platform_isolator.ground.MARKER_34.adams_id),1.0,0.0
     
    In order to use the subroutine insert, solverc, in front of Routine.
     
    Now if you run the simulation an error message should pops up. This shows that the function, c_errmes, in the code in working properly.
     
    Change the extension of the model from .cmx to .cmd before using.
     
    Thank you,
    Ghasem

    Attached Files (1)
Children
No Data