+1

Idea : New math function

Florent Mirieu de Labarre 7 years ago in IQANdesign updated by Ulrik Zakariasson (Software development) 6 years ago 3

Dear


I will be greate to :

- add an option on the round math function, by default it is half. But if you need the whole part you cannot. Exemple 5,4 -> 5, 5,8->5 (it is the int() function). (type of rounding : https://en.wikipedia.org/wiki/Rounding)

- add latchtime fonction. instead to use an separate IDC with delay On and Off, an function like this latchtime(input chanel, delay on, delay off), can be greate to simplify the code.

- add hysteresis function, hysteresis(input chanel, switch on if sup, switch off if under).


Regards

Thank you for posting. Regarding your first idea - rounding alternatives floor and ceil were added in IQANdesign 5.00.

Thank for the link of Iqan5.


About the other function ?

Added a case for delay function.


Hysteresis should be simple enough to do in Qcode. Here are a couple of examples.


Using a static variable...


... or toggle