How to stop an asynchronous call to activex makes a VI?

I use Labview 8.6 to collect data of monkeys hand movement. Because some graphics are necessary, I do use Visual c# express edition to program graphics and appeal that the VI using ActiveX from my c# code. I use three VI, which two I call synchronously (I'm waiting for the call ends). But the third VI must be called asynchronously so that I can continue my work in c#. This VI extracts data from the accelerometer via DAQ and exported in a file of measure LV in a while loop.

I start the asynchronous call by VI.run (true) where true indicates that I don't want to wait for the call. Now when a trial is over (Monkey Gets a visual cue, then works correctly ends) and I have to stop collecting data. I have one of the following two ways to stop the VI.

(1) make an abandonment by using vi.abort (), but this means residue data collected by DAQ not written to the file of measures.

(2) set the button stop in the false via VI VI. SetControlValue(). In this case, the VI does not stop immediately, it takes a LONG (1.5 to 2.5 s) time to stop. I tested that it takes a long time to stop running the VI using Labview without using c#.

Note that as soon as I stop my VI, in the file lvm I want to write c# 'trial closed' to differentiate between successive trials data. I don't want to create new lvm for each test file (there will be some 300 of them), so I add data in the same file. In the case of 2), I don't have a VI.isRunning () to see if it stopped running. I can sleep() in my c# code for a second or two and then add 'the trial ended' file lvm but all of this is in real time that happens and I can't sleep that long.

Now my problem is that the two options are not good for me. Is there a better way that someone can suggest? "And why does do so for the VI to stop if I use 2)? Is there anything I can do about it? Thanks in advance.


Tags: NI Software

