LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

open Vi object reference waveform chart

Solved!
Go to solution

Hi, I'd like change a property of an indicator in a VI from another VI (In particular i want to clear a Waveform Chart) I used Open VI Object Reference but i am not able to access to History Data. How can I do?

 

Clear Chart.png

Download All
0 Kudos
Message 1 of 7
(3,027 Views)

The reason you have no History Data available is that this property requires a strict reference.

Sadly afaik there is only a workaround to get a reference constant to be strict:

1. Change your "Waveform Chart" reference constant to a control

2. Right click the new reference control "Waveform Chart" and select "Include Data Type"

3. Right click the reference control and select "Change to Constant"

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 7
(3,017 Views)

Ok, Thanks!

But now I have this Error:

Error.png

What do I Have  to do?

Download All
0 Kudos
Message 3 of 7
(3,009 Views)

The problem in your code is that the Waveform Chart (strict) reference is a reference to a chart with a 1D double array as value.

The actual chart you have on the VI is a 2D double array. Therefore, you get a data type mismatch.

 

Solving it requires another workaround:

1. Create a waveform chart in the ClearChart.vi.

2. Wire a 2D double array constant to its terminal (this will change its type!)

3. Create a reference to that chart

4. Wire that reference as "VI Object Class" to the Open Reference function

5. Adopt your history constant to be 2D as well

 

Please note that the workaround only works as long as the chart has a 2D double array as data type. If you want a generic solution, you would have to try-and-catch the type cast until no error occurs. This also affects the History Data property node as well of course....

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 7
(3,003 Views)

Sorry, I made what you have told me:

 

Clear Chart.png

 

now i have this error:

 

Error.png

 why? If you have implemented a correct Vi can you give me it please?

Thanks!

 

Download All
0 Kudos
Message 5 of 7
(2,998 Views)
Solution
Accepted by topic author smilegv

Ok, sorry for confusing you. I haven't checked the strict waveform reference with the Open Reference function.

Using the "good old way" works:

 

ResetChartHistory.PNG

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 7
(2,989 Views)

Ok, Thanks a lot!

0 Kudos
Message 7 of 7
(2,984 Views)