LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XControl Data wiring problem - Data type is Waveform Graph (Strict)

Hi,

 

I created an Xcontrol for a waveform graph. The datatype (under Data 1.ctl) is a WaveformGraph reference type.

 

When I wire a Waveform graph reference to the Xcontrol (as an indicator), there is a wire conflict.

 

I checked the strict definition and the reference types are theoretically congruent but I cannot seem to wire it together. Any solutions?

 

Please see the attached code.

 

Thanks!

Download All
0 Kudos
Message 1 of 9
(2,908 Views)

It looks like the XControl data is a waveform reference (strict). I can't open the XControl though, because I don't have a 7z compiler, but the problem is probably that the refnum will only take in a reference to an exact waveform graph because it's strict.

 

You can create a non-strict reference and use that for your data by:

  1. Open your data control FP
  2. Press Ctrl-Space
  3. Type "Control Refnum"
  4. Press Enter and place that on front panel
  5. Right click it and brows to the correct data type:

WaveformGraph.png

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 9
(2,895 Views)

Hi,

 

Thanks for the reply. The data types are exactly the same: In this Tester.vi, I created the xcontrol and wired a constant to the XControl, then converted it to a control. The type is a WaveformGraph. If I check the graph control reference and create an indicator or control from it, it creates the same type (see image). I've reattached the files in .zip format. Thanks! So theoretically they are the same type.

 

 

 

Tester - GraphDisplay XControl.png

Download All
0 Kudos
Message 3 of 9
(2,858 Views)

Hi,

 

I tried what you mentioned and this control will wire correctly to the waveform reference, but not to the XControl. It seems there is no possible input to the XControl?

 

Thanks

0 Kudos
Message 4 of 9
(2,854 Views)

Here, your attached code has some missing VIs so I just made my own and it can work. I created a new XControl and placed the non-strict reference like I said above and then placed the XControl on the front panel. I then placed a Waveform Graph on the front panel and created a reference. It wired to the XControl just fine.

 

See attached code.

 

I think your XControl data is still set as strict somehow. Othwerise this should work. Make sure when you browse for the specific control type from that right click menu, that you hit Waveform Graph, not Chart. That would also cause the same problem.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 5 of 9
(2,848 Views)

Hi,

 

I am using Labview 2011 and the files seems to be a later version... Thank you very much for your help!

 

Thanks,

0 Kudos
Message 6 of 9
(2,839 Views)

Oh ok, give this one a try.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 7 of 9
(2,835 Views)

Hi!

 

Thanks, it works! Following your example I changed the refnum to nonstrict type as you said, and converted the 2D double array to variant as its value input.

 

 

0 Kudos
Message 8 of 9
(2,829 Views)

Glad it works! Yeah, if you use a non-strict reference you have to use variants because it has no way to know what the data type is unless it's strict.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 9 of 9
(2,824 Views)