DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Using variables in calculator

Solved!
Go to solution

Starting out new with DIAdem and would like to use variables in a formula. I would prefer to stay away from Scripts if possible since I am stepping into this one small step at a time 🙂

 

So for example I would like to multiply one channel by a defined variable, and use that same variable in multiple other formula too.

 

Thank you

0 Kudos
Message 1 of 2
(1,269 Views)
Solution
Accepted by topic author SimonM-D

Hi Simon, 

 

you could use the auxiliary variables from DIAdem to do it: https://www.ni.com/docs/en-US/bundle/diadem/page/genas/genauto/genauto_helpvariables.htm

 

In the calculator you would enter for example R1 = 2 to define a variable value of 2, and click enter afterwards.

The value can be read back by just entering R1 and click enter. 

 

If you want to multiply for example the channel Speed with 2 and create a new channel Speed2, it would be the following formula. 

ch("[1]/Speed2") = R1 * ch("[1]/Speed")

 

But I do not know your usecase at all. So I just describe how it works and ignore the task behind. 

 

0 Kudos
Message 2 of 2
(1,208 Views)