8/11/2023 7:33 PM | |
Joined: 10/15/2022 Last visit: 8/15/2024 Posts: 66 Rating:
|
Hi, all.
The program "Absolute value demo" calculates the absolute value of a number. If the result is negative (with a minus sign), its opposite number is displayed. Analog input AI1 and AI2 values are compared. If they are different, their difference is displayed. It doesn't matter which is bigger or smaller, the result is always positive. If the values are equal, user defined number (0) is sent. If input I1 is off, then output is 0. Program "Absolute value demo.zip" contains 5 files (program, UDFs, schemes and description). Andrus 13.08.2023 - This function can be used in programs where the value difference is important, but not whichever value is greater or less. For example, some kind of timer to change the time. 15.08.2023 - Program updated, two UDF blocks used. Program "Absolute value demo.zip" contains 8 files (program, UDFs, schemes and description) AttachmentAbsolute value demo.zip (326 Downloads) |
Last edited by: Andrus_Saar at: 08/11/2023 19:34:36Last edited by: Andrus_Saar at: 08/11/2023 19:38:26Last edited by: Andrus_Saar at: 08/12/2023 06:42:59Last edited by: Andrus_Saar at: 08/13/2023 22:01:21Last edited by: Andrus_Saar at: 08/15/2023 06:11:49 |
|
Follow us on