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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mixed Signal Waveform Graph

Solved!
Go to solution

there it goesSmiley Tongue

 

Ravens, thanks for the kick.

0 Kudos
Message 11 of 29
(1,903 Views)

Hello Revans and Parny,

I tried to modify the program, however I am getting a new error message that I have connected two different data types. This error is only for one thermocouple and not for the other.

1) In the waveform graph, I need LabVIEW to record the temperature every second, not every milisecond. Also the X variable should be time in seconds, not miliseconds.

 

2) On the waveform graph, three curves are displayed instead of two. In fact, there should be only two curves, each for one thermocouple.


3) In this example, we are bundling three inputs (two temperatures and time) together and providing array to a waveform grpah function. How LabVIEW will understand which two graphs are to be plotted? Means, how LabVIEW will understand that the graphs are to be plotted between reading1, time and reading2, time?

I think I am going wrong somewhere. Please help me to understand this.

Thank you,
Vills

0 Kudos
Message 12 of 29
(1,881 Views)

Your thermometer 2 output is set up as normal tunnel, so it only sends a scalar value out of the loop.  Your other two tunnels are autoindexing so they send out 1-D arrays which is what the other functions are looking for.

 

Right click on the tunnel and select Enable Indexing.

 

I would recommend you learn more about LabVIEW from here. http://www.ni.com/academic/lv_training/how_learn_lv.htm

 

For #1,  put a 1000 constant going into the wait timer rather than 20, that will make it 1000 milliseconds per iteration rather than 20 milliseconds.

For #2, #3,  don't send the time array to the graph.  Waveform graphs don't actually use the time value in the X-axis.  They assume that all data is equally spaced in time beginning at time 0.

Message Edited by Ravens Fan on 03-04-2009 07:31 PM
0 Kudos
Message 13 of 29
(1,864 Views)

Hello Ravens,

Thank you very much for your help. I have only one more question. I couldn't understand the output of the program. I have pasted a sample output below. I couldn't understand why the values of Y[0], Y[1], Y[2] are like this. I expect them to be the temperature readings. Please help me with this.

waveform    [0]    [1]    [2]
t0    00:00.0    00:00.0    00:00.0
delta t    1    1    1
           
time    Y[0]    Y[1]    Y[2]
00:00.0    9.80E+01    9.90E+01    0.00E+00
00:01.0    9.80E+01    9.90E+01    5.57E-01
00:02.0    9.80E+01    9.90E+01    1.56E+00
00:03.0    9.80E+01    4.08E+00    2.56E+00
00:04.0    9.80E+01    2.24E+01    3.56E+00
00:05.0    9.80E+01    5.71E+01    4.56E+00
00:06.0    9.80E+01    8.37E+01    5.56E+00
00:07.0    9.80E+01    9.69E+01    6.56E+00
00:08.0    9.80E+01    9.69E+01    7.56E+00
00:09.0    9.80E+01    9.69E+01    8.56E+00
00:10.0    2.04E+00    9.69E+01    9.56E+00
00:11.0    4.29E+01    9.69E+01    1.06E+01
00:12.0    8.47E+01    9.69E+01    1.16E+01
00:13.0    8.47E+01    9.69E+01    1.26E+01
00:14.0    8.47E+01    9.69E+01    1.36E+01
00:15.0    9.59E+01    9.69E+01    1.46E+01
00:16.0    9.59E+01    9.69E+01    1.56E+01
00:17.0    9.59E+01    9.69E+01    1.66E+01
waveform    [0]    [1]    [2]
t0    00:00.0    00:00.0    00:00.0
delta t    1    1    1
           
time    Y[0]    Y[1]    Y[2]
00:00.0    9.59E+01    9.69E+01    0.00E+00
00:01.0    9.59E+01    9.69E+01    1.53E-01
00:02.0    9.59E+01    9.69E+01    1.15E+00
00:03.0    9.59E+01    8.37E+01    2.15E+00
00:04.0    9.59E+01    7.14E+01    3.15E+00
00:05.0    9.59E+01    6.02E+01    4.15E+00
00:06.0    9.59E+01    4.49E+01    5.15E+00
00:07.0    9.59E+01    1.84E+01    6.15E+00
00:08.0    9.59E+01    2.04E+00    7.15E+00
00:09.0    9.59E+01    2.04E+00    8.15E+00
00:10.0    9.59E+01    2.04E+00    9.15E+00
00:11.0    8.16E+01    2.04E+00    1.02E+01
00:12.0    7.76E+01    2.04E+00    1.12E+01
00:13.0    7.24E+01    2.04E+00    1.22E+01
00:14.0    6.22E+01    2.04E+00    1.32E+01
00:15.0    5.71E+01    2.04E+00    1.42E+01
00:16.0    5.00E+01    2.04E+00    1.52E+01
00:17.0    4.29E+01    2.04E+00    1.62E+01
00:18.0    3.67E+01    2.04E+00    1.72E+01
00:19.0    2.96E+01    2.04E+00    1.82E+01
00:20.0    1.12E+01    2.04E+00    1.92E+01
00:21.0    5.10E+00    2.04E+00    2.02E+01
00:22.0    0.00E+00    2.04E+00    2.12E+01
00:23.0    0.00E+00    2.04E+00    2.22E+01

 

