08-01-2013 11:59 AM
Following this topic: http://forums.ni.com/t5/LabVIEW/show-graph-that-is-created-in-a-subvi/td-p/672249
I get an error when connecting my vi server ref to the subvi. they are diff data types.
Solved! Go to Solution.
08-01-2013 12:09 PM - edited 08-01-2013 12:11 PM
In the subVI, right click the reference control (WFD Refnum 2) and deselect 'Include Data type'.
By default when you create a control from a references it creates a Strict (data type is included) type reference control.
Otherwise you can also try to create the reference control (for the subVI) from the main VI's graph (Time Signal):
1. First create reference of Time Signal graph.
2. Then right click the reference and create Control.
3. Now use this control in the subVI.
08-01-2013 12:09 PM
oh, and the subvi might be useful
08-01-2013 12:11 PM
include data type was already unchecked.
08-01-2013 12:14 PM
Then you can try other option.
@moderator1983 wrote:
Otherwise you can also try to create the reference control (for the subVI) from the main VI's graph (Time Signal):
1. First create reference of Time Signal graph.
2. Then right click the reference and create Control.
3. Now use this control in the subVI.
If this also doesn't help, share the code (Main and Sub VIs)...!!
08-01-2013 12:21 PM
bam! option 2 did the trick. thank you very much. i guess the name of the control ref was wrong...
08-01-2013 12:29 PM
@papacode wrote:
i guess the name of the control ref was wrong...
no..!! I dont think so..!! I strongly believe that the reference control (of subVI) must be of strict type, therefore it was expecting strictly the reference of same data type as an input (from main VI). now when we place a graph/chart on front panel, it has some default data type (DBL, single plot etc) which get changed if you wire a dynamic data type or waveform or if you choose to plot multiple signals...!! So one should create the reference in the last, after doing all modification to the main graph (on the main VI)...!!
08-01-2013 12:33 PM
Thanks.
I don't know why the types would be different, but that makes sense.