Kirit Posted November 11, 2008 Report Share Posted November 11, 2008 Hi , I am using Labview for 2 month. I want to measure the temperature daily basis (reading in every hour) then i want to write it in a file (which can be use in Excel) after 24 hours the file will close and new file will open to record the data. I am using a thermocouple. i can acquire data from that thermocouple but the rest work need your help. My intention is to take data in every hour and write it in the file. please help me. thanks in advance Kirit Quote Link to comment
Thang Nguyen Posted November 11, 2008 Report Share Posted November 11, 2008 Kirit, I don't really sure what you mean when you say you can acquire data from thermocouple. Did you have a device to get the data from the thermocouple yet? You need to use a device to get data from thermocouple such as compact FieldPoint (not too fast <200 samples/sec)or compact DAQ (> 200 samples/sec). Then depending on the device you use, there is specific VI as well as specifi method to read the value in. From that point you just store data like a floating point value. To write data into the file such as Excel file I usually use the .csv file which can open with Excel. To write data into file you can use the "write to spreadsheet file.vi" or "read from spreadsheet file.vi" to read data out. All of the methods to use these VIs can be found in the example finder. You can start from here to look for the appropriate device: http://www.ni.com/dataacquisition/. Take care. Quote Link to comment
crelf Posted November 11, 2008 Report Share Posted November 11, 2008 QUOTE (Kirit @ Nov 10 2008, 04:37 PM) I want to measure the temperature... write it in a file (which can be use in Excel)... Use http://sine.ni.com/nips/cds/view/p/lang/en/nid/6569' target="_blank">VI Logger. Quote Link to comment
jgcode Posted November 11, 2008 Report Share Posted November 11, 2008 QUOTE (Kirit @ Nov 11 2008, 06:37 AM) Hi ,I am using Labview for 2 month. I want to measure the temperature daily basis (reading in every hour) then i want to write it in a file (which can be use in Excel) after 24 hours the file will close and new file will open to record the data. I am using a thermocouple. i can acquire data from that thermocouple but the rest work need your help. My intention is to take data in every hour and write it in the file. please help me. thanks in advance Kirit Here is a thread that might help you get moving with some basic DAQmx and write to file in it. Once you can do the above you are probably going to need look at design patterns so you can implement a GUI and the timer etc.. QUOTE (crelf @ Nov 11 2008, 07:55 AM) Use http://sine.ni.com/nips/cds/view/p/lang/en/nid/6569' target="_blank">VI Logger. I did not know NI were still selling this cause I thought Signal Express was its successor. (It is the last disk, all the way at the back in the Dev Suite ) Does anyone have a preference over one or the other? Quote Link to comment
crelf Posted November 11, 2008 Report Share Posted November 11, 2008 QUOTE (jgcode @ Nov 10 2008, 06:06 PM) I did not know NI were still selling this cause I thought Signal Express was its successor. It is? Hmmmmm - you may be right... I don't have a preference for either as I think they do slightly different things. VI Logger is all about logging (I think it comes free with some DAQ cards?), whereas Signal Express is about giving the operator access to a whole bunch of interactive stuff. Aside: I know a lot of LabVIEW programmers that shy away from VI Logger and Signal Express (and TestStand for that matter) because they think that they can develop their own utilities more quickly and with more appropriate features from scratch in LabVIEW. My answer - that *may* be true, but work to meet the requirements of the project that you're working on (use the right tool for the job ) Quote Link to comment
jgcode Posted November 11, 2008 Report Share Posted November 11, 2008 QUOTE (crelf @ Nov 11 2008, 09:34 AM) Aside: I know a lot of LabVIEW programmers that shy away from VI Logger and Signal Express (and TestStand for that matter) because they think that they can develop their own utilities more quickly and with more appropriate features from scratch in LabVIEW. My answer - that *may* be true, but work to meet the requirements of the project that you're working on (use the right tool for the job ) Yes I was quite surprised when I found out that you can write VI plugins for SignalExpress. So it does have a place in application development. Quote Link to comment
Kirit Posted November 12, 2008 Author Report Share Posted November 12, 2008 Dear Thang Nguyen thanks for your reply. I already have a data acqisition system by which i can read the teperature of the thermocouple and i am able to diplay the temperature in the front panel. And i have learnt just now to write them in a file. but i am still confused about the rest steps. that means i need to show the temperatue in respect of day and time. Every hour it will record one temperatue . after 24 hours the file will be close and a new file will open and start recording. please let me know i am not clear to you. thanks again QUOTE (Thang Nguyen @ Nov 10 2008, 05:11 PM) Kirit,I don't really sure what you mean when you say you can acquire data from thermocouple. Did you have a device to get the data from the thermocouple yet? You need to use a device to get data from thermocouple such as compact FieldPoint (not too fast <200 samples/sec)or compact DAQ (> 200 samples/sec). Then depending on the device you use, there is specific VI as well as specifi method to read the value in. From that point you just store data like a floating point value. To write data into the file such as Excel file I usually use the .csv file which can open with Excel. To write data into file you can use the "write to spreadsheet file.vi" or "read from spreadsheet file.vi" to read data out. All of the methods to use these VIs can be found in the example finder. You can start from here to look for the appropriate device: http://www.ni.com/dataacquisition/. Take care. Quote Link to comment
crelf Posted November 12, 2008 Report Share Posted November 12, 2008 QUOTE (jgcode @ Nov 10 2008, 08:04 PM) Yes I was quite surprised when I found out that you can write VI plugins for SignalExpress. Indeed - I really like that NI's exposed that capability. They did the same with Vision Builder AI - if it doesn't quite do what you need, you can call your own code :thumbup: QUOTE (Kirit @ Nov 10 2008, 08:47 PM) I already have a data acqisition system by which i can read the teperature of the thermocouple and i am able to diplay the temperature in the front panel. And i have learnt just now to write them in a file... Upload your code and we'll try to help. Quote Link to comment
Kirit Posted November 12, 2008 Author Report Share Posted November 12, 2008 QUOTE (crelf @ Nov 10 2008, 08:55 PM) Indeed - I really like that NI's exposed that capability. They did the same with Vision Builder AI - if it doesn't quite do what you need, you can call your own code :thumbup: Upload your code and we'll try to help. Hi i have uploaded which i have learnt today. here i get the dat file which i cant use in Excel . And i cant segregate the temperature reading with time. Say i want my output like this : 10 Nov 08 11:00 52 10 Nov 08 12:00 50 10 Nov 08 13:00 51 But which i have done is not that much close. After 24 hours the file will be close and will begin a new file. I am really concering abut the programing related to time and Date. Thanks a lot Quote Link to comment
Dan DeFriese Posted November 12, 2008 Report Share Posted November 12, 2008 I agree with crelf, my first answer in the office is to use VI Logger (its much cheaper than building and releasing custom software to do the same thing and I don't have to write a user manual). QUOTE Hi dan,thanks for your mail and advise. I looked at example . i can write the file but i cann't store in hourly basis. Hi Kirit, We're happy to help you, but you show us your effort and your own work so we can guide you. You can't learn if we do the work for you. Simply posting an example you pulled from "Examples Folder" will turn off veterans, which will label the thread as Homework Hustling (which is not permitted here). Again, please post your own work. ~Dan Quote Link to comment
Kirit Posted November 13, 2008 Author Report Share Posted November 13, 2008 QUOTE (Dan DeFriese @ Nov 10 2008, 10:12 PM) Again, please post your own work.~Dan Hi Dan, Thanks again. I have uploaded my work here. Here i have felt in another problem the temperature which i saw in the display(front panel) is accurate but whenever i go to write it. it write 0.00000 . Is there any wrong conversion there ??? And Again how to close the file after certain time and a new file will begin ?? Please give me some hint. I will do that. with thanks Kirit Quote Link to comment
Kirit Posted November 13, 2008 Author Report Share Posted November 13, 2008 Hi dan, I have solved the first problem . I have attached it. now i can display and write exact temperature. But stuck with the second one. As not getting any hint so far. i want to close the file after certain time and want to creat a new file to store the data. thanks again. kirit Quote Link to comment
Dan DeFriese Posted November 13, 2008 Report Share Posted November 13, 2008 QUOTE (Kirit @ Nov 12 2008, 04:44 PM) Hi dan,I have solved the first problem . I have attached it. now i can display and write exact temperature. But stuck with the second one. As not getting any hint so far. i want to close the file after certain time and want to creat a new file to store the data. thanks again. kirit Nice to see that your doing your own work. Not bad so far, but try to keep left to right dataflow. Next you'll want to learn how to use the Elasped Time VI (on the same pallete as the wait milliseconds function). Then, on to shift registers and then state machines... Also, learn how to create a relative path. Using the Elapsed Time figure out how to pulse a boolean indicator within a while loop. (Hint: you'll need wait milliseconds so you can see the blinking.) Good Luck 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.