01-27-2015 02:51 AM - edited 01-27-2015 02:58 AM
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?
Solved! Go to Solution.
01-27-2015 03:08 AM
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
01-27-2015 03:26 AM
Ok, Thanks!
But now I have this Error:
What do I Have to do?
01-27-2015 03:43 AM
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
01-27-2015 03:53 AM - edited 01-27-2015 03:54 AM
Sorry, I made what you have told me:
now i have this error:
why? If you have implemented a correct Vi can you give me it please?
Thanks!
01-27-2015 04:18 AM
Ok, sorry for confusing you. I haven't checked the strict waveform reference with the Open Reference function.
Using the "good old way" works:
Norbert
01-27-2015 04:33 AM
Ok, Thanks a lot!