Running Two Excel Macros simultaneously

Hi,
Can any one suggest me a way to run two excel macros from labview at the same time.
Regards,
SODLB

Call them from syncronized parell loops...
Why would you need to do that? Seems like a good way to cause an error...
Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7

Similar Messages

  • Run two VI-s simultaneously

    Hi,
    I want to run two VI-s simultaneously. I have a VI (Lets say VI-1) that has 4 different parts (look at the image.). What I want is the following:
    1. Run VI-1 (Has parts :A1,A2,B1,B2 and all parts will be active.)
    2. While VI-1 is running, Run a different VI (VI-2) that needs to access the DAQ card and stage controls.
    3. While VI-2 is running, VI-1 also keep on running but the DAQ and Stage parts are deactivated (Part A1 and A2 stays active but B1 and B2 deactivated).
    4. VI-2 stops after it finishes its job (in ~1 min).
    5. VI-1 keep on running and now as VI-2 stops, the DAQ and Stage parts are active again ( All A1,A2,B1,B2 active).
    I was using a global variable to set the DAQ and stage part unavailable while the other program is running and then set the DAQ available again.
    But that does not seem to be a good idea. It crashes frequently. Can anyone suggest a nice way to do this?
    I did not attach my actual VI-s because it is big and it will require lot of other drivers.
    Attachments:
    VI-1.PNG ‏17 KB
    VI-2.PNG ‏12 KB

    Hi Babu726
    I modify your example, but keep in mind that it might behave like some sort of state machine but that is not the best way in which you can program a state machine on LabVIEW have a look to this link here they explain how to implement a state machine.
    In this example I have modify the code in order to help you with the notifyiers and show you how could you do run to different application and communicate two while loop. Also I have implemented a way to stop both while loops when you press the stop button or there is any error on any of the while loop.
    Is not the best or efficient way or program but it might help to get on track.
    Regards
    Esteban R.
    Attachments:
    State_Machine.vi ‏28 KB
    Control 1.ctl ‏5 KB

  • How to run two sub vi simultaneously??

    i need to run two sub vi simultaneously in one main vi, becasue it is a must the two sub vi run exactly at the same time, but now i find that if i put they in one diagram ,in fact they are not exactly run at the same time. if you see in high light mode Just like the attached simple example code.  any one can help me to handle this to run the two subvi exactly at  the same time ? how to do it ? thanks so much.
    Attachments:
    how to run subvi simultaneously.vi ‏11 KB

    You are correct, they will not run at exactly the same time.  What is it you are actually trying to do?  What platform are you developing on? What version of LabVIEW? What processor does your target system have? This information is vital in order for us to assist you.  In a nutshell, unless you are running a real-time OS, then the OS you are running is not deterministic.  When you say "at the same time", what are you actually referring to? As a note, when executing parrallel operations in LabVIEW, the execution order may or may not be the same with the highlight bubble on as it is when it is running without highlight execution.  It is highly unlikely that you will be able to just run two sub-vis at the exact same nS.  If you are using DAQ boards, you accomplish this through triggering.  Please give a detailed description of what you are doing, and what you see the road blocks being.
    Thanks
    Paul <--Always Learning!!!
    sense and simplicity.
    Browse my sample VIs?

  • Running two wireless networks simultaneously

    I am running two independent 802.11n 5GHz networks simutaneously. Each has a unique SSID. The first network is using channels 36 & 40 and the second network is using channels 44 & 48. When the first network is transmitting data and the second network attemps to transmit, the second network must wait until the first is finished and then start its transmission. If the first network then needs to transmit, it must also wait until the second network is finished. They keep flip-flopping back and forth. Is this normal? I know they have to wait until the "channel" is clear before they can transmit, but I'm using unique channels and unique SSIDs. Anybody have any idea what's happening and how to get around it?

    I agree. The Draft N Standard does provide for a "speed drop and wait" period if another N network is running in the same area. I would "guess" that if there is any possible way you can do so - and of course only you know your circumstances, etc., so it may not be an option for some very good reason- consider combining your two units into one network with two accesspoints available on it. This will eliminate the "stop and wait" stuff, give you better coverage than the two separate networks, and be far less sensitive to various slow-downs, etc. If you reason for separating them is because you're isolating the non-N equipment on one network, if you're lucky enough that it's maybe just one or two printers and/or a computer or two - see if you can hardwire them either back to the AEBS N Units or to a powered hub that's then connected to the Base Stations. Getting the 801.11 B&G units off the air and onto hard wired connections will speed them up greatly, and eliminate any problems with these units slowing down your blazingly fast N-network access. I know it sure as **** did so for me. I had two printers (one w/ Ethernet and 1 with USB Only) and I migrated both of them to hard wired connection at the AEBS-N/g. The one non-N computer was literally beside the base station/cable modem anyway - so plugging it into ethernet was no problem at all. The result is that the remaining five or six computers with an "N-spec" card in them jumped in speed to where they can easily outrun anything my Time Warner Cable modem can ever hope to deliver. My whole network suddenly feels like it's hard wired vs airport. Amazing benefit for getting two printers and one aging computer onto ethernet and off the airports.
    Good luck! But I am afraid that as long as your networks are seeing another "N" network in the area they're going to do this slow down and wait routine to avoid collision of data and retrys resulting from that.
    All the best,
    MI

  • Running an excel macro with parameters

    Hi Experts,
    Does anyone know how to run a macro in excel that has parameters? I can run one without parameters just fine, but I can't find any documentation on passing parameters.
    Thanks in advance!

    Hi Jeneesh,
    This lets you run a macro in excel:
    application client_ole2.obj_type;
    workbooks client_ole2.obj_type;
    workbook client_ole2.obj_type;
    worksheets client_ole2.obj_type;
    worksheet client_ole2.obj_type;
    -- open your excel spreadsheet
    application := client_ole2.create_obj('Excel.Application');
    client_ole2.set_property(application,'visible','true');
    workbooks := client_ole2.get_obj_property(application,'Workbooks');
    args := client_ole2.create_arglist;
    client_ole2.add_arg(args, <file name>);
    workbook := client_ole2.get_obj_property(workbooks,'Open',args);
    client_ole2.destroy_arglist(args);
    -- run the macro with no parameters
    args := client_ole2.create_arglist;
    client_ole2.add_arg(args,<macro name>);
    client_ole2.invoke(application,'run',args);
    client_ole2.destroy_arglist(args);
    I've tried adding the parameters using client_ole2.add_arg, and it doesn't like that. Does anyone have any ideas??

  • How to run two Automator actions simultaneously?

    I want to perform two actions at once in an automator applcation, specifically Speak Text and Run AppleScript. I can only figure out how to run one after another. Is there a way to have text spoken as a script is run?

    This is what it looks like:

  • Run two X servers simultaneously with remote access.

    I have a htpc running a xbmc frontend. I would like to have it run a second X environment that I can access via vnc (or VNC like protocol) only. Does anyone have any recommendations or a better solution?
    I would like to have whatever application I am running remotely to continue running if I lose my connection. Would this be possible with screen and ssh X11 forwarding?
    Last edited by wasutton3 (2012-11-02 18:11:59)

    I have the same environment here, an htpc with XBMC. Have a look at xpra (xpra-winswitch-svn in the AUR). It allows you to forward single X windows that integrate more or less in your remote environment. I wrote few scripts to start different sets of applications remotely via ssh. It is often faster than forwarding an entire desktop and you can even have one X $DISPLAY per set of applications. It is by far the most elegant solution I have used.
    If you really need an entire desktop, I'd recommend NX instead of VNC.

  • How to run two vi's simultaneously?

    I am relatively new to labview, so I am not expert enough to figure this
    out,... yet. I am running a test setup using several pieces of test
    equipment. Therefore, the screen is pretty busy as it is. At certain
    points in the test, I want to click on a button that calls up a spectrum
    analyzer, which takes a snapshot of the data, then close. The problem is
    that when I "click" the call spectrum analyzer button, the other test
    equipment stops taking data. I then pretty much have to restart the whole
    shebang. Any help would be appreciated.
    thanks in advance,
    eric

    I've done something similar in the past and used the following
    available vi's Get Instrument State.vi with Preload Instrument.vi, Run
    Instrument.vi, Open Panel.vi and finally Close Panel.vi
    Its been awhile so I don't remeber exactly how I set them up.
    In article <8g0rpe$5do$[email protected]>,
    [email protected] (llertnac cire) wrote:
    >
    > I am relatively new to labview, so I am not expert enough to figure
    this
    > out,... yet. I am running a test setup using several pieces of test
    > equipment. Therefore, the screen is pretty busy as it is. At certain
    > points in the test, I want to click on a button that calls up a
    spectrum
    > analyzer, which takes a snapshot of the data, then close. The
    problem is
    > that when I "click" the call spectrum analyzer button, the o
    ther test
    > equipment stops taking data. I then pretty much have to restart the
    whole
    > shebang. Any help would be appreciated.
    >
    > thanks in advance,
    > eric
    >
    >
    Sent via Deja.com http://www.deja.com/
    Before you buy.

  • How to run Excel Macros using JDBC-ODBC

    Hi,
    I want to run the excel macros in the excel file, after I connected to excel file, using JDBC-ODBC bridge.
    How macros treated here?
    Help needed please..........
    - Ramesh

    How to run Excel Macros using JDBC-ODBCYou don't.
    As my fuzzy understanding goes.....
    Macros (excel, word, etc) run via a "OLE" extension of the script host system.
    So the only way to run them is via the OLE interface. That has nothing to do with ODBC. You can write your own JNI to do that, or you might get lucky and find that someone else has written a java library to do it for you.

  • Two Dynadocks on Mac - two VGA displays simultaneously?

    I own two Dynadocks: PA3542EY1PRP and PA3541EY1PRP.
    They are connected to iMac 21 "Snow Leopard".
    All USB ports work but I can not run two VGA displays simultaneously.
    If one works, the other does not work.
    Drivers Display Links are updated.
    Surely there is a conflict.
    Any help is appreciated.
    Thanks a lot.

    Thanks for your answer. I also wrote to Display Link forum. Here is their reply (It's not the answer I was hoping for...):
    +Hi+
    +I think these were the first dynadocks Toshiba released. When manufacturing them, they managed to program them all with the same serial number - all zeros. This means multiple devices cannot be distinguished on the USB bus, so our software can only communicate with one dock at a time.+
    +Unfortunately this is a limitation and means only one of this first generation dynadock can be used at a time. Toshiba fixed this in their later dynadocks that are sold now.+
    +And no - there is no way for a user to reprogram the serial number. It has to be done in the factory.+
    +Wim+

  • Essbase Excel Macro's and Mxl client

    Hello Folks,
    We are working on 11.1.2.1 having Essbase, Planning, HFM and financial Reports & ODI. We have built the environment newly. I have a scenario where we need to run the ODI batches and run the excel macros to load some of the data. Our batches run from ODI. We have distributed environment for Hyperion servers, totally 3 servers.
    Components in distributed environment:
    1. Shared services, Planning, HFM client, BI Reporting tools, EAS client, Maxl,ODI(server1)
    2. Essbase Server,Maxl(server2)
    3. HFM(Server3)
    MS office & ODI installed on Server1.
    We need to run the batches using ODI & Excel Macro's to load the data.
    I have setup  the maxl client in Server1 for the ODI batch to use for loading data into essbase but my problem is i want to use excel macro's also same time. Is there any possibility or workaround to use both at a time on same servers?
    Thanks,
    Tamas

    What is the error you are getting while running it from ODI? I'm assuming that you are getting some error when you said only one is working.
    When you install EXCEL Add-in it is changing your path and abrorpath variables and that could be the reason why maxl is not working. If ODI is using a bat file why don't you set temporary variable and try.
    in you bat file add these lines (before the maxl call, i would ad them to the start)
    SET ARBORPATH=C:\Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseClient
    SET PATH=%ARBORPATH%\bin;%PATH%
    Regards
    Celvin
    http://www.orahyplabs.com

  • How to translate an excel macro to ABAP code

    Hi Guys,
    My requirement is need to put the subtotaling option w.r.t divison when i download the file to an excel sheet via OLE.
    Iam able to get the records in the excel sheet but unable to write the macro in ABAP code.
    the macro which i recorded in Excel is
    Range("A1:C3").Select
    Selection.Subtotal GroupBy:=2, Function:=xlSum, TotalList:=Array(3), _
    Replace:=True, PageBreaks:=False, SummaryBelowData:=True
    how do i convert this into ABAP code .Pls help. Thanks...
    the data might be like
    NAME DIVISION AMOUNT
    ABC IT 400
    DEF BPO 500
    HTG IT 400

    Hi,
    You can run an excel macro like this
    CREATE OBJECT h_excel 'EXCEL.APPLICATION'.
    Call Method of h_excel 'WORKBOOKS' = h_mapl.
    set property of h_excel 'VISIBLE' = 0.
    Call Method of h_mapl 'OPEN'
    EXPORTING
    #1 = d_file.
    CALL METHOD OF H_EXCEL 'ActiveWorkbook' = h_book .
    CALL METHOD OF H_book 'Activesheet' = H_sheet .
    CALL METHOD OF h_excel 'RUN'
    EXPORTING
    #1 = ld_macro.
    Check the links below as well
    http://sample-code-abap.blogspot.com/2009/07/controlling-excel-using-ole-automation.html
    http://arthur_ong.tripod.com/xab017.htm

  • Translating an excel macro to ABAP

    Hi Guys,
      My requirement is need to put the subtotaling option w.r.t divison when i download the file to an excel sheet via OLE.
    Iam able to get the records in the excel sheet but unable to write the macro in ABAP code.
    the macro which i recorded in Excel is
    Range("A1:C3").Select
        Selection.Subtotal GroupBy:=2, Function:=xlSum, TotalList:=Array(3), _
            Replace:=True, PageBreaks:=False, SummaryBelowData:=True
    how do i convert this into ABAP code .Pls help. Thanks...
    the data might be like
    NAME  DIVISION   AMOUNT
    ABC     IT              400
    DEF      BPO         500
    HTG     IT              400

    Hi,
    You can run an excel macro like this
    CREATE OBJECT h_excel 'EXCEL.APPLICATION'.
    Call Method of h_excel 'WORKBOOKS' = h_mapl.
    set property of h_excel 'VISIBLE' = 0.
    Call Method of h_mapl 'OPEN'
    EXPORTING
    #1 = d_file.
    CALL METHOD OF H_EXCEL 'ActiveWorkbook' = h_book .
    CALL METHOD OF H_book 'Activesheet' = H_sheet .
    CALL METHOD OF h_excel 'RUN'
    EXPORTING
    #1 = ld_macro.
    Check the links below as well
    http://sample-code-abap.blogspot.com/2009/07/controlling-excel-using-ole-automation.html
    http://arthur_ong.tripod.com/xab017.htm

  • Run two VI's simulateously?

    Hi,
    I was wondering is anyone has atip how I run two VI's simultaneously. The first VI is collecting data (through an instrument from HP) and I would like the second Vi to dislay the data while it is collected. I have seen some old VI's in a different program that use "Occurences", is that a solution? Or is there ab easier way?
    Thanks!

    Just adding a tidbit or two to devchandler's reply...
    Another key distinction is that a queue is best for lossless buffered transfer of data to exactly 1 reader from 1 or more writers.  A notifier is best for lossy unbuffered transfer of data to 1 or more readers from 1 or more writers.
    Notifiers let multiple independent parts of the code react quickly to read data immediately after it gets updated by some other part of the code.  If there are 2 writes between any reads, the data from the older write is displaced and unrecoverable.
    I've begun making a habit of basing my "global abort" status flags on Notifiers.  Anyone can write an abort condition and everyone can read it.
    -Kevin P.

  • How to run excel macros using lookout

    Hi,
    I want use Excel macros for generating custom reports.Is it possible to run macros using run object in lookout
    thanks

    Hi,
    I am pretty sure you can activate macros in Excel using the Run object in Lookout. I can think of two ways you can do this:
    1. You can setup your Excel to run macros on startup using the Auto_Activate method. In this case, you will just launch excel with your workbook using the Run object and that should run the macros automatically. No brainer!
    2. To better control as to when the macros are run we can assign in Excel some shortcut keys for their launching. We then would need to simulate these keystrokes to launch our macros. This can be done using the SendKeys method and some scripting, WHS Scripting for instance. See this pos
    t for a scripting example which simulates Alt+Tab keys to bring-to-front an app.
    You will launch the script from the Run object and this in turn launches Excel and then simulates the keys for luanching the appropriate macros. I admit this is kinda involved, but hey it works!
    Hope this helps,
    Khalid

Maybe you are looking for