calculateask-question All questions


I'm new in sequematic. How i calculate variable value with my own calculate function witch it use other variable?

VarOut = calculateMe(VarIn)

calculateMe :

if( varIn < 15) then return 3

if( varIn >= 15 and varIn < 16 ) then return 4


if( varIn >= 27 and varIn < 28 ) then return 12

How i can do that?

(Sorry for my english, I french native)

Asked by poolTest on May 31, 2022, at 9:48am

Hello, what sort of calculation do you want to do you on your variable?  You can perform addition and subtraction using the change variable step however they are the only changes you can perform.

In terms of checking the value of a variable you should use the variable value condition.  To check if a variable is between two values, you will need to do a nested IF, for example:

  • IF varIn >= 15 THEN
    • IF varIn < 16 THEN
      • ...
    • ELSE
      • ...
    • END IF
  • ELSE
    • ...
  • END IF

Post a reply

The SEQUEmatic bot is still new and learning. If you don't get the answer you need, just ask to speak with Derek and your chat will be transferred.