[Lu...] Posted May 31, 2021 Share Posted May 31, 2021 Hello, during a mechanical test, we exported the force using two analog channels with different scaling, for example F_fine: 10V=1000N and F_coarse: 10V=100000N. I would like to generate a user defined inspection F_combined that gives as an output F_fine when F_coarse<900N and F_coarse when F_coarse>=900N. For tha I would need a conditional sentence. I saw that "if", "then" and "else" are being recognized, since they appear green, but I am not able to form a correct sentence. Thank you in advance for the help. Best Regards, Luciano Avila Gray Link to comment Share on other sites More sharing options...
[Na...] Posted June 1, 2021 Share Posted June 1, 2021 Hello Luciano, the syntax is like in python. We have a free elearning on it in the training center. Chapter 3 is dealing with conditional sentences: https://training.gom.com/course/78355?r=False&ts=637581280563824382 The code is also sensitive to indents. So if you are sure that the text is correct maybe check the indent. You can also post your code here using the <> symbol in the reply form. Regards, Nanno Link to comment Share on other sites More sharing options...
[Lu...] Posted June 1, 2021 Author Share Posted June 1, 2021 Hello Nanno, thank you very much for the fast reply. I have tried that but I still get an error: "A scalar result is expected..." The code you can see in the screeshot: B.actual_value if A.actual_value>10000 : A.actual_value Am I missing something? Thank you very much! Luciano Link to comment Share on other sites More sharing options...
[Lu...] Posted June 1, 2021 Author Share Posted June 1, 2021 Ok, I got it x=Kf.actual_value if K.actual_value>19500: x=K.actual_value x Thank you very much! Best Regards, Luciano Link to comment Share on other sites More sharing options...
[ch...] Posted September 5 Share Posted September 5 (edited) Please sign in to view this quote. thanks for share helpfuly post. Edited September 5 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in