Similar Questions

  • How to stop my iPhone calls going to other iPhones/ipadin my house

    WWhen, I get a call or a text, it sounds on the iPhone and iPad to my wife. How can I stop this?

    Continuity allows you to connect your iPhone, iPad, iPod touch and Mac - Apple Support

  • How to stop a program called with exec.vi system

    Hey Gang,

    I need to run a third-party application of in LabVIEW.  It works fine when it is called with the exec.vi system, as long as the user has entered the correct data.  However in some (very difficult to determine) conditions, the application crashes.

    I want to be able to force by program the application to complete and return to LV I assumed that there is a way to do it using the Windows API, but I don't know how to do this, and I would need a way to get the handle of the offending application Windows.

    Short re - implement the app in BT, I'm out of ideas.  I'll appreciate any help.

    Thank you

    Roger

    If you could post a picture of the offending code, it would be great. but two things come to mind, if you expect the exploit code (for example go to a wait for a period, then kill a task) wire: completion to false.

    then is another call to command prompt, look in taskkill /f

    You can kill a process

    It may be useful

  • pop up keep coming and I don't know how to stop it. file called. c/Windows/kesenjangan.exe

    file, that didn't come out in my files, window pop up keep coming, I don't know how to remove it or stop being to retain them. kindly let me know how to deal with this file.

    who is 'C/window/kesenjangan.exe '.

    file, that didn't come out in my files, window pop up keep coming, I don't know how to remove it or stop being to retain them. kindly let me know how to deal with this file.

    who is 'C/window/kesenjangan.exe '.

    It is a virus (web info) with av and super anti-spyware scan.

  • How do I know if a VI is already running before calling Start Asynchronous Call?

    The new node to start the asynchronous call is great for the spawning of several instances of the reentrant vis.  However, I fell a little bit using for screws not reentrant the old practice of using the method "Run a VI" would allow us to check the Execution.State of the VI before calling the method to execute.  This way if the State was running or running at a higher level, we could spend the invoke node and just use a property node to open the front panel.  With the starting node the asynchronous call, it seems that we must use a strictly typed static VI reference, and when we open the reference VI, VI gets booked and his Execution.State = running.  So, how whether it is not only reserved by wire, but actually running before calling Start redundant?

    Moreover, the redundant beginning has an interesting behavior.  Actually, it will cause the targeted VI must be performed again after it stops.  Even if you tap the Abort button on the target VI, it run immediately still and always the same number of times as the starting node the asynchronous call is executed.  There is nothing wrong with that, and I guess the simple answer is to simply go back to the old method of "run a VI.  It's just that ability over these inputs directly to the connector pane is so nice.  Maybe missing me something obvious.  Oh, I am referring to the call and forget mode (0x80).

    Thank you

    Dan

    Maybe missing me something obvious.  Oh, I am referring to the call and forget mode (0x80).

    Yes you have forgotten that he forgets the Run method always seems to be a better choice for this mode

  • you wonder how to stop my iPad to ring when I get a phone call on my iPhone

    you wonder how to stop my iPad to ring when I get a phone call on my iPhone

    On your iPhone, go to settings > phone > call on other devices > allow calls on off other devices.

  • Using asynchronous calls in a while loop. How 'Skip' node and only retrieve data as it is treated

    Maybe I'm not understand asynchronous calls... but I thought I should be able to call one another VI and essentially 'jump' it is the node and only receive data as the called VI treats.  In other words, similar to the Run of VI, I can wire a wait until done? with a fake and the main VI will not wait for the other VI end of race.  The main VI continues to function, and when it passes the called node of the VI, it will receive data if it happens to be there.

    How can I call a VI in a while loop and do not wait so he could spit out the results?  Data flow is my enemy on this one...

    The first VI treats its own figures (using the iteration count) and displays them on the PC.  Other indicators are the data of the called VI.  I want to be able to work around the blue circle node and receive data only that it will be available.

    Any help is appreciated.  Thank you.

    What I said OR the 'Start asynchronous call' is the preferred method for starting background tasks. This call is usually used to run background tasks. For example, you have a process of journal. When your application starts it would use the "asynchronous call Start" to start the process of journal and then move on to the other stuf. The process of the journal would then happily run in the background and the main application is free to do other things. Of course when implementing these types of systems you need a way to coordinate things like exit. This is where the queues and stuff come it.

  • How to handle asynchronous calls using OSB?

    Hello

    How to handle asynchronous calls using OSB?

    Please help me?

    -Vincent

    Hello friend, here is what you need.

    Oracle Service Bus, call asynchronous Web services | Oracle... Java... OpenSource... SOA

  • How to use 'Start synchronous call' to run a Subvi timeout event and keep in hand vi still running?

    Hi all

    I have an application must periodically check the State of the instrument, and I put it in the "Timeout" vi main event. I need also call some subVis to configuration etc. Somehow when I called these Subvi, the Timeout event in my main vi did not work. I then use the ' Start Asynchronous Call "to call the subVis. Turns out it works fine with a few subvis worthless back, but not as expected with subvis 'return the required value.

    I have attached a simple test, my main vi call two dlg subvis: AboutDlg.vi and SettingsDlg.vi. In the case of delay, I just use a counter for the simulation. When you run it, you can see the meter taken into account when the AboutDlg.vi has been called, but stopped when SettingsDlg.vi is called.

    As I remember, someone suggested to use the queue to pass the return value, but I don't know how to implement here.

    Anyone have any suggestions on this subject?

    Thank you very much.

    Try to play with it - I modified your code to search a Q in there.

    You want to change the bunches to data types more useful (perhaps enum and Variant, so you can ungroup variants according to the enum contribution), you can type def clusters to make it easier to maintain and you will need TO handle the situation where the called VI is left open on program close - I couldn't be bothered, as it was not your immediate deliverance)

    Hope this give you some ideas - totalyy not tested, but should work.

    James

  • Debugging asynchronous calls

    When you use asynchronous calls, is there a way to see and/or kill the clones running? Let me explain my program a little structure.

    I develop a tests suite that can read in the test script files and run different (or the same) on several devices connected to a chassis OR modules of the AO. The two main components of my program are the CommandParserQueuer (CPQ) and the CommandExecutor (CE marking). A command queue is created during initialization. The CPQ reads in the script files and translated into commands adds those to the queue of the command. The controls are beams of the States of the enum and all data needed to perform this action. The CE marking is a machine of the State in queue. When queues begin to fill, the CE removes the items and perform the actions (e.g. AO tension adjustment, read data from the device, restart the device, etc.).

    Program to quit smoking, a stop command is sent to the EC, which simply sets the while loop stop true and it allows to get out. This worked well until I implemented the ability to run several tests at once, which meant from multiple instances of THIS Start Asychronous Call (options x 80 and x 40).

    Because of my design, I have to run a while loop inside the asynchronous calls, that goes against the recommended practice of not doing. During initialization, I create a command queue for each connected device. For example, if I have two devices DEVICE1, and 2 the device, two queues are created with these names and two these are called by reference to these queues. CES sitting then slowed until the queues fill up with items.

    The problem I have is that sometimes, but not always, blocks of code inside the CES are throwing errors, and also the CES not arrested in accordance with the instructions. I'm out all together of LabView. I also want to emphasize enforcement of clones. Is this possible?

    Any thoughts?

    During an instance multi-instance has a several traps.  You seem to have sailed with success some of them, but not all.  As Jed394 said, the framework of the actor should help with start and stop, but it looks like that your error is more due to a conflict of shared resource.  This resource conflict could be a hardware or software.  A few things to look for:

    1. Is the code that you share between reentrant CES?  It must all be, but nothing waiting for something (i.e. awaiting a DAQ card data) must be re-entrant, so that the two separate these may have their own instance.  There is a balance here between using a lot of memory and the contention on subVIs.
    2. You can try to use two items from the same material that cannot be used separately.  For example, you can not simultaneous, of two locations of code, read different analog inputs of the DAQ card even.  This can be quite hard to track down, since the hardware devices vary in their capabilities.
    3. Is that what your truly separate data space between your bodies?  Depending on how you configure access to data, the two CBS could try to access the same or incorrect data.

    Good luck.  Let us know if we can help you more.

  • An asynchronous call - why so long?

    LV 2013, Win7

    I have a window that comes and goes, during the operation of the program.

    This window has 72 sub-panels, each containing a retractable VI even copy for a "block".  I insert the VI in the secondary and then to run the VI with a call CALL and FORGET.

    When the user closed the window, the entire block live end, and the window closes.  I don't care if the closing backstage going again after the window disappears.

    But when the user leaves the program, with this window to the top, I need to make sure that the block screws have completed before I stop other things (close files, etc.).

    To this end, I changed the CALL and FORGET a CALL and operation COLLECT and installed a WAIT on ASYNCHRONOUS CALL to each instance at the end of the code window.  It is after the blocks have been ordered to die (via an event).

    I see the debug file (a part is represented) to about 1000 milliseconds to wait for all instances to die.

    The thing is, if I change to "0" to "1000", then what I expected, it is that the actual waiting time would< 100="">

    My thought is that during this timed wait blocks could die anyway, it would take less time to actually wait on them.

    But when I do that, nothing really changes.  Registered time is always above 1000 mSec.

    If I limit the number of blocks to 12, the time is 97 mSec, to 24, is 185, for 36, is 576 and so on - it is proportional to number of blocks.

    So, what is really?  If he waits just things die, why the timed wait does not affect the numbers?

    I initially (when I used CALL and FORGET) kept track of how many were opened and how much were closed and waited for that becomes zero, but it is a cleaner way to do it, at least in theory.

    Am I missing something?

    You can consider another approach to ensure that all instances of high school left, as a queue. Each instance is an element in the queue when it ends, then stops. Your cleanup code removes the elements in a loop For which runs once for each instance, so after each instance is finished he can proceed. This way to care not in the ORDER in which the sub-panels out, you simply confirm that they have completed all. Should be lower overload that call & collect.

  • How to stop updates of Firefox

    So we have this system of helpdesk at work called cure (I make no bones about this, it should be called disease at least in the form my company has put into it) but that's what we have, I can't change that. I generally use Chrome to create changes in the remedy, but I need to use Firefox to create work orders because Chrome doesn't handle well in the menus of the repair.

    Now, Firefox, which is my browser of choice in all other circumstances, work well with the remedy (I'm not convinced that anything done) and when it updates, currently at version 39.xx, he continues to work with the cure... something to do with the different-Hellman encryption. I can solve this problem by reinstalling v38.05 but then it puts day and goes pear shaped. So I uninstall and reinstall and it works again... until it updates.

    The solutions I've tried are (each time preceded by a version 39.x uninstall and reinstallation of v38.05):

    1. in the Firefox Options / Advanced assured that "never search for updates (not recommended: security risk)" has been selected.

    2 custom install Firefox v 38.05 with no maintenance service (the above, Options / Advanced settings seem to be maintained throughout the uninstall/reinstall).

    3 custom install Firefox v 38.05 with no service maintenance and that all executables and dll read-only. Once again all of the above is the same.

    4 custom install Firefox v 38.05 without maintenance service, deleted the files maintenanceservice.exe and maintenanceservice_installer.exe from the Mozilla Firefox folder and renamed updater.exe updater.old. Go to help / about Firefox and deliberately run an update. This "installed" but, the browser is restarted, brought a dialog box saying there is a problem (I don't remember the message). Allowed the browser to download the new full version, which forced a second reboot and an error dialog box that I then closed.

    5 restart Firefox after you create a file user.js in profile folder that contains:
    turn off the updates of the application:
    user_pref ("app.update.enabled", false);

    6. check about: config is disabled for the automatic update:
    App.Update.auto - false
    App.Update.Enabled - false
    App.Update.Silent - false

    That's all... all this absolutely does not prevent updates of Firefox and, as far as I can tell, I did almost everything it is humanly possible to prevent update Firefox outside ditching it completely (which I certainly don't want to do) but there seems to be no way I can stop the update of Firefox.

    I'm sure it's 'fault' of BMC Remedy, but I can't change what makes the company, I'm just a small cog in a big machine, but I can't (or should be) change things on my own system. I can not just when it comes to Firefox which, in addition to being frustrating, no sense... why the Mozilla team would create a product with options to stop the updates that the application simply ignores?

    Keke

    Well, hang on, it sounds as if the real problem is that the server tries to use an obsolete encryption encryption algorithm that is vulnerable to the attack of the impasse that was in the news earlier this year.

    What does that mean?

    Even if you trust the server, a "dead end" attack compromised the security of your individual connection on the server, a lowering of the protection normally provided by SSL to a level that is easily cracked and read by others on the network. This is why Firefox protects you to establish this connection.

    What can you do now?

    The best solution is to update the server. Please ask for the protection of everyone! However, I suspect this is out of your control and could not happen soon. To work around the problem, you can try to disable these old ciphers in your Firefox, which I hope it will force the server to try some more secure encryption algorithms when connecting with you. Here's how:

    (1) in a new tab, type or paste Subject: config in the address bar and press ENTER. Click on the button promising to be careful.

    (2) in the search above the list box, type or paste dhe and make a pause so that the list is filtered

    (3) double-click the preference security.ssl3.dhe_rsa_aes_128_sha to true to false (disable Firefox to use this encryption)

    (4) double click on the security.ssl3.dhe_rsa_aes_256_sha preference from true to false (disable Firefox to use this encryption)

    Try again the server; You may need to reload the page using Ctrl + Shift + r to ignore information in cache.

    Success?

  • How to stop a download to open automatically

    How to stop a downloaded file open automatically, because it is really frustrating when I download music and videos as well as the files play automatically.

    It is a question, I intend to answer that I discovered the answer today and could not find it in the community. Apple support also could not solve this problem.

    Answer:

    In Safari preferences in the general section, there is a small box at the bottom that is checked by default, clear this check box.

    The box is called:

    Open your 'safe' after downloading files

    'reliable' files include movies, photos,

    PDF documents and text, sounds and

    Archives

    In Safari preferences in the general section, there is a small box at the bottom that is checked by default, clear this check box.

    The box is called:

    Open your 'safe' after downloading files

    'reliable' files include movies, photos,

    PDF documents and text, sounds and

    Archives

  • HOW TO STOP THE NEW ADS ON FACEBOOK... THEY ARE FRIGGIN BORING AND REEK HAVOC WHEN YOU PLAY... PLEASE ME TELL HOW TO BLOCK THEM!

    How to stop the new ads on Facebook

    I get very annoyed by ads to where they are on the web so I use an add-on called 'Adblock Plus' which uses its database to block known ads and you can even block yourself!

    With 'Adblock Plus Adblock Plus ' installed, you can block all advertising photo:

    1. right click on the announcement of photo that you want to get rid

    2. in the menu, click the option that says: ' Adblock Plus: block image... "(it is usually at the bottom of the menu)

    3. when the pop up box appears, simply click 'Add filter' and advertising will disappear before your eyes!

    If this was the answer you are looking for, please click 'Resolved' - thank you.

  • How to stop notification of power of the optical drive?

    How to stop the power of optical drive: on / off the startup in msconfig because I have no idea of what the process is called so so I can't stop it?

    Thank you

    Hey Buddy,

    To be honest, I don't know what you mean exactly.
    Can you post a screenshot or tell us what program you mean exactly?
    In addition, the exact model laptop with OS preinstalled number would be interesting.

    In general all start up programs, you can disable in msconfig. You can also see the program directory where it s installed.

Maybe you are looking for