ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to store values

Hi,
 
I want to store values in Channels which were caculated as variables. I can see the answer with a MSGBox, but I am unable to store this value in a Channel. How can I store values in Channels?
 
Thanks!
0 Kudos
Message 1 of 3
(2,734 Views)

Hi,

Please explore your question in detail or post VI to get more idea.

0 Kudos
Message 2 of 3
(2,714 Views)
Hi,
 
I want to calculate an average value from different channels. The values to calculate the average from are at different  positions in the specific channel. I am able to get this values and to calculate the average. But then I can not store this value in a channel, because it is not from a channel, it is just in a variable.
 
I tried it in a different way with the statistik function but there I am not able to get a specific area for each channel.
 
Thanks!
 

v=1
Andruck1 = (((v-1)*14)+12)
Andruck2 = (((v-1)*14)+13)
'Here I calculate the area where the values for the average are located in the channel
For a = 2 To 2000
      Anfangswert = ChD(a,Andruck1)
      
      If Anfangswert >= 20 and ChD(a-1,Andruck1) < 20 Then
      Zeit = a
  
End if
Next
 
For x = 0 To 200  'Here I calculate the average with the first method
      
      Wert1 = Wert1 + ChD(Zeit+x, Andruck1)
     
     'Wert2 = ChD(Kraft, Andruck2)
Next
     
      Mittel1 = Wert1 / 201                                             'How can I store Mittel1 now in a channel?
     
 
      beta = Zeit + 200
       
      StatSel(6) = "Yes"                                                 'Here I want to caculate the average with the statistik function,                   
      Call StatBlockCalc("Channel","Zeit-beta","12")     but the area is not always the same, and I always get a syntax error
                                                                                    What is the right syntax to write "Zeit-beta"?
 
0 Kudos
Message 3 of 3
(2,711 Views)