Thank you,

Vilas

0 Kudos
Message 14 of 29
(1,850 Views)

The actual values of temperature for both of these thermpcouples were in the range of 100 to 20 (I manually changed them in the front pannel, when I was running the program.). When the program execution started, both the thermocouples read around 100 and then I gradually reduced both readings to around 20. (Both the thermocouples are of "Control" type.)

 

Thank you,

Vilas

0 Kudos
Message 15 of 29
(1,849 Views)

-- I couldn't understand why the values of Y[0], Y[1], Y[2] are like this. I expect them to be the temperature readings.

Infact, they are real values itself, use simple math.

9.80E+01 = 9.80 * 10 = 98.0

4.08E+00 = 4.08 * 1   = 4.08

2.22E+01 = 2.22 * 10 = 22.2

 

Check in properties menu, how you can format these numbers. Use the context and main menu help for quick backup references.

It is worth browsing those links posted by Ravens before.

Message 16 of 29
(1,839 Views)

However, there are only two thermocouples. Then why three columns of data are displayed?

 

Thank you,

Vilas

0 Kudos
Message 17 of 29
(1,826 Views)
Solution
Accepted by topic author Vills
Because you are sending the time to the file as well.  The first column is a time value based on the waveform itself.  It has implicit timing.  A t0 for start time, and a dt for the time between points.  So the writing of the waveform array to a text file calculates what the time is for each and every point.  Your third column is the actual time since the beginning of the programming which will more or less look like the time column with some variations due to when the data point was actually taken.
Message 18 of 29
(1,822 Views)

Hello Ravens, The output spreadsheet file opens in proper excel format when I am using the combination LabVIEW 8.6 with Microsoft Office 2007. However, when I wrote the same program in LabVIEW 8.5 and run it, I am not able to open the output spreadsheet file in Microsoft Excel 2007. When I tried to open file, the following error message was displayed. Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded.  Please find the attached error log file

 

BODY{font:x-small 'Verdana';margin-right:1.5em} .c{cursor:hand} .b{color:red;font-family:'Courier New';font-weight:bold;text-decoration:none} .e{margin-left:1em;text-indent:-1em;margin-right:1em} .k{margin-left:1em;text-indent:-1em;margin-right:1em} .t{color:#990000} .xt{color:#990099} .ns{color:red} .dt{color:green} .m{color:blue} .tx{font-weight:bold} .db{text-indent:0px;margin-left:1em;margin-top:0px;margin-bottom:0px;padding-left:.3em;border-left:1px solid #CCCCCC;font:small Courier} .di{font:small Courier} .d{color:blue} .pi{color:blue} .cb{text-indent:0px;margin-left:1em;margin-top:0px;margin-bottom:0px;padding-left:.3em;font:small Courier;color:#888888} .ci{font:small Courier;color:#888888} PRE{margin:0px;display:inline}

  <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
  <logFileName>error002360_01.xml</logFileName>
  <summary>Errors were detected in file 'C:\Documents and Settings\vvjangal\Desktop\Project\LabVIEW\LabVIEW Output.xlsx'</summary>
- <additionalInfo>
  <info>Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded.</info>
  </additionalInfo>
  </recoveryLog>
 

 

Download All
0 Kudos
Message 19 of 29
(1,784 Views)

That is an Excel problem.  I don't know how to help you with that.

 

First, I would recommend not using Excel 2007.  But you're probably stuck with it.

 

Second, I would recommend not using the .xlsx format.  Save your files as the classic .xls formats. 

 

Third, as I said before, since you aren't creating an Excel file but a text file, don't save the text file with an .xls extension, but .txt.

 

My guess is that your Excel 2007 isn't handling a text file saved as a .xls properly.  There should be no reason why there is any difference between a LV 8.5 and a LV 8.6 version of the saved text file.

0 Kudos
Message 20 of 29
(1,781 Views)