ginos Posted July 16, 2009 Report Share Posted July 16, 2009 I am a student and I would like to take continuous temperature measurements using thermocouples. I am using an SCXI-1000 chassis, an SXCI 1102-B module, an SCXI-1303 terminal block and the PCI-6034E board. I am taking the temperature readings using the Cont Acq Thermocouple Samples-HW Timed.vi. My problem is that i would like to see in the front panel a continuous updated waveform, while in the end concentrate all the samples taken in a txt file. If I place outside the loop the export waveform to spreadsheet.vi then I will onlytake the last measurements. If i place it inside the loop, the vi will ask me in each iteration to save the samples. How can solve it? I have also a of question regarding the Cont Acq Thermocouple Samples-HW Timed.vi. Is it necessary first to adjust in MAX the temperature range that i would like take measures or it is automatically adjusted when I configure the range in the Cont Acq Thermocouple Samples-HW Timed.vi. Thank you in advance Papakonstantinou Georgios export all data after the loop terminates executing Quote Link to comment
Aristos Queue Posted July 16, 2009 Report Share Posted July 16, 2009 Place it outside of the loop. There is a square on the border of the loop where the wire crosses from inside to outside. That's called a tunnel. Pop up on the tunnel and select "Enable Indexing". The result will be an array of your data, each element of the array being one iteration of the loop. You can then write the entire array to disk. Quote Link to comment
Kurt Friday Posted July 16, 2009 Report Share Posted July 16, 2009 (edited) I have also a of question regarding the Cont Acq Thermocouple Samples-HW Timed.vi. Is it necessary first to adjust in MAX the temperature range that i would like take measures or it is automatically adjusted when I configure the range in the Cont Acq Thermocouple Samples-HW Timed.vi. There are two ways to do this. 1) Create a measurement task in MAX where you specify the temperature range and other parameters of your measurement and then in LabVIEW perform acquisition using that task. 2) Basically create the task in LabVIEW by using DAQmx Create Channel where you can specify the range of your measurement. I believe in your case you are calling DAQmx Create Channel (AI-Temperature Thermocouple).vi where you do specify the limits and also thermocouple type, cjc source ect so for your case you dont need to jump into MAX to set anything up. Edited July 16, 2009 by SciWare 1 Quote Link to comment
ginos Posted July 17, 2009 Author Report Share Posted July 17, 2009 Measurements.txtMeasurements(without while loop).txtGuys I really thank you for the help. I have uploaded the vi that I am currrently running on Labview 7.0 platform and i also i uploaded the measurements that I take from this vi when I enable indexing in the loop tunnel. The problem is that i get a lot of zero's(!!!!!) inside the txt file. Please take a look. I simply know that if I delete the while loop and replace the Write to Spreadsheet.vi with the Export Waveforms to Spreadsheet File.vi then only I will read the temperature measurements. (I also uploaded this txt file) However, I do not want to remove the while loop because I won't be able to watch the continuous updating waveforms. How can I deal with this problem? Another problem is that by having a while loop in the block diagram I cannot control the number of samples that I would like to take. The vi will continue to execute until I press the stop button. Is it possible to keep it that way or do I have to replace the while loop with a for loop? (when I replace it with a for loop other problems also arise!!) Finally, I am trying to configure the gain and the polarity from MAX to find the code width and to calculate the accuracy of my measurements, but it seems that they are automatically configured depending on the temperature input range you provide them. Do you knowContinuous Thermocouple Measurements.vi if they can be configured manually? I really appreciate for the time you take to answer my questions. Giorgios Papakonstantinou Quote Link to comment
Kurt Friday Posted July 18, 2009 Report Share Posted July 18, 2009 Hey Ginos Have a play with putting the write to spreadsheet inside your loop but wire a path to it so it doesn't prompt you every time. Also set append to file = True. Have a tinker and see how you go. Quote Link to comment
ginos Posted July 18, 2009 Author Report Share Posted July 18, 2009 Hey Ginos Have a play with putting the write to spreadsheet inside your loop but wire a path to it so it doesn't prompt you every time. Also set append to file = True. Have a tinker and see how you go. Thanks SciWare It really worked. Very peculiar... The strange thing about it, is that if I do not put the append to file=true then i will have the last set of temperatures (!!). Probably because it does not append the previous tempreatures to the file. Instead of putting a constant file path i tried to replace it with a control. The problem is that if the file has not been created then it cannot accept it. Do you know how to make this vi to take finite measurements for example 2000 samples/channel and then stop but keeping the continually updated waveform? If I change the sample clock.vi to from continuous samples to finite samples I won't be able to to watch constantly updated waveform. Quote Link to comment
Kurt Friday Posted July 19, 2009 Report Share Posted July 19, 2009 Thanks SciWare Do you know how to make this vi to take finite measurements for example 2000 samples/channel and then stop but keeping the continually updated waveform? Just put a case structure around the write to spreadsheet. If number of samples is less than or equal to 2000 then write to spreadsheet else don't. Quote Link to comment
ginos Posted July 22, 2009 Author Report Share Posted July 22, 2009 Just put a case structure around the write to spreadsheet. If number of samples is less than or equal to 2000 then write to spreadsheet else don't. My friend in this occasion it simply will not write the spreadsheet. I do not want this to happen. Instead I want to have control where I can insert number of samples (for ex.1000 samples) and a control where I will insert the rate (for ex. 100Hz). Consequently the vi will run t=N/f seconds. the vi that I have so far runs until I press the stop button. The problem lies in the polymorfic vi's DAQmx Timing.vi and DAQmx Read.vi. If you have time please take a look. Thank you! Quote Link to comment
Kurt Friday Posted July 23, 2009 Report Share Posted July 23, 2009 My friend in this occasion it simply will not write the spreadsheet. I do not want this to happen. Instead I want to have control where I can insert number of samples (for ex.1000 samples) and a control where I will insert the rate (for ex. 100Hz). Consequently the vi will run t=N/f seconds. the vi that I have so far runs until I press the stop button. The problem lies in the polymorfic vi's DAQmx Timing.vi and DAQmx Read.vi. If you have time please take a look. Thank you! Hi Ginos Take a look at the code snippet below it should guide you as to how to log N samples to the spreadsheet but continue to display. If you want to acquire a finite number of samples use the Sample Mode = Finite Samples in the Sample Clock and in your code check if the task is done using DAQmx Is Task Done.vi and if so terminate the loop as shown. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.