Measurement Computing   Easy to Use | Easy to Integrate | Easy to Support catalog banner

Measurement Computing Data Acquisition Knowledgebase

Welcome Guest ( )

DASYLab IF...THEN statement

Expand / Collapse
 

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.




Rate this Article:

Add Your Comments


For comments email [email protected].

Details
Article ID: 50320

Last Modified:7/29/2013 10:47:56 AM

Article has been viewed 8,421 times.

Options