Showing results for 
Search instead for 
Did you mean: 

Chart Refnum problem

Go to solution

I could be going about this all wrong. I want to be able to report data to chart(s) in my main VI from while loops running in sub VIs.


Heres what i have done :


1. create subvi with chart inside while loop

2. create main Vi

3. copy chart from sub to main

4. create reference for chart in main VI

5. setup to clear chart history when main vi runs with said refrence

6. right click refrence wire> create indicator

7. run main VI so refnum gets to indicator.

8. right click indicator > data ops> make current val def

9. delete wire going to indictaor

10. right click indicator create control

11. probe wire on ref to chart hist prop node and wire between ref control and indicator run vi, they are the same

12. right click control > data ops> make current val def

13. copy control to sub vi

14. wire up value property node

15. probe wire from subvi ref just pasted to val property node

16. run sub vi, refnum matches that of refrence in main, chart in main vi updates as i expect and wanted. perfect.

17. righ click refrence in subvi > data ops> make current val def

18. save everything

19. run main vi, chart clears and updates as sub vi in main runs, works like it should/ or how i was hoping it would

20. close VIs and reopen Main, run

21. refnum error on prop node in sub Vi, probe ref wires in main and subvi and everything has refnum 0x0000000


I have attached a quick example of what i have done in my real program. in the real version i am using producer consumer to control main, state machine in consumer loop runs the sub VI's i am trying to do this with.


What am i doing wrong? Is there a better way to do this?


0 Kudos
Message 1 of 3
Accepted by topic author TheWolfmansBrother

and i fixed this immediatley, wired panel in sub vi ref control to panel indicator, then wired first refrence in main to subvi. 


IDK how i missed this sorry to waste time.

0 Kudos
Message 2 of 3

Hi Brother,


your subVI never gets the reference of the chart in the mainVI.

And you wonder about "invalid reference" errors?

Best regards,

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 3 of 3