02-01-2013 03:08 PM
Hi,
Using the Edit > Create Sub VI function, I highlight some property nodes(charts, buttons from the UI) and the code is turned into a subvi. Labview then automatically converts the inputs/outputs of the subvi to a bunch of refnums. I had originally wanted to change the chart refnum input to a graph, and was not able to do that. I tried the following:
I'm not sure how do change an input and if this is the right method. I tried looking up how to use refnums but couldn't find any good resources - if anyone may be able to provide some background on using them (I found this: http://www.ni.com/white-paper/3929/en but not really quite what I was looking for).
When I run the code, the error message "object reference invalid" is shown. I have wired the input terminal with a waveformgraph from the UI though, and also checked the information with a probe to check that the input isn't 0.
Any help would be appreciated!
02-01-2013 03:20 PM
I'm having one of my dense days, I don't understand the steps you went through. Could you just post the code that you got in the end?
Mike...
02-01-2013 03:36 PM
Hi,
Here is the code. I had converted the waveform graph back into a chart input, but for unknown reason I'm still having the same problem. Sorry for the mess that the snippets are in. The problem I'm having is with the "waveformchart in" input parameter, where it says that the object wiring is invalid even though there are no errors that prevent me from running the program (so I guess it's a run-time error). The waveform chart is wired to the UI so it seems to be a proper reference.
Another way to put this is: when creating a subvi that includes property nodes from the user interface, how do I change the input/output parameters of the subvi? I changed the waveform chart to waveform graph (and back) but after wiring the input parameter, Labview provides me with a run-time error.
Thanks!