LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What am I doing wrong with asynchronous call and forget?


@crossrulz wrote:

@playerm1 wrote:

Maybe try opening the VI reference by path instead of by name to see if it does anything different.


If using 2024Q1, you can wire the VI reference straight into the Open VI Reference instead of the name or path.  I am weirdly excited about this feature.


Just curious how did you get it running with 0x80? If you using Wait On Async Call, then 0x100 is required:

100.png

Otherwise error 1577 raised:

Screenshot 2024-03-28 15.27.28.png

?

0 Kudos
Message 11 of 34
(416 Views)

Re: What am I doing wrong with asynchronous call and forget?

 

While we're waiting for OP's code...

 

I never actually used Call And Forget nor Call And Collect.

 

Every now and then I try, because it seems great. But I always run into edit time problems. Crashes, locked VIs and\or locked classes.

 

Also keep in mind that Open VI Reference needs the root loop to be free when opening a strict VI.

 

Run this and activate a (vi) menu:

wiebeCARYA_0-1711637146499.png

 

This is pretty important. If you activate a menu (any kind, VI or context), your state machine will hang on Open VI Reference.

 

So you might want to open VI references at initialization. Easier said then done, as you'd need to know in advance how many references you need.

 

HOWEVER, and this is GREAT news, LV24 doesn't wait for the root loop:

 

This does wait for a free root loop:

wiebeCARYA_1-1711637257881.png

This doesn't:

wiebeCARYA_2-1711637292405.png

 

 

 

Message 12 of 34
(406 Views)

@Andrey_Dmitriev wrote:

Just curious how did you get it running with 0x80? If you using Wait On Async Call, then 0x100 is required:

 

?


There's actually a very simple explanation: I didn't wire up the error coming from the Wait On Asynchronous.

 

So here's an updated snippet.


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 13 of 34
(404 Views)

wiebe@CARYA wrote:.

Also keep in mind that Open VI Reference needs the root loop to be free when opening a strict VI.

There is an INI token you can change and have the option of running at any loop. See https://lavag.org/topic/23800-dynamic-calling/?do=findComment&comment=173305

Message 14 of 34
(395 Views)

@mcduff wrote:

wiebe@CARYA wrote:.

Also keep in mind that Open VI Reference needs the root loop to be free when opening a strict VI.

There is an INI token you can change and have the option of running at any loop. See https://lavag.org/topic/23800-dynamic-calling/?do=findComment&comment=173305


Any idea which LV versions support this?

0 Kudos
Message 15 of 34
(390 Views)

@mcduff wrote:

wiebe@CARYA wrote:.

Also keep in mind that Open VI Reference needs the root loop to be free when opening a strict VI.

There is an INI token you can change and have the option of running at any loop. See https://lavag.org/topic/23800-dynamic-calling/?do=findComment&comment=173305


Interesting. Does the key change the open to the brown open or does it affect all open VI references? I'll figure it out, some day.

 

I wander why it's no problem in 24Q1 without the strict VI. It's exactly the same functionality as before, and we where told it's unavoidable.

0 Kudos
Message 16 of 34
(384 Views)

I am using 2021 and it works. Since the original post goes back to 2014, I would assume at least version 2014 or 2015, but probably further back.

0 Kudos
Message 17 of 34
(380 Views)

wiebe@CARYA wrote:

 

I never actually used Call And Forget nor Call And Collect.

 


Its a great feature, which is extremely useful in PlugIns-based architecture, helps to avoid crazy structures like this:

Screenshot 2024-03-28 16.12.05.png

This is how I realized "call & Forget" with reenterant helper in LabVIEW 8 in the past.

0 Kudos
Message 18 of 34
(379 Views)

@Andrey_Dmitriev wrote:

wiebe@CARYA wrote:

 

I never actually used Call And Forget nor Call And Collect.

 


Its a great feature, which is extremely useful in PlugIns-based architecture, helps to avoid crazy structures like this:


I know. I just can't get over the crashing and locking.

0 Kudos
Message 19 of 34
(376 Views)

Mine stays yellow, right click and then you see the option.

 

mcduff_0-1711638986642.png

 

Message 20 of 34
(375 Views)