LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying a custom graph

Joe,
I was wondering if you recieved any of my previous comments about my problems. I will periodically check back.

Matt
0 Kudos
Message 11 of 20
(2,105 Views)
Matt-

Thanks for getting back with me. I hope your vacation was relaxing. Things have been a bit hectic in the office this past week, but I did look further into your questions and have come up with the following:

First, I understand you wish to change the order in which the data is plotted on the waveform graph. The only way to do this is to re-route the order of the data signals into the build array function that pipes into the waveform graph indicator on your block diagram. The first (top) data signal into the �Build Array� function is programmatically placed into the first column of the array. By default, this first column of data is plotted as the top signal in the plot legend of the waveform on your front panel.

This brings me into a solution for your second problem. In your screen shot, I noticed that your top (white) line is expected to be the max power plot. I could not see your blue data point plot on the output waveform, but I think that this plot is actually your max. power plot (according to the max power signal being appended to the bottom of the array in your block diagram). One thing you may want to try is swapping the wires that enter your final �Merge Signals� function on the block diagram. Doing so should place the max. power plot as the top signal in the plot legend, and you can track it on the diagram accordingly. Make sure that the max power data point representation is different than the other signals, because two circle data points will appear as a single data point on your graph (hiding important data).

Finally, I have one piece of advice that may solve your problem with the �freezes.� Try adding a �Wait (ms)� function into your While loop. This will cause your program to allow system resources for other processes such as mouse movements or window movements that, with your current program arrangement, will not occur upon demand. To add the �Wait (ms)� function, [right-click] your block diagram and select [All Functions]>>[Time & Dialog]>>[Wait (ms)].

I hope this helps you sort everything out. Please let me know if you need any further assistance.

Good Luck!

Joe Des Rosier
National Instruments
0 Kudos
Message 12 of 20
(2,105 Views)
Joe,
Your re-wiring suggestion worked. The graph now functions as I had hoped it would. Also, up to this point I havent had any problems with freezing. I have my fingers crossed that the wait function also worked. Thanks for all your help. Due to your knowledge of my program, is it ok to add a comment in this thread in the future if I have a problem?

thanks again,
Matt
0 Kudos
Message 13 of 20
(2,105 Views)
Matt-

By all means! As a matter of fact, the "find instantaneous maximum" code that I wrote for you may be added to our list of internal example programs for others to reference in the future.

Best Regards,

-Joe Des Rosier-
National Instruments
0 Kudos
Message 14 of 20
(2,105 Views)
Joe,
Since we last conversed I have made a few alterations to my application. I now included the elapsed time VI to record the total time that has taken place over that recording period. Subsequently, I wanted to create a graph that has this time interval on the x-axis and another reading of mine (an energy reading) on the y-axis. So basically I want to have a graph that displays the relationship between the elapsed time and energy reading. Any suggestions?

Thanks,
Matt
0 Kudos
Message 15 of 20
(2,105 Views)
Matt,

See the example I wrote below. You will want to remove the delay that I inserted, because it will slow your operation. I only used the delay to space the x-values (elapsed time) on the graph.

You'll want to use the Build XY Graph Express VI. To access this function, [Right-Click] on your Front Panel and select [Inds]>>[XY Graph]. This graphing tool allows you to feed two separate arrays into the plot. The X array in your case will be the array of elapsed time values, and the Y array will be the array of corresponding energy readings.

Hope this helps!

-Joe Des Rosier-
National Instruments
0 Kudos
Message 16 of 20
(2,105 Views)
Joe,
Thats exactly what I was looking for. One final minor problem.....Why cant I use the convert to dynamic data type VI? I attached the example.
Matt
0 Kudos
Message 17 of 20
(2,105 Views)
Matt,

Right-Click on the Convert to Dynamic Data Type icon and choose [Properties], then select "single scalar." This should fix your problem.

Good Luck!

-Joe Des Rosier-
National Instruments
0 Kudos
Message 18 of 20
(2,105 Views)
Joe,

This did fix my problem. Thanks! Unfortunately, this also uncovered another problem. When I run this VI, the actual signal does not appear on the power graph. The values are making it to the graph but maybe the plot isnt working correctly?

Matt
0 Kudos
Message 19 of 20
(2,105 Views)
Matt-

Since this issue is now a signal coding problem with LabVIEW, I recommend that you submit a new post to the discussion forum under a different title.

This way, future users will be able to search for problem answers for LabVIEW signal graphing proramming, and your entry (with answer) will be available.

Furthermore, I am no longer one of the designated discussion forum personnel. Phone support is where I can be found. The current discussion forum team will be able to quickly assist you.

Best of luck. It was a pleasure working with you!

-Joe Des Rosier-
National Instruments
0 Kudos
Message 20 of 20
(2,105 Views)