DASYLab IF...THEN statement


Question: How do I construct an IF - THEN like the one below using DASYLab?

IF Input > 20 then
    Output = 24
ELSE
    Output = Input
ENDIF


Answer:

The solution is to use the formula module with the following equation:

( ( In(0) > 20 ) * 24 ) + ( ( In(0) <= 20 ) * In(0) ), where In(0) in input 0.



Posted 2/16/2012 10:27:04 AM by Administrator
https://kb.mccdaq.com/KnowledgebaseArticle50320.aspx