9/21/2021 9:43 PM | |
Joined: 9/3/2021 Last visit: 4/9/2024 Posts: 12 Rating: (0) |
and if to turn a bit there is a difference of 2% up or down, to show that the signal has a discrepancy |
9/21/2021 10:51 PM | |
Joined: 9/27/2006 Last visit: 4/24/2024 Posts: 12257 Rating: (2665) |
Hello alexandre; I have prepared one possible FBD function that could rsolve your issue. If the difference between the 2 REAL inputs x_value and y_value is greater than 2%, bit DB10.DBX0.3 will turn ON. Please feel free to modify it as you need. If this is a single call program it as you see. If you need to do this test recurrently, program it inside an FC, which you can call with different parameters x_value and y_value. Here is a link to the S7-300 FBD programming language, it may prove useful. https://support.industry.siemens.com/cs/ww/en/view/109751819 Hope this helps, Daniel Chartier |
9/22/2021 9:08 AM | |
Joined: 3/5/2014 Last visit: 8/5/2022 Posts: 5521 Rating: (1050)
|
hi alexandredr, have a look to the Library of general functions. The block "LGF_CompareLRealByPrecision" does exactly what you want. Have a look into the documentation chapter 3.3.3. hope this helps, regards, |
FCK WAR! |
|
This contribution was helpful to1 thankful Users |
Follow us on