From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-07-2018 11:48 AM
Hello everybody!
I am a new user of LabVIEW and I am trying to make a program using LabView 2015 that automates the calibration of thermocouples using the Fluke 914X device and a National Instruments acquisition board. I have already been able to make serial communication between the fluke device, and also to set temperatures, and read the bath and reference temperatures of the device. However, my program should work as follows: the user sets an initial temperature, which the bath should reach. Once the reference temperature of the bath is equal to the setpoint temperature set by the user (0.1 accuracy), the program should start saving the thermocouple data acquired by the National board. Since the program should work automatically, I would like this data to be saved in an excel sheet for 2 minutes, and then, after saving that data, the program should raise the setpoint temperature by 5 ° C until the temperature end is 120 ° C, then the program stops. As a beginner in LabVIEW I am having difficulties in the order of the blocks, and also how to be able to stop saving the data automatically and move to the block that will increase the setpoint temperature. Could you give me any hints on how to implement this? The program I have so far is attached.
02-07-2018 01:54 PM
You will help yourself a lot in developing LabVIEW code if you:
The virtue of the last point, having all Block Diagrams fit on a page, means your code is "visible" at a glance, with details hidden. One thing you should do if you do follow the third suggestion is to create, at the very least, a simple Icon consisting of a box and 2-3 lines of text that describes what your VI does. You do this with the Icon editor, which you activate by right-clicking the Icon while coding your sub-VI and choosing "Edit Icon". One thing you may have to do the first time you open the Editor is to "turn on" the Layers tab -- if you only see tabs called "Templates", "Icon Text", and "Glyphs", click "Layers" on the Menu Bar and choose "Show Layers Page". Now click the Layers Tab, click the VI Icon, and click the X to delete it. Now over on the Tools on the right, choose the Filled Rectangle and make one that fills the entire space (I suggest Black for the border, White for the interior). Now choose the Icon Text tab, type 2 to 4 short text lines ("Open", "Serial", for example), and when you get what you like, click "OK" (under the Icon image). Note that on the Text page, I like to use Small Fonts, Center alignment, and 10 point type, with Center Text Vertically checked and Capitalize Text not checked (these settings will "stick", so you only need to "do it once"). This is what you should get:. When you place this sub-VI on your main Block Diagram, it will take very little space (32 x 32 pixels), and the Icon describes just what it is that takes place inside this sub-VI.
Once you get things slightly smaller and able to comprehend, you should be able to figure out how to save data for a certain period of time. You can either (a) figure out the rate you are saving and divide that into the time you want to save to compute the number of saves you have to make (i.e. the "N" for a For loop) or (b) use a Timing VI (such as Elapsed Time) to compute when to exit a While loop doing the saving.
Bob Schor
02-09-2018 06:58 AM - edited 02-09-2018 07:00 AM
Hello Bob_Schor, thank you very much for your tips They were really very useful.
I think now, I made the program work. But, I am having a problem, if you can help me.
Note that I receive the thermocouple signals and the idea is to save the instantaneous values for a period of time. However, both with the for loop and with the elapsed time block, the data saved is the data of the first value that arrives in the loop and that same value is saved in the entire time period. Do you have any idea how I can save the instantaneous real data, without causing the same signal to be saved again and again?
02-11-2018 04:49 PM
Well, a look at your revised, "smaller" Block Diagram so I can better understand what you mean and what you want to do would certainly help me to help you ...
Bob Schor