LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatic changing binding path in reentrant VI

Hi.

This is a simple project in which we found a problem.

We want to: launch several copies of the incoming VI driver, serving the same devices of the same type.

In each copy, the binding of the controls to the required shared variable changes programmatically.

Noticed: it is impossible to bind the same type of controls in different copies to different variables.

The value of the SV variable binding path for the control from the last copy of the VI is copied to all previous controls.

Before you begin, you must deploy the library with test variables.

Sincerely, Vitaly.

0 Kudos
Message 1 of 3
(2,519 Views)

I've never bound a control to a shared variable, but you could replace the control-binding to just using a shared variable like this: https://www.ni.com/docs/en-US/bundle/labview/page/reading-and-writing-shared-variables-programmatica...

 

You could have the control update the shared variable value, so it should work the same but give you programmatic access.

 

Also, as a side note, your Driver vi is set to non-reentrant, which means you can't launch multiple copies at all.

0 Kudos
Message 2 of 3
(2,482 Views)

@BertMcMahan wrote:

I've never bound a control to a shared variable, but you could replace the control-binding to just using a shared variable like this: https://www.ni.com/docs/en-US/bundle/labview/page/reading-and-writing-shared-variables-programmatica...

 

You could have the control update the shared variable value, so it should work the same but give you programmatic access.

 

Also, as a side note, your Driver vi is set to non-reentrant, which means you can't launch multiple copies at all.


THAT is the trickiest part about re-entrant VIs.  You have to make sure that ALL the stuff in there is re-entrant, also.  (I know, "re-entrant" is somewhat archaic, but "reentrant" just doesn't look like a word to me.)

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 3
(2,442 Views)