DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

use variable in Chncalculate function in diadem

Solved!
Go to solution
I need to use a variable in ChnCalculate function but takes only text so how do i embed the varaible in text inside that function. It keeps on beeping undefined variable where as i have already defined it at the start of program and also assigned value to it.
0 Kudos
Message 1 of 5
(4,817 Views)

Hello!

 

You can only use global variables allocated with the GlobalDim command or predefined global variables like R1 or T1 in ChnCalculate.

 

Matthias

Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 2 of 5
(4,815 Views)

It is still not working

 

here is my code

 

GlobalDim a
a = 10
Call ChnCalculate("Ch(""[1]/Clataca"")= (Ch(""[1]/Latac"")/Cos(Rad(a))-Tan(Rad(a)))")

 

 

0 Kudos
Message 3 of 5
(4,807 Views)
Solution
Accepted by topic author GDU

Hi coolguru,

 

The syntax error is in your first line, it should be instead:

 

GlobaDim "a"

 

Brad Turpin
DIAdme Product Support Engineer
National Instruments

0 Kudos
Message 4 of 5
(4,802 Views)

Thanks Its working perfectly fine.

 

Solution Accepted

0 Kudos
Message 5 of 5
(4,775 Views)