hexagon logo

Measures as input to user written functions

Hello,
 
Is it possible to use a measure as input to the user input values of a subroutine? I want to use the previous values of a contact force in order to change the force's value in the current step i.e., I want to create a measure of a contact force and use it as input to its user written subroutine (cnfsub).
 
Thanks,
 
Josef K.
Parents
  • Hello Rishikesh,
     
    This is the way I am using it right now. I believe it's the same as you suggested. Still, this way I get wrong values, different from the ones that I'd get when plotting the same component in the ppt.
     
    To be more precise, I made sure that my function always returns a value of 1000 as force. When reviewing the ppt results there is indeed a constant value of 1000 for the contact force, but when printing the results of the evaluation of VAR/1, there are some random values like 2000 or - 1000 when the contact force should be zero. As JSlat suggested, this might be due to the fact that contact measures aren't corrected before output or by the fact that I used c_sysfnc to output the VAR/1 value perhaps?
     
    Thanks,
     
    Josef
     
    image
Reply
  • Hello Rishikesh,
     
    This is the way I am using it right now. I believe it's the same as you suggested. Still, this way I get wrong values, different from the ones that I'd get when plotting the same component in the ppt.
     
    To be more precise, I made sure that my function always returns a value of 1000 as force. When reviewing the ppt results there is indeed a constant value of 1000 for the contact force, but when printing the results of the evaluation of VAR/1, there are some random values like 2000 or - 1000 when the contact force should be zero. As JSlat suggested, this might be due to the fact that contact measures aren't corrected before output or by the fact that I used c_sysfnc to output the VAR/1 value perhaps?
     
    Thanks,
     
    Josef
     
    image
Children
No Data