Executing a command based on a condition (Eg If) without using sequencer

  • Software
  • Executing a command based on a condition (Eg If) without using sequencer
Dino Morio

Posted on 24.07.2018 13:34

Hi,


I would like to execute a command based on the result of a condition.


I am trying to achieve this by not having to run a sequencer script.


Is this possible?

Eva Kalšek
Customer Support Engineer
Posted on 25.07.2018 14:36

Hi Dino,


with math formulas you can use If statements. For more accurate explanation I would need more information about your application.


Regards,

Eva


Dino Morio

Posted on 25.07.2018 18:24

Thanks for getting back.

For eg: if('x'=0) then

y=2 (or any statement)

else

y=3 (or any statement)

DEWESoft Support
Technical support
Posted on 26.07.2018 12:19

Dear Dino,


in Dewesoft, you can create If statements on following way: IF(condition,result1,result2).

(e.g. if('x'=0,2,3))


Regards,

Eva

Dino Morio

Posted on 27.07.2018 16:54

Hi,


Thanks for the suggestion.


However, result1 and result2 get assigned to the math channel variable that checks the condition (in this case If).


What I would like to know, is it possible to assign result1 and result2 to another variable. For eg


math_channel1=If(x=0) then y=2 else y=3


I know this is not compatible with the If syntax, but this is what I am trying to achieve. It is easy do this using sequencer, but I am looking for an alternative?


Is this possible using triggers / alarms?




DEWESoft Support
Technical support
Posted on 30.07.2018 10:16

Hi Dino,


unfortunately, currently this is only possible with the sequencer.


Eva

Login to reply to this topic. If you don't have account yet, you can signup for free account .