LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Type does not coerce" when they'the same type...?

Solved!
Go to solution

Hello,

 

I have an NI 9213 (thermocouple) module attached to my CompactRIO. I created a VI in my PC target and tried to bind a numeric indicator to an I/O Alias of one of the thermocouple channels. However, my "Run" button became a broken arrow and LabVIEW says, "FrontPanelDataController: Type does not coerce." and "The control's type does not coerce with the variable that it is bound to."

 

I'm pretty sure both the source and sink are Double types! I created a shared variable node for the same channel, and could wire it to the indicator without a coercion dot.

 

Other weirdness observed: In the indicator's Data Binding properties page, if I select "Shared Variable Engine (NI-PSP)" and click "Browse...", I cannot browse for any variables in the project. It shows the .lvproj file, but none of the modules or libraries. If I manually type in a variable's path, I get the error message; if I type in an invalid path, the indicator simply becomes unbound.

 

What could the issue be? How do I solve this?

 

Details

Controller: NI cRIO-9204

Chassis: NI cRIO-9116

Software: NI-RIO 12.0 - August 2012

LabVIEW version: 2012

 

 

Thanks!

Certified LabVIEW Developer
0 Kudos
Message 1 of 8
(3,510 Views)

Hi JKSH,

 

I found this article which deals with mismatched data. http://zone.ni.com/reference/en-XX/help/371361G-01/lverror/edunitconflict/ , please give that a try.  Could you please post a screenshot of the code with the error you're describing?  

 

Thanks,

Bobby Breyer
Applications Engineer
National Instruments
0 Kudos
Message 2 of 8
(3,462 Views)

Hi Bobby,

 

Thanks for searching for me, but my project has no units at all. I can't see how the problem is related to your link.

 

The project and VI code are very simplistic:

binding_lvproj.png

binding_vi.png

 

I want to bind an indicator to a thermocouple I/O variable/alias. This page says I can drag the variable from the Project Explorer to my block diagram, but LabVIEW won't let me (the mouse cursor shows a "forbidden" icon). I've previously bound controls/indicators to Project Items before, but now none will show up: (The screenshot below is supposed to show my chassis, modules and variables below the .lvproj)

 

binding_novars.png

 

So, I manually type in the address:

binding_manual.png

 

...and then get this error:

binding_error.png

 

I've attached my whole project. How can I fix it?

 

Thanks again!

Certified LabVIEW Developer
0 Kudos
Message 3 of 8
(3,426 Views)

Hey JKSH,

 

Thanks for the detailed reply!

 

The data binding option only gives the Shared Variable Engine (PSP) as an option for binding data from the cRIO, the IO variable doesn't conform to that requirement.  If you right click on the drag and drop items, and set them to programmatic access, you'll see what I mean.  I would suggest aliasing a Network Shared Variable to the IO variable that you wanted, and then bind your indicator to that Network Shared Variable.

 

Please let me know if this is an adequate solution for your application.

 

Best Regards,

 

Bobby Breyer
Applications Engineer
National Instruments
0 Kudos
Message 4 of 8
(3,398 Views)

Hi Bobby,

 

My screenshots show that I'm already trying to bind to an I/O Alias: NI-cRIO9024-0151C43A\IAliases.lvlib\Variable1 (which should show up in the "Select Source Item" window, but doesn't). Any other ideas?

 

I remember being able to do this for my previous project; I'm not sure why this is happening now. If it makes any difference, my previous project had the hardware manually added -- this one used the "Discover an existing target(s) or device(s)" feature

Certified LabVIEW Developer
0 Kudos
Message 5 of 8
(3,385 Views)
Solution
Accepted by JKSH

Hi JKSH,

 

This sounds like expected behavior to me.  The IO Variable you were using doesn't look like it uses PSP to pass data.  This is needed to use that bind to data option in your project.

 

 

Here's what you selected to the IO Variable.

NSVIOAlias.PNG

 

Below is the address of the variables, notice there's no reference to psp.

 

NSVIOAliasBlockDiagram.PNG

 

Below is how I would suggest performing this action.  Make a network published shared variable, enable aliasing to the IO Variable of your choosing (in this case TC0).

 

NSVDBLAlias.PNG

 

Below is the programmatic access to the network shared variable I just created.  Notice how it ends in PSP.

 

NSVDBLAliasBlockDiagram.PNG

 

Finally, we have our variable to bind.  The only option we have to use would be PSP.

 

 

Binding.png

 

So I suppose what I'm trying to say is that, as far as I can tell, you can't bind an indicator to a reference which doesn't communicate over psp.  Does this answer the question?  Am I on the right track or have I missed the core of the issue?

 

You did mention performing this in a previous project, however.  Would you mind describing the setup?

Bobby Breyer
Applications Engineer
National Instruments
0 Kudos
Message 6 of 8
(3,353 Views)

Hi Bobby,

 

Thank you very much for your detailed walkthrough. You hit the nail on the head: My previous project indeed used Network-Published Shared Variables with aliasing enabled -- I remembered wrongly and thought they were I/O Aliases instead. Following your steps allowed my indicator to bind to the indicator.

 

Thank you for clearing that up for me!

Certified LabVIEW Developer
0 Kudos
Message 7 of 8
(3,333 Views)

Hi JKSH,

 

Thanks for the follow up, I'm glad you're up and running now!

 

Regards,

Bobby Breyer
Applications Engineer
National Instruments
0 Kudos
Message 8 of 8
(3,303 Views)