Idea : New math function

Florent Mirieu de Labarre 2 years ago in IQANdesign • updated by Ulrik Zakariasson (Software development) 1 year ago 3


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).


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