LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

asynchronous call

Hello all,

                         Suddenly i encountered one strange problem in asynchronous call to rentrant VI, I have a reentrant VI which will read the data from TCP & write to the database,Now i have two method to implement this.

 

#1. Using property & invoke node(Image is attached).

 

#2 . Using asynchronous call(Image is attached).

 

In both the method opening of database is same but problem is, in method 1 everything is working fine but in method 2 path of database is going wrong. I opted for 2nd methos because LAbVIEW suggests this. 

 

Can anybody tell me where is going wrong

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
Download All
0 Kudos
Message 1 of 10
(3,117 Views)

What is the issue? That the path to the DB.mdb is different?

 

I understand, that you are using the same subVI for both approaches. Correct?

 

What is wrong with the path to DB.mdb in version 2?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 10
(3,092 Views)

It's not the classic problem of "My path works in LV but not in compiled .exe"?

When using Db's i like to use .UDL files for connection info, i tend to get less problems with them and it's easy to change database connections.

If you're using a Strict VI-ref, why not connect it to a property node and get the path that way? 😉

 

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
Message 3 of 10
(3,080 Views)

Hi 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 4 of 10
(3,056 Views)

Hi Yamaeda,

                                   Actually this my normal & effiecient way to access database in .exe also. for mdb file i always like to avoid the udl file as this is extra (Redundant). I am using relative path for accessing database. 

 

      Can you please explain how can i implement this. a snapshot will be great. Only database path is going wrong(i hope you know this)

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 5 of 10
(3,054 Views)

Who says that the path is invalid? The Open Database function from the Database Connectivity Toolkit?

If so, what IS the path (use probe/path indicator/popup dialog)?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 10
(3,016 Views)

Hi Ranjeet,

 

Asynchronous calls can't be made on reentrant VIs. It just does not make sense because you don't know which reentrant instance of the VI is created/run, and when it is.

 

I guess this is the very reason of why it does not work. Also, asynchronous calls must have a 0x80 or 0x100 option (when opening the reference) to be properly run.

 

Best regards,

Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.

Message 7 of 10
(3,006 Views)

Eric,

 

you are correct with your observation regarding reentrancy. What i wonder is, that the OP seems to make it run with option 0x8 and NOT getting an error. So i am really confused since this should not be possible....

So i presume that the screenshots are showing old/invalid code.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 8 of 10
(2,997 Views)

hi 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 9 of 10
(2,963 Views)

HI Eric.M,

 

You said ,

Asynchronous calls can't be made on reentrant VIs. It just does not make sense because you don't know which reentrant instance of the VI is created/run, and when it is.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------                 

please tell me why this application path directory is showing invalid path if i am calling my VI asynchronously.

 

And one more thing i think that both the method is for parallel execution of same subvi.

 

But in help file its mentioned that asychronously calling a vi is faster than. 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 10 of 10
(2,962 Views)