LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

clone vi

Solved!
Go to solution

Hello everyone!!!

 

I'm trying to clone the vi  but this vi is working in project  without error.

 

 

But its showing invalid reference in exe.

 

 

vi calling in maincall vi in main.JPG

 

clone vi

clone.JPG

 

error in exe

error.JPG

 

vi which has to be cloned

vi to be cloned.JPG

0 Kudos
Message 1 of 11
(1,793 Views)

This happens because the vi path is different in the exe. You may use a Static Vi Reference (Application Control palette) of READ INI.vi. Wire the reference to a Property Node and use the Vi Path property to get a path valid for both IDE and exe.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 2 of 11
(1,761 Views)

Thanks for your support.

can check out this is correct has you mentioned said???

I need to use this clone sub vi to clone multiple vi other Caseses also. 

 

main vimain vi

clone viclone virunning without in projectrunning without in projecterror in exeerror in exe

0 Kudos
Message 3 of 11
(1,731 Views)

Why do you need that VI to be cloned?  It will be done really fast.  Just call the VI normally.  The only VIs that should really be ran asynchronously are "Actors" (DQMH modules, Queued Message Handlers, other GUI VIs that need dynamically loaded into subpanels).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 11
(1,717 Views)

Thankyou crossrulz

 

Actually, the original vi which I to clone is contains data that cannot be disclosed, I had tried the same patten here.

The original vi has tcp communication with 3rd parity device, where I'm using few function pallets like Que, notifiers etc.

The vi has communicate with more device with different IP and I have to give different unique name for those Que and notifier so I'm trying to clone the vi.

 

Now I found that I'm getting error open reference (vi broken or vi location been moved) again this error only exe not in project file.

 

Hope you understood.

0 Kudos
Message 5 of 11
(1,688 Views)

I think this is what @Pincpanter was suggesting to you.  The code below uses Start Asynchronous Call to start a Modal Dialog VI that displays an Error Message for 5-10 seconds, then stops itself.

Detach Error Message.png

The VI to be "spawned" is "Show Error Message", held in a Static VI Reference.  The red Star on the Reference means I've specified it as "Strictly Typed", as that is required by Start Asyncrhonous.  You can see it wired to the Property Node and the Path property being used to generate the proper "path" for the Open VI Reference.  The "magic" comes that this exact same code works both in the Development environment (when you are testing the code) and in the Executable environment (when your customer is running the code as an Executable).

 

Bob Schor

Message 6 of 11
(1,665 Views)

Please review the attached code which works in project not in exe. (Main vi)

IN exe its showing error 1003 not in project development area. I have cross check the path also.

Please guide me to solve that error.

0 Kudos
Message 7 of 11
(1,641 Views)

@arunachalmarun wrote:

Please review the attached code which works in project not in exe. (Main vi)

IN exe its showing error 1003 not in project development area. I have cross check the path also.

Please guide me to solve that error.


If you do as Bob showed above and send in a static VI ref instead of the name as string it'll work.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 11
(1,627 Views)

Hi Yamaeda.

 

I'm new to the LabVIEW programming. I'm not getting your point could please explain.

0 Kudos
Message 9 of 11
(1,610 Views)
Solution
Accepted by topic author arunachalmarun

@arunachalmarun wrote:

Hi Yamaeda.

 

I'm new to the LabVIEW programming. I'm not getting your point could please explain.


In your Clone.vi you send in the vi name and then try to build a path that you open. If you instead place a Static VI reference and drop the target vi in that, you can do as Bob showed above.

Yamaeda_0-1683716362748.png

Yamaeda_1-1683716455972.png

It'd also be nice if you added an Icon to Clone, TCP and Process so the code is clearer.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 10 of 11
(1,606 Views)