hschir Posted November 6, 2012 Share Posted November 6, 2012 I am required to collect both the raw voltages and the conversion data from an eTape. I have set up DAQFactory channel (eTape1_V) to collect the raw (quantized) voltage is at 1 second intervals from eTape A second channel is then required for the eVap data (eVap1), My question is does the eVap channel: 1. read the second channel (eTape1_V) at 1 second intervals averages 60 of these samples and then apply the voltage to mm evaporation conversion, alternatively, 2. read the second channel at 1 second intervals apply the evaporation conversion to each of the 60 samples and then averages those results, but I think it’s more likely to follow point 2, or neither of these ? Link to comment Share on other sites More sharing options...
AzeoTech Posted November 6, 2012 Share Posted November 6, 2012 If you need to collect both raw and converted values, its usually best to create two channels like you did, but make the second channel have a timing of 0, and use the Event of the first channel to put the converted value into the second. So, if you are actually reading voltage into eTape1_V, you'd go into its Event and put something like: eVap1.addValue(eTape1_V * 10) which would make eVap1 hold 10 times the value of eTape1_V. If you wanted a running 60 second average, you'd do more like: eVap1.addValue(mean(eTape1[0,59]) * 10) however, you won't get as much of a mean at the beginning. Link to comment Share on other sites More sharing options...
hschir Posted November 8, 2012 Author Share Posted November 8, 2012 The voltages are being collected in the first channel: eVap1_V The second channel is called: eVap1_avg The settings for the second channel are: Device: LabJack Device number: 1 I/O Type: DigIn (because I have plenty of unused dig channels) Channel: 9 Timing: 0 Conversion: Nothing I already have the conversion in 'Conversions' its tag is: eTape_1 In the Event for eVap1_V I have: eVap1_avg.AddValue(mean{eVap1_V[0,59]}*eTape_1) It's not working - can you tell me why ? Link to comment Share on other sites More sharing options...
hschir Posted November 8, 2012 Author Share Posted November 8, 2012 Forget about my previous post - I've sorted it out now! Link to comment Share on other sites More sharing options...
hschir Posted November 8, 2012 Author Share Posted November 8, 2012 I will ask this - why did you say "however, you won't get as much of a mean at the beginning." ? Link to comment Share on other sites More sharing options...
AzeoTech Posted November 8, 2012 Share Posted November 8, 2012 Because when you start DAQFactory, unless you are using Persist on your channels, your eVap1_V channel won't have 60 values to average. BTW: {} is not the same as () and should not be used as a substitution. It may work now, but is unlikely to work in future releases. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.