LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

clearing waveform history

This may or may not have been discussed elsewhere, but the problem with clearing waveform history with a hidden control hooked up to the property node of a waveform is that it also clears the chart when you turn off the vi. That can be problematic depending on how you're using the vi.

I went to the following tech support pages and read the discussion and then came up with my own idea that seems to work. Feel free to use it if you want to.

http://forums.ni.com/ni/board/message?board.id=170&message.id=16562&requireLogin=False

http://digital.ni.com/public.nsf/allkb/740628D210D84F1E862562BA0000B345

to quote: "If waveform data is being written the chart, you will not be able to create a constant. Instead:
Right-click on the property and select Create » Control.
Go to the Front Panel and right-click on the newly created control. Select Advanced » Hide Control."

I then checked out the VI in the above webpage which gave me some ideas.

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3F0BD56A4E034080020E74861&p_node=DZ52038&p_source=External


Instead of using a bundle cluster going into an initialize array, use a build waveform into the same initialize array and set all the inputs to the build waveform to constants with default zero values. It was fairly self explanatory, and maybe LabVIEW has only recently added build waveform to the functions available, but it acts similarly to the other charts and graphs, as in the graph is not cleared when you turn the vi off. A minor consideration, but annoying when using the vi in a production or lab setting.

My concern with this problem started when a previously working solution stopped working, so if anyone wants to explain why my convert to dynamic data with a zero initialized array constant as its input sometimes works and then stops working, that would be greatly appreciated. Again, I was able to use the dynamic data so initialized as an input into the waveform chart's history node without any problem, but then it stopped working. Probably something silly, but the whole of issue of charts and graphs is a fairly important one in my work, so I'm always interested in the various subtleties involved. Thanks.
0 Kudos
Message 1 of 2
(2,339 Views)
Hi elkag,

I'm not sure what you mean when by "when you turn off the vi". Please let me know if my answer is not addressing your question, thanks.

Let me explain the reason for the following statement:

    "If waveform data is being written the chart, you will not be able to create a constant. Instead: Right-click on the property and select Create » Control. Go to the Front Panel and right-click on the newly created control. Select Advanced » Hide Control."

The reason that it's recommended to create a control when dealing with Waveform Data type, is that there currently doesn't exist a Waveform Data contant. Of course you can programmatically create your Waveform using the 'Build Waveform' function and three constants, but this is not as easy as simply creating a control and hiding it.

Regarding your issue with the Dynamic Data type, please submit a simple VI that shows the issue you are struggling with. That would help us being able to help you.

Thanks!
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 2 of 2
(2,304 Views)