Asynchrono​us 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
Attachments:
Method 1.jpg ‏75 KB
Method 2.jpg ‏68 KB

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

Similar Messages

  • Create a DLL with asynchrono​us calls in LabVIEW for use in another environmen​t.

    Hello All,
    I need to create a DLL in LabVIEW that is going to be used from inside a Delphi environment.
    The thing that confuses me is that I don't know how to create asynchronous functions.
    Let me further explain.
    I want to have an "Init" function.
    This function starts a continuous dataacquisition process. The dataacquisition process continuously samples data at a rate of 1Msamples/sec. (in blocks of 4096 samples each time)
    I want to have an "Abort" function.
    This function stops the continuous dataacquisition process.
    The third function I need is a "MeasureAndAnalyse" function.
    If this function is called, the following block of 4096 samples is processed (FFT, ...) to retrieve the valid data.
    The fourth function can be used to check if the MeasurementAndAnalyse function is ready and return the actual result if this function is ready.
    What I don't know is how I can do all of this asynchronously.
    In my opinion the LabVIEW vi's I make are all synchronous.
    How to do this asynchronously???
    Does anybody know of an example of a similar thing?
    Thanks in advance for all the help!
    Dennis.

    Ok, after somem ore searching I found an example called "Building Asynchronous DLLs in LabVIEW".
    I will give that a try.

  • Asynchrono​us call of a re-entrant VI hangs

    I am trying to use the Start Asynchronous Call Node to open a re-entrant sub-VI in "fire and forget" mode.  To get the hang of it, I put together the attached test application.  Clicking "Add Channel" in the main VI launches the subVI, passing it a different "ID" for each sub-VI call.  The subVI has an "Identify" button which is supposed to open a dialog with its ID, and a stop button which ends the subVI's event loop.
    Trouble is that, although the subVI launches fine, none of the front panel buttons are functional.  Pushing either one causes it latch, but doesn't release or execute its function (sort of like the Event loop is locked up).  The subVI works fine when run independently at the top level.
    This seems to be tied to the the fact that the sub-VI is re-entrant.  Running this with a single non-re-entrant VI works as expected.  Is there something I'm doing wrong?
    Attachments:
    main.png ‏47 KB
    subvi.png ‏25 KB

    OK, after looking at some other threads and the Open VI reference help more closely, it looks like the problem was that I had the 0x40 (enable simultaneous calls on re-entrant VIs) option enabled.  (0xC0 = 0x80 + 0x40).  This creates a reference to the target VI itself, not the clone that actually gets called, so if you pass that reference to FP.Open or to SubPanel.Insert, it will not do the right thing.  I will have to think through this a little more before I fully understand it, but changing the Open Reference to simply 0x80 seems to fix things.

  • Exec.State and Start Asynchrono​us Call

    In my application I like to start a VI asynchronously by pressing a button control. I just want to have one instance of the VI running so I let the caller test if the VI is already running. Unfortunately there seems to be a bug in the Exec.State property if you use it with a VI reference that has been built with a type specifier. It returns always "Running" as state.
    I found a workaround by first openening a "normal" reference to the VI, questioning the Exec.State property, closing the reference and opening the "typed" reference. That works like I think it should.
    My question: Is this difference in behaviour of the "VI" property node and the "VI Interface Type 1" property node by design or is this a bug in LV 2012 (I have not tested it with another version) ?
    Matthias

    I just wanted to point out about the very reason of the situation:
    These are the options you can read by the Execution State property. As already marked, "Running" indicates that the VI is (at least) reserved for execcution. It does not necessarily mean that the VI is actually executing!
    That being said, opening a typified reference to the VI already reserves the VI for running, hence your property node returns this value.
    Your workaround seems to be well-thought out and should work in any case. Y already gave another option of handling this situation.
    I doubt that there is another, better solution other to these two.
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Start Asynchrono​us Call Reentrant

    I've experimented with the new LV 2011 "Start Asynchronous Call" method on reentrant VIs.  I am able to instantiate multiple clones of the VI, but the input data is not propagated to the clone VI.  I have tried a few different 'options' flags on "Open VI Reference."
    Has anyone else observed this behavior?

    Hello Jonathan,
    This is Andrew Brown, an Applications Engineer from National Instruments. I will be happy to work with you to get the Start Asynchronous Call to recognize your inputs. 
    After examining your provided code and creating an example myself, I found one issue with your code. The only flag you should need to use for Asynchronous Call and Collect is x100. That is based off the Open VI Reference and Asynchronously Calling a VI and Collecting the Results documents located within LabVIEW 2011 Help. If you were going to pass in multiple flags, you would want to use the OR operator ( v ) rather than the AND operator ( ^ ). 
    I attached the example code provided by LabVIEW 2011 within the "Asynch Call and Collect.zip" file.
    Based off that code, I wrote my own example that asynchronously calls a subVI multiple times with different inputs. The code for my example is attached as "Multiple Asynch Calls - Diff Inputs.zip" 
    Please let me know if you are still having issues after working with these examples. Thanks, and have a great day!
    Regards,
    Andrew Brown 
    Applications Engineer
    National Instruments
    Attachments:
    Asynch Call and Collect.zip ‏14 KB
    Multiple Asynch Calls - Diff Inputs.zip ‏15 KB
    Asynchronous Call and Collect.JPG ‏58 KB

  • Start Asynchrono​us Call available on Real-Time or not?

    If I work on code on an RT target the new Start Asyncronous Call nodes do not show up on the Application Control Palette.
    However, LabVIEW does not complain if I trick it to run such a node on RT by adding it while editing it for a Windows target...So, is the asyncronous call supported on RT, or not? Well, it does not seem to behave the way you would expect it to..as far as I've ben able to establish so far, but should it? Will it be fully supported (show up on the palette etc.) later?
    MTO

    I can't comment on whether Asynchronous Call is officially supported on RT in LV 2012 (because I don't know the answer).  However, I've used it extensively on RT, and I haven't experienced any problems.  Keep in mind that dynamically launching background VIs is going to introduce jitter into your RT system, but that is to be expected.
    -Chris M

  • Asynchrono​us Call - collect values without waiting for sub VI to finish executing

    Hi All, I'm relatively new to LabVIEW and for the first time I'm attempting to make use of Asynchronous calls in a program.
    What I would like to accomplish, generally, is this: At the beginning of the main vi, begin running a sub-vi in the background. This sub-vi is collecting streaming data from an instrument with a refresh rate of 50Hz. At various points in the main vi I would like to call the instantaneous value of that streaming data from the sub vi, passing it back into the main vi, while allowing the sub-vi (the streaming data collection) to continue running. The reason for this, is that I need to collect the data from this instrument many times wihtin a loop, and the connection initialization to the streamin data instrument is both slow and faulty, and takes too long if I have to initialize the connection, collect the data, close the connection, each time I wish to collect the data. I would prefer to initialize the connection once at the beginning, have a stream of continuous data being collected in the background, and then at certain points within the main vi loop, query that streaming data for its instantaneous value, but allow the streaming data sub vi to continue running.
    I recognize that a method to allow the streaming data collection sub vi to run in the background is to use the Asynchronous call method - however, to collect the data I need to use an asynchronous wait, which will only collect the data if the streaming data sub vi finishes executing. How can I collect the data at a particular instant while still allowing the subvi to keep running (thereby minimizing the number of times the connection to the instrument needs to initialized)?
    Any suggestions or alternative methods would be great!
    Thanks
    Jason

    This is typically solved in a different way than what you envision. Have your parallel deamon post its current values to a buffer. This could be a global variable (gasp!!) or an intelligent global variable (a VI with loop that executes always once and has an unitialized shift register that can either be initized or read based on a control input). You can add extra code to the read and write selection such as scaling etc to turn the intelligent global into an action engine that does extra things on its different methods.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions
    Attachments:
    Intelligent Global.vi ‏19 KB

  • Asynchrono​us call can not stop

    Hello! 
    When i start slave Vi by asynchronous call, slave Vi do not stop!  Slave Vi  is part of alarm system. I can not do any thing whith this problem (((
    Thanks!
    Solved!
    Go to Solution.
    Attachments:
    Asynchronous Call and Forget voice.vi ‏13 KB
    Speak Text777.vi ‏16 KB

    Ok, may be i do some thing wrong.
    when boolean x > y is true alarm must go ON always , when boolean x>y falshe , alarm must shut down.
    And clock must go on ))))
    What i do wrong?
    Thanks!!!
    Attachments:
    Speak Text777.vi ‏15 KB
    Asynchronous Call and Forget voice.vi ‏16 KB

  • Asynchronous call using ATMI library call

    I was wondering is there anything have to change in the CONFIG file if the service
    has to be be called synscronously and asynchronoously by two different clients.
    BTW in any case i have to change anything differently if the service is called
    asynchronously by a client .
    thanks in advance

    it depends how you are calling the services.
    If you are calling the services asynchronously with TPNOREPLY
    flag set and you are putting a lot of requests in the pipeline
    then you must have enough of server instances to process the requests as fast
    as the requests are coming otherwise the
    server queues will start filling up.
    in any case with tpacalls the better thing is to have some
    flow control at the client itself.50 requests in the pipeline
    is the limit tuxedo has.if you will put more requests than 50
    a handle of -1 will be returned by tuxedo.
    if your set up is according to tpacalls then it will be fine
    for synchronous calls also but vice versa is not true.
    thanks
    Roopesh
    "tatireddy" <[email protected]> wrote:
    >
    I was wondering is there anything have to change in the CONFIG file if
    the service
    has to be be called synscronously and asynchronoously by two different
    clients.
    BTW in any case i have to change anything differently if the service
    is called
    asynchronously by a client .
    thanks in advance

  • Error while calling a method on Bean (EJB 3.0)

    I am getting an error while calling a method on EJB. I am using EJB3.0 and my bean is getting properly deployed(i am sure b'cos i can see the successfullly deployed message). Can any body help me
    Error is -->
    Error while destroying resource :An I/O error has occured while flushing the output - Exception: java.io.IOException: An established connection was aborted by the software in your host machine
    Stack Trace:
    java.io.IOException: An established connection was aborted by the software in your host machine
    at sun.nio.ch.SocketDispatcher.write0(Native Method)
    at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:33)
    at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:104)
    at sun.nio.ch.IOUtil.write(IOUtil.java:75)
    at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:302)
    at com.sun.enterprise.server.ss.provider.ASOutputStream.write(ASOutputStream.java:138)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
    at org.postgresql.PG_Stream.flush(PG_Stream.java:352)
    at org.postgresql.core.QueryExecutor.sendQuery(QueryExecutor.java:159)
    at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:70)
    at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
    at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
    at org.postgresql.jdbc1.AbstractJdbc1Connection.rollback(AbstractJdbc1Connection.java:1031)
    at org.postgresql.jdbc2.optional.PooledConnectionImpl$ConnectionHandler.invoke(PooledConnectionImpl.java:223)
    at $Proxy34.close(Unknown Source)
    at com.sun.gjc.spi.ManagedConnection.destroy(ManagedConnection.java:274)
    at com.sun.enterprise.resource.LocalTxConnectorAllocator.destroyResource(LocalTxConnectorAllocator.java:103)
    at com.sun.enterprise.resource.AbstractResourcePool.destroyResource(AbstractResourcePool.java:603)
    at com.sun.enterprise.resource.AbstractResourcePool.resourceErrorOccurred(AbstractResourcePool.java:713)
    at com.sun.enterprise.resource.PoolManagerImpl.putbackResourceToPool(PoolManagerImpl.java:424)
    at com.sun.enterprise.resource.PoolManagerImpl.resourceClosed(PoolManagerImpl.java:393)
    at com.sun.enterprise.resource.LocalTxConnectionEventListener.connectionClosed(LocalTxConnectionEventListener.java:69)
    at com.sun.gjc.spi.ManagedConnection.connectionClosed(ManagedConnection.java:618)
    at com.sun.gjc.spi.ConnectionHolder.close(ConnectionHolder.java:163)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.closeDatasourceConnection(DatabaseAccessor.java:379)
    at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.closeConnection(DatasourceAccessor.java:367)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.closeConnection(DatabaseAccessor.java:402)
    at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.afterJTSTransaction(DatasourceAccessor.java:100)
    at oracle.toplink.essentials.threetier.ClientSession.afterTransaction(ClientSession.java:104)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.afterTransaction(UnitOfWorkImpl.java:1816)
    at oracle.toplink.essentials.transaction.AbstractSynchronizationListener.afterCompletion(AbstractSynchronizationListener.java:161)
    at oracle.toplink.essentials.transaction.JTASynchronizationListener.afterCompletion(JTASynchronizationListener.java:87)
    at com.sun.ejb.containers.ContainerSynchronization.afterCompletion(ContainerSynchronization.java:174)
    at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:467)
    at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
    at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
    at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:197)
    at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:110)
    at $Proxy84.addDepartment(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
    at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)
    End of Stack Trace
    |#]
    RAR5035:Unexpected exception while destroying resource. To get exception stack, please change log level to FINE.
    EJB5018: An exception was thrown during an ejb invocation on [DepartmentSessionBean]
    javax.ejb.EJBException: Unable to complete container-managed transaction.; nested exception is: javax.transaction.SystemException
    javax.transaction.SystemException
    at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:452)
    at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
    at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
    at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:197)
    at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:110)
    at $Proxy84.addDepartment(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    Means theres an error in XML/ABAP conversion probably due a syntax error...
    Regards
    Juan

  • Caller ID Not working

    I think i am going nuts, cos my new BTVerve 450 is a great phone, but it will not display Caller ID. I am with Virgin for my phone line etc, with a wireless router for my laptop. Can anyone help? I really dont want to return the phones, i am really pleased with the unit, but i really need caller ID, especially as i am paying extra for it! Any suggestions would be welcome, Bernie

    Try just plugging the phone in without anything else connected (BB Router, Filters, Sky box) and see if that works, if it does plug each item back in on at a time, trying an incoming call each time.
    You may find problems with either a duff filter or even the router can sometimes mask the display
    (If I have helped you in any way to say "Thank You" please click on the star next to the message. Thank You)
    If I have solved your Issue please click the "Mark as accepted solution" button.

  • Iphone 5S call voice Low quality.

    Iphone 5S  low quality call voice.  When I make a phone call , people in the other side said my voice is very small and disconnected. The voice is good when I am using the earphone at the same calls

    Hello tigertiger123abd,
    The following article can help sort your iPhone's built-in microphone.
    iPhone: Microphone issues
    http://support.apple.com/kb/TS5183
    Cheers,
    Allen

  • IPhone Voice Memos Interrupted By Incoming Calls

    I notice that every time I use my Voice Memos software on the 3G(s), if an call comes in, the Voice Memo stops recording and I won't know it till I look at the phone later. Is there ANY way to stop that for that not to happen and you can have perhaps the calls go directly into voice mail so that the Voice Memo feature doesn't get interrupted? It's useless to me otherwise.
    Thanks for anyone's input!

    The voice recorder application - just like every other iPhone application, native or 3rd party - will shut down when you receive a phone call. The iPhone operates under the assumption that the device is first and foremost a telephone.
    As far as work arounds go, you can always put the phone in airplane mode when you need to use the voice recorder app uninterrupted. This will send all incoming calls directly to voicemail.
    Message was edited by: Ansuz82

  • Why my iphone 5s voice mail answer call first and my iphone second.

    why my iphone 5s voice mail answer call first and my iphone second.

    Hello celazopdef,
    After reviewing your post, I have located an article that can help in this situation. It contains a number of troubleshooting steps and helpful advice concerning cellular issues:
    iPhone: Troubleshooting issues making or receiving calls
    http://support.apple.com/kb/TS3406
    Thank you for contributing to Apple Support Communities.
    Cheers,
    BobbyD

  • IPhone 5s Voice Call Issues

    I've had an iPhone 5s (upgraded to 8.1.3) since mid-November and have been experiencing difficulties on voice calls ever since (I switched carriers as well). When calling specific contacts (family, friends etc.), the calls sound as though as I am on speakerphone, and there is a great deal of static and distortion present as well. The beginning of the call sounds as though the network is about to drop it before recovering it in a much lower quality. To the best of my knowledge, I have tried absolutely everything at this point, including: swapping the handset (three times), sim card (three times), resetting the device and even changing my number (was informed that it could have something to do with the "porting" of a number profile from one carrier to another). None of these moves have worked and I am still trying to decipher why I am encountering this problem (I have been in constant contact with my carrier who appears to have exhausted all ideas).
    Any suggestions or thoughts are greatly appreciated.

    I was having the same problem and also loosing battery life - it suddenly happened.  I went online and saw where someone said to get rid of all the unused apps still sitting there, deleted all the old posts and yea!   suddenly the problem has been fixed.   Hadn't deleted the unused apps in quite sometime, so obviously draining everything.

Maybe you are looking for

  • How to use Auto layout in book module

    Hi, I got a MBP mid-2010 15" running OS X Lion. I´m trying to get the auto layout to work with presets. I might be doing something wrong here though: 1. "Edit Auto layout preset" 2. Choose for instance "Wedding" layout 3. Save preset If I then click

  • I can't open a few of my iMovie projects

    I just started on using clips which i downloaded and cut out some parts and put it in my imovie projects, I did that to a few of my projects, about 3, and I went to Safari, I came back to iMovie I can't open those 3 projects, can someone help? It's r

  • Bash script read input and feh

    I was trying to make a quick script to organize some pictures using feh to display the picture in question and then using bash to read a character from the keyboard and move to a folder based on that letter. Problem is it opens every image in the fol

  • Recover a database using cold backup

    Hi, I am working in oracle 9i and solaris 5.8. I am taking coldbackup and its stored in another solaris server. I need to create a new database in the backup server using the cold backup files. Please explain me in detail how to create a database usi

  • Clock set before 2-24-01 - WHY????

    When the mini was turned on this morning (out of town for a day, so turned it off before leaving) the clock was 2-26-94 with the wrong hour setting and a window that read Clock Set Before 2-24-01 etc. I turned on the automatically set clock date (was