LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically created VI runtime issues

Hello All,

 

I have run into some trouble with a program I have been working on.

When the program starts it copies a VI and saves the it into a location by a specified name.

Once the VI has been copied I then dynamically add controls to the VI (I have attached an image of the block diagram of the VI that does this)

 

When I run my program in editor mode it all runs fine, the VI is copied and the controls added.

However, when I build and install the program the VI is copied but the controls don't get added. 😣

I get the following error produced by an Invoke node:

 

Warning 1027 occurred at an unidentified location

Possible reason(s):

LabVIEW: For the requested operation, the reference cannot be reserved as requested,

is in an improper reservation mode, or the execution state must be set to running or reserved.

 

I have set the copied VI (on the diagram 'vi path') to Run but this did not work either.

 

I am unsure if what I am trying to achieve is impossible once in it's built and run?

 

If anyone can offer any assistance I'd appreciate it!!

 

Thanks for looking,

 

Iain  

 

 

 

0 Kudos
Message 1 of 8
(3,101 Views)

You have a “blue” property node which may mean it’s not available in the run time engine. Don’t have LabVIEW here to check it out.

 

mcduff

0 Kudos
Message 2 of 8
(3,094 Views)

Hello,

 

mcduff is right.

'Create from Referene' method is not available in Run-Time Engine. 

http://zone.ni.com/reference/en-XX/help/371361R-01/lvscript/vi_create_from_reference/

 

UliB

Message 3 of 8
(3,088 Views)

Hello,

 

That's a right pain!
is there anyway to achieve the same thing without using this method?

my project kind of falls apart if not......

 

Thanks,

Iain 

0 Kudos
Message 4 of 8
(3,083 Views)

You cannot create controls in runtime in LabVIEW. You can do it in NXG. The trick is to have all controls you need already created but hidden, not visible or moved, and then show the controls you want instead.

Certified LabVIEW Architect
Message 5 of 8
(3,023 Views)

@thols wrote:

You cannot create controls in runtime in LabVIEW. You can do it in NXG. The trick is to have all controls you need already created but hidden, not visible or moved, and then show the controls you want instead.


The trick you described would work in "old" non-NXG LabVIEW.

 

I haven't used NXG, but is it true controls can be created at runtime, without using the trick you described?

 

Thanks

mcduff

0 Kudos
Message 6 of 8
(3,002 Views)

@mcduff wrote:

@thols wrote:

You cannot create controls in runtime in LabVIEW. You can do it in NXG. The trick is to have all controls you need already created but hidden, not visible or moved, and then show the controls you want instead.


The trick you described would work in "old" non-NXG LabVIEW.

 

I haven't used NXG, but is it true controls can be created at runtime, without using the trick you described?


Yes, NXG can dynamically create controls\indicators.

 

However, NXG 4 doesn't provide any (?, or at least not value change) dynamic control events. So, you get the references of the new controls, but you can't use them in an event based program (yet).

Message 7 of 8
(2,956 Views)

@thols wrote:

You cannot create controls in runtime in LabVIEW. You can do it in NXG. The trick is to have all controls you need already created but hidden, not visible or moved, and then show the controls you want instead.


Those controls can be sub panels. So you can use tons of subpanels on your FP, and make something to load controls in them. Sadly, .ctls can't be put into a subpanel, so you need to put the desired controls in VIs. If you make them reentrant, you can create flexible front panels. With a fixed limit, but the limit can be easily up to 2000. This will be very efficient.

 

The 'controls' can even be dynamically loaded, so you can have a plug-in (ppl) architecture providing additional dynamic controls.

Message 8 of 8
(2,953 Views)