DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with trigger and relay

Solved!
Go to solution

Hey Community,

 

i'm quite unexperienced with DASYLab and need some help with my schematics. I try to create an if-else condition and dont know what to do next. 

 

Its my goal to analyse some input data for their values. If there is an input data between the value "0" to "4" i want to calculate this input with formula 1, if there is an input data between the value "4" to "8" it has to calculated with formula 2 (the two formulas are different).

 

I already created a combination with trigger and relay to evaluate which value the input data has, but then there is something missing. The input data has two channels but after the calculation i got four channels for each case. But i just want to have one result for each channel. -> the result input 1 should go to one output channel and the same for the second.

 

So i need a module that combines the two channels and delivers either result 1 or result 2 to one channel.

Which module that could be, something like a switch? I found nothing ...

 

Or is there any other solution for this problem?

 

Thanks for your help

 

Janem

0 Kudos
Message 1 of 3
(5,764 Views)
Solution
Accepted by topic author janem

You can do this in the formula itself.

 

Consider a formula module with one input and two outputs

 

CH0 - Output 0 ----------------------------------------------

(In(0) < 5) * (Your formula)

 

CH1 - output 1 ----------------------------------------------

(In(0) > 4) * (Your formula)

 

Now, if the In0 is true it will return one so the output will be your formula.  If the In0 is false it will return 0 so the output will be 0

 

The two outputs can go to a summing module so that you will have always the correct signal

Tom Rizzo
InSyS Corp.
www.insyscorp.com
Your DASYLab integrator
0 Kudos
Message 2 of 3
(5,759 Views)

Oh yeah quite simple, thank you for your fast answer!!!

0 Kudos
Message 3 of 3
(5,755 Views)