LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

wire conflict when connecting a control to a property node (value, write)

Do not know how to solve this problem. The control (VISA resourse name) is connecting the 'VISA Open' (Spectrometer) and the property node is created from the control and changed into Write mode. Then I try to add a control to the node and a 'class conflict' error (broken wire) occurs. See attached image. Thanks in advance. 

0 Kudos
Message 1 of 10
(1,795 Views)

What are you actually trying to achieve with all this?


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 2 of 10
(1,789 Views)

Post your code, not pictures of your code.  I'm guessing the selected class type of the controls don't match and one can be made less specific to make it work.

0 Kudos
Message 3 of 10
(1,786 Views)

Here is the code. Could everyone see the code? Thanks. 

Download All
0 Kudos
Message 4 of 10
(1,770 Views)

I am thinking to use the property node in another page of a Tab Control to choose a usb port for my spectrometer. Thanks for the discussion.  

0 Kudos
Message 5 of 10
(1,762 Views)

@FrankWhite wrote:

I am thinking to use the property node in another page of a Tab Control to choose a usb port for my spectrometer.


So are you trying to assign a new resource to an already existing resource? A tab control is a front panel object, while a property node resides on the diagram. So what's the connection? (Sorry, posting by phone, cannot see your VI).


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 6 of 10
(1,739 Views)

That is a bit weird.  So I created a property node Value on the control then created a control from the value terminal and the result was a broken wire as you mentioned.  The selected class of both the original control, and the one being wired to the property node were of the USB Raw type so I'd expect it to work.   The error does claim a class conflict.

 

Spoiler
You have connected a refnum of one type to a refnum of another type and both types are members of some class hierarchy, but there is neither a simple up cast nor type cast between the two classes.

Changing the control wired to the property node to a class type of Instr removes the wiring class error.

 

Edit: It gets weirder when local variables are attempted.

Ocean Optics 2000 4000.lvlib_Initialize_BD.png

Message 7 of 10
(1,733 Views)

Hi Frank,

 

I am thinking to use the property node in another page of a Tab Control to choose a usb port for my spectrometer.

There's no TAB control in your VI nor is there any property node.

What exactly do you want to achieve?

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 8 of 10
(1,732 Views)

Yes, it is strange. Hope I can solve it and give you a solution. Btw, how can you add 'Spoiler' section? 

 

(If we change the type to Instr then the wire between the control and the spectrometer break. )

0 Kudos
Message 9 of 10
(1,714 Views)

@FrankWhite wrote:

Yes, it is strange. Hope I can solve it and give you a solution. Btw, how can you add 'Spoiler' section? 

 


Instead of insisting on this convoluted thing with property nodes, stick to established coding practices and solve it without property nodes and good code architecture instead. I am sure there is a way!

 

And please attach relevant code. Whatever you have attached has very little to do with the problem you are describing.

 

 

To add a spoiler tag, use the 5th item in the edit bar (it even tells you when hovering over it).

 


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 10 of 10
(1,707 Views)