Stub out Error Cluster from Error Code.vi?

When I profile my application, I find that the biggest consumer of CPU time is the Error Cluster from Error Code.vi, called from a number of locked NI libraries.  How can I stub out this .vi, replacing it with basically a pass-through?  I tried creating a project specific .vi with the same name, and when I open my project all the project and vi.lib .vis used link to it, but they all come up broken and have to be re-linked, which I can't do in the locked .vis (I matched the ins and outs and connector pattern).  I can't edit the Error Cluster...vi directly, getting a message about the .vi being used by another application even with a clean start of LV and going directly to that .vi in the library (and I would prefer to not mess with the vi.lib version anyway).  Any suggestions?  Thanks.  LV 2011.
Matt

If you have the LLB manager open it reserves your VI in a different appliation instance, therefore it is locked and no editing.  Simply close the LLB manager and you can whack away at that VI.
I doubt that the shared clone setting plays much of a role here, there are some deeper issues.   A rather amusing VI in a few ways:
In order to show the VI Title instead of the Name you Open a VI reference which is going to stick you into the root loop.  10 reentrent clones simply means 10 copies waiting in line for the root loop.  A non-reentrent version would simply have 10 copies waiting to run.  Minus the root loop issue, reentrency is the way to go, and on a desktop machine shared clones is typically quite effective.
It can't be a slow VI, look Trim Whitespace was inlined manually to avoid a performance hit!  In a loop maybe, but really, shaving off the overhead of a single subVI?  That's optimization.
But wait, all of that and much, much more is given right back by the use of Delete From Array to remove the first element of the Array.  Bad on so many levels.    Delete From Array is a data copy machine, and now you are doing one needlessly.  Array subset is your friend here, tells the compiler you are only reading, nothing to get excited about. Pull it outside the case structure, you are ditching the first element twice in the two branches.
Concatenating strings in a loop, also a recipe for fun.  Often there are ways to leverage Array to Spreadsheet string for better performance, or build a string array and then concatenate at the end.  Probably not a big deal here, how big are call chains really, but if you are inlining subVIs by hand then you should really be frying the bigger fish.
I find myself in your shoes fairly often.  Some clunker in vi.lib causes a bug or sluggish performance.  You either ditch the NI code and roll your own, or make it work on your machine but not others, or chalk it up to the cost of doing business.  I have tried on numerous occasions to suggest that all patches to vi.lib be made readily and freely available to all previous versions of LV that are compatible.  Let's say this VI got tweaked so it was a bit more performant for you, at least enough to be viable.  Then you could happily use the patched version in LV11, and if you went to a different machine you would simply make sure vi.lib was up-to-date.  These types of patches could roll out incrementally as needed, less need to cross your fingers that you won the CAR lottery with each new version of LV.  (I guess most lottery winners don't shell out $$$ to collect their "winnings" though).
After all that what would I do here?  I would wrap that sucker inside a disable structure (provide minimal functionality, like pass through caller name, code and error instead).  Then I would check the performance again.  Now you have a data point as to whether or not it is worth it to proceed.

Similar Messages

  • Pass error cluster from labview dll to teststand

    Hello,
    I just want to pass an error cluster from a dll compiled in LV7.1 to TestStand 3.1. I never receive the contents of the LV error cluster in TS. I compiled my function with standard calling convention option, this should work. In my VI I generate only an error and pass to error output.
    LV Settings:
     TS settings:
    regards
    MB

    MB,
    please follow the info in this KB:
    http://digital.ni.com/public.nsf/allkb/22BF02003B4588808625717F003ECD67?OpenDocument
    Please note that using "By Value" will never return any values to TestStand!
    You cannot use the default error-container in TestStand to receive data from the LV error cluster if you compile the VI into a LV DLL.
    So either you choose to follow the KB or you split up the error cluster in your LV VIs to return error.occurred (boolean), error.code (numeric i32) and error.msg (LV String) .
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Error messages from Error Log using using CJ40 transcation

    Hi All,
    when i was doing call transcation for CJ40 transcation. on the screen while check syntactical error check there were some errors below.
        Total plan value less than cumulative plan value
        - l2:              2,900.00 <            8,900.00  (AUD)
        - l3:              2,900.00 <            8,900.00  (AUD)
    The Call transaction on CJ40 results in a generic error message in the error table.
    Errors found --> Access the error log
    Need a way to retrieve the error message from the Error Log,
    Thanks,
    Nelson Karunakar

    Hi Nelson Karunakar,
    When we are loading cost plan for particular project which contains multiple WBS elements,
    First we need to enter the cost plant for LEVEL 1 WBS element ( which is nothing but same name as parent project) and save then only we can enter the cost plant for remaining WBS elements for that particulr Parent project.
    If you load the cost plan for LEVEL 1 WBS Elemts first and save it an then enter the values for remaining WBS elements you never get that error message again.
    Thanks,
    Sriram.

  • Pass an error cluster in and out of a C/C++ dll?

    Hi all,
    I'd like to know if it is possible to pass a LabVIEW error cluster to a C/C++ function from a dll. This would greatly help error handling in the different VIs.
    I am able to access and modify the first two members of the error cluster; the error status and the error code, which are, respectively, boolean and integer. But I cannot modify the string. LabVIEW crashes completely doing so.
    I first define a structure in C++ like this:
    const int N = 512;
    #pragma pack(push,1)
    typedef struct lvcluster {
    bool status;
    int code;
    char source[N];
    } lvcluster;
    #pragma pack(pop)
    Then, I define a function that will access the members status, code and source:
    int TestCluster(lvcluster *err)
    err->code = 1;
    err->status = false;
    sprintf(err->source, 'Test');
    I then use LabVIEW's "Call Library Function" to call this dll's function. I have set the parameter "err" to "Adapt to Type" and "Handles by Value". Trying to write characters to the source array crashes LabVIEW.
    Is this possible at all? How should it be done?
    Thanks!

    Thanks all for the comments.
    I've been looking at extcode.h where I saw the defeninition of a LStrHandle. It seems to be a pointer to pointer to "character array":
    typedef struct {
    int cnt; /* number of bytes that follow */
    unsigned char str[1]; /* cnt bytes */
    } LStr, *LStrPtr, **LStrHandle;
    The "character array" is different than a C character array, see http://www.ni.com/white-paper/4877/en/#toc4
    The first 4 bytes contain a signed 32 bit integer representing the number of characters. There is no NULL-termination character.
     So the error structure should be something like this (modulo the size of boolean, thanks rolfk):
    const int N = 512;
    #pragma pack(push,1)
    typedef struct lvcluster {
    bool status;
    int32 code;
    LStrHandle source;
    } lvcluster;
    #pragma pack(pop)
    From there, I was able to access a LabVIEW string from C. But I am unable to modify any of it. I might be able to change the characters from an alreay allocated string, but resizing or even creating a new string crashes LabVIEW. As reported by others, manipulating these strings would require linking against labview's library to access the string manipulation functions, but this is not possible as the library must be independant of LabVIEW.
    The only last possible way I can think of is to allocate a new cluster inside the DLL. Then I might be able to change the string in it, and hopefully LabVIEW would pick it up. I don't know how LabVIEW manages its memory; would it garbage collect the input cluster that is not used anymore?
    Thanks for all the feedback.

  • COM Interface Error Propagation from C++ to LV

    I have found that only error codes that are <0 (msb bit
    set) will propagate up to a LV error cluster from my automation interface.
    Is it possible, in accordance with the COM spec, to be able to pass error
    codes with a positive value up to LV?

    Good question. All LabVIEW errors are negative, so it may be carrying over this generalization when dealing with your COM server. I'm not sure if this would be the case. This is really a question for LabVIEW experts though, so I would post the question to the LabVIEW section of Developer's Exchange here so LabVIEW users can respond.
    Best Regards,
    Chris Matthews
    National Instruments

  • LabVIEW new "Silver" error cluster and TestStand

    I have some new VI's that use the new "Silver" style error controls and indicators.  I started calling the VI's from TestStand and noticed that the new VI's were not auto populating the TestStand error to the VI's error out.  Not sure how this mechanism works but it doesn't work with the default "Silver" controls.  I think it is name based case sensitive and I just have to rename the "Error Out" cluster to be lower case "error out".

    Paul -
    Can you confirm that the problem you're describing is that because the name of the Silver error cluster is "Error Out", when you configure a LabVIEW step to call a VI that has the Silver error cluster wired to the connect pane, TestStand does not automatically assign Step.Result.Error to that parameter? If so, we have reproduced this behavior and yes, you are correct that it is due to case sensitivity. We have taken note of this in order to fix the problem in a future version of TestStand.
    I also just wanted to confirm that the problem is not that the error information is not correctly passed from LabVIEW to TestStand, when you assign Step.Result.Error to a Silver error cluster parameter.
    Please let me know.
    Manooch H.
    National Instruments

  • How do I pass an error status from my java code back to the Program Job Ser

    How do I pass an error status from my java code back to the Program Job Server?
    I have a jar program object that reports a scheduled status of "Success" even if the java code errors out.

    Exceptions thrown from the program object are ignored by the program job server.
    You need to configure the Program Object, then stream out a special string sequence to the stdout of the Program Object, to set the scheduled instance status to Failed.
    Look up SAP KBase  1201804 - How to programmatically set the status of a Program object to "Failed"
    Sincerely,
    Ted Ueda

  • "VS_NEEDSNEWMETADATA" error while running a package created from C# code

    I have gone through most of the answers for similar questions here however none has resolved the issue. We have created a package using C# code which stages data from a source table to destination (ChildPackage.dtsx).
    Source Table : RowKey, Col1, Col2
    Destination Table : RowKey, Col1, Col2, RowID, RunID (RowID is an identity column in destination table and RunID is a derived column whose value is set using a variable)
    This package runs fine when we execute it directly however, we run these packages from a master package (MasterPackage.dtsx). When we are trying to run the package (ChildPackage) from a MasterPackage we get an error:
    [SSIS.Pipeline] Error: "Oledb Destination" failed validation and returned validation status "VS_NEEDSNEWMETADATA".
    We have tried setting DelayValidation to true for the ChildPackage and even tried setting the values for "ValidateExternalMetadata" for the source and destination component as "False" for the data flow task
    of the ChildPackage.
    There is no case difference between column names in source and destination and it runs fine when we run the ChildPackage directly.
    The only additional task that the Master package performs is to generate and set a variable that is used as RunID value by the child package.
    If we hardcode the RunID in the ChildPackage and run it directly, it runs fine.
    The MasterPackage.dtsx is not created from code and has a step to run ChildPackage.dtsx. We generate the ChildPackage.dtsx from code and replace in original solution.
    Any help would be appreciated.
    Gaurav Agarwal

    Where then this RunID is consumed?
    Arthur My Blog
    The RunID is set by the MasterPackage in a parameter, this parameter is used as value of derived column in the data transformation task of the ChildPackage.
    As mentioned ChildPackage has a RunID column.
    Gaurav Agarwal

  • Java - Axis2: How to get an error code / error message from the Javascript via SOAP

    Hi
    In our Java applicsation we call a Javascript in a Indesign CS Server using the following code:
    --- SNIP BEGIN ---
    // calls the remote service on the indesign server
    try {
    // create service
    ServiceStub oIndsgnSrvStub = new
    ServiceStub(sIndesignServer);
    // create service parameter
    ServiceStub.RunScriptParameters
    oIndsgnSrvRSParams = new ServiceStub.RunScriptParameters();
    // create arguments with source- and target-file for parameter
    ServiceStub.IDSPScriptArg[] oIndsgnSrvSArgs = new ServiceStub.IDSPScriptArg[2];
    oIndsgnSrvSArgs[0] = new
    ServiceStub.IDSPScriptArg();
    oIndsgnSrvSArgs[0].setName("xml-input");
    oIndsgnSrvSArgs[0].setValue(sSourceFile);
    oIndsgnSrvSArgs[1] = new
    ServiceStub.IDSPScriptArg();
    oIndsgnSrvSArgs[1].setName("output-file");
    oIndsgnSrvSArgs[1].setValue(sTargetFile);
    // define service parameter
    oIndsgnSrvRSParams.setScriptArgs(oIndsgnSrvSArgs);
    oIndsgnSrvRSParams.setScriptFile(sScriptFile);
    oIndsgnSrvRSParams.setScriptLanguage("javascript");
    oIndsgnSrvRSParams.setScriptText("");
    // create runscript
    ServiceStub.RunScript oIndsgnSrvRS = new ServiceStub.RunScript();
    // set parameter
    oIndsgnSrvRS.setRunScriptParameters(oIndsgnSrvRSParams);
    //$$$ there should be an answer returned by the InddSrvr
    // execute SOAP call
    ServiceStub.RunScriptResult oIndsgnSrvRes = oIndsgnSrvStub.RunScript(oIndsgnSrvRS);
    if(oIndsgnSrvRes.getErrorNumber() == 0) {
    oServerProdJob.setProdState(CBP_Constant.REMOTEPRODUCTIONSTATE_SUCCESS);
    bOK = true;
    } else {
    oServerProdJob.setProdState(CBP_Constant.REMOTEPRODUCTIONSTATE_FAILURE);
    bOK = false;
    //$$$ should be set, if there is something returned by inddsrvr
    //oServerProdJob.setErrorMsg(sErrorMsg);
    } catch(Exception e) {
    sError += e.getMessage() + "\n";
    bOK = false;
    --- SNIP END -----
    The problem is that we don't get the error code and/or the error message from the Javascript in oIndsgnSrvRes. The error code is always 0 if I set an Integer value as return in the Javascript. If I set a String, there is an Exception in the Java application.
    Here is the Java script we use:
    --- SNIP BEGIN ---
    main();
    main()
    var sError = "";
    var sXMLInput = "";
    var sLayoutPath = "";
    // get the SDKCodeSnippetRunner object
    var cbpAdapter = app.cbpCbpadapterObject
    if (cbpAdapter) {
    sXMLInput=app.scriptArgs.get("xml-input");
    sLayoutOutputFile=app.scriptArgs.get("output-file");
    sError = cbpAdapter.doProcess(sXMLInput, sLayoutOutputFile);
    return sError; // This give an Exception; if I return an Integer the ScriptResult is always 0
    --- SNIP END -----
    If I try this with the test application from Adobe I get the error code correctly. But in the Java application, using SOAP, I can't get the error code.
    What could be wrong?
    Any ideas?
    Thanks a lot for the support.
    Kind regards
    Hans

    user11340104 wrote:
    Hello -
    i am calling sqlplus from a bash shell script. If the sql statement generates an error, how can I return that error code (unsuccessful) back to the bash shell?
    Well, let google be your friend,
    http://www.google.co.in/search?rlz=1C1GGLS_enIN327IN327&sourceid=chrome&ie=UTF-8&q=sqlplus+error+codes
    There are many threads I guess talking about the same issue.
    HTH
    Aman....

  • And when i try to Re-install itunes i get a message from itunes ERROR 7 (windows error 1114), now how do i sort this out ???

    and when i try to Re-install itunes i get a message from itunes ERROR 7 (windows error 1114), now how do i sort this out ???

    Hey deepakmenonfrompune,
    Thanks for the question. I understand that you are experiencing issues with iTunes for Windows. The following resource may help to resolve your issue:
    iTunes 11.1.4 for Windows: Unable to install or open
    http://support.apple.com/kb/TS5376
    Some Windows customers may experience installation issues while trying to install or open iTunes 11.1.4.
    Symptoms may include:
    "The program can't start because MSVCR80.dll is missing from your computer"
    "iTunes was not installed correctly. Please reinstall iTunes. Error 7 (Windows Error 126)”
    "Runtime Error: R6034 - An application has made an attempt to load the C runtime library incorrectly"
    "Entry point not found: videoTracks@QTMovie@@QBE?AV?$Vector@V?$RefPtr@VQTTrack@@@***@@$0A@VCrashOnOverf low@@***@@XZ could not be located in the dynamic link library C:\Program Files(x86)\Common Files\Apple\Apple Application Support\WebKit.dll”
    Resolution
    Follow these steps to resolve the issue:
    Check for .dll files
    1. Go to C:\Program Files (x86)\iTunes and C:\Program Files\iTunes and look for .dll files.
    2. If you find QTMovie.DLL, or any other .dll files, move them to the desktop.
    3. Reboot your computer.
    Note: Depending on your operating system, you may only have one of the listed paths.
    Uninstall and reinstall iTunes
    1. Uninstall iTunes and all of its related components.
    2. Reboot your computer. If you can't uninstall a piece of Apple software, try using theMicrosoft Program Install and Uninstall Utility.
    3. Re-download and reinstall iTunes 11.1.4.
    Thanks,
    Matt M.

  • I am running Acrobat X Pro on Windows 7 in Parallels. I have tried to install the Acrobat updates, but they won't install. Today I tried to create a pdf from a Word 2013 document and it crapped out. I tried to uninstall Acrobat and got Error 1310. Error w

    I am running Acrobat X Pro on Windows 7 in Parallels. I have tried to install the Acrobat updates, but they won't install. Today I tried to create a pdf from a Word 2013 document and it crapped out. I tried to uninstall Acrobat and got Error 1310. Error writing to file: c:\Config.Msi\feea.rbf. What do I do?

    Hi Beverly ,
    Please refer to the following and see if this helps.
    https://helpx.adobe.com/creative-suite/kb/error-1310-error-writing-file.html
    Regards
    Sukrit Dhingra

  • Odd error originating from NI-5411 (Error code: BFFA0002) when trying to load arbitrary waveform

    Hello everyone. 
    We have some equipment (PCI NI-5411) that is misbehaving in an odd and new way. When trying to load an arbitrary waveform onto the AWG (using a library call to the "niFgen Write Binary 16 Waveform"), it produces an error. The error code is "BFFA0002", but I haven't been able to find any information that can show what this error code provides. Previously, we had some problem when the system wouldn't find the file and produces an error even though the file is there. After changing our code so the file access is attempted several times, the problem was resolved. However, that doesn't work in this case and we do not know here the problem is.
    This is a pretty much shooting wild and hoping that something falls down, but if anyone could provide me with information about the error code or another probable error source I would be highly grateful.
    Thanks in advance!
    With best regards,
    Niclas

    Hi Niclas,
    That error code suggests that a file cannot be opened. This error is defined in IVI as  IVI_ERROR_CANNOT_OPEN_FILE.I don't think we return this error code from the NI-FGEN driver.
    You mentioned that you have an issue with finding a file. Is that file specific to your application? How is it being open or used? What API do you use to open that file?
    For NI-FGEN specific error code (and generic IVI error codes), you can query the error message by calling niFgen_error_message function or niFgen Error Message.vi.
    Thanks,
    - Liusdi

  • Every time I sign into my Macbook, I get an error message from Automator; "The data couldn't be read because it has been corrupted.". I have never created an Automator workflow. How do I find out what Automator is trying to run and stop it?

    Every time I sign into my Macbook, I get an error message from Automator; "The data couldn't be read because it has been corrupted.". I have never created an Automator workflow. How do I find out what Automator is trying to run and stop it?

    Maybe it's set as a login item:
    - System Preferences: Users and Groups:
    - Highlight your user account in the left pane/list
    - Click "Login" tab at the top.
    See if you have an Automater action on the list
    - Note, you can select it, then right-click, and can then select "Reveal in Finder". That way you might have an idea what installed it.

  • Error #1009 in as3 code to install an Air application from an embedded swf.

    Hi, I am getting error #1009 in my code when i try to install the application. I am new to action script and below is the code for my installer.
    var airSWF:Object; // This is the reference to the main class of air.swf
    var airSWFLoader:Loader = new Loader(); // Used to load the SWF
    var loaderContext:LoaderContext = new LoaderContext(); 
                                    // Used to set the application domain 
    var paramObjAppid:Object = LoaderInfo(this.root.loaderInfo).parameters.appid;
    //var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
    loaderContext.applicationDomain = ApplicationDomain.currentDomain;
    airSWFLoader.contentLoaderInfo.addEventListener(Event.INIT, onInit);
    airSWFLoader.load(new URLRequest("http://airdownload.adobe.com/air/browserapi/air.swf"), 
                        loaderContext);
    function onInit(e:Event):void 
        airSWF = e.target.content;
    var url = '';
    var qty = '';
    var appID = '';
    var pubID = "";
    var runtimeVersion = "3";
    var tf:TextField = new TextField();       // create a TextField names tf for debugging
    tf.autoSize = TextFieldAutoSize.LEFT;
    //tf.size = 4;
    tf.wordWrap = true;
    tf.border = true;
    addChild(tf);        
    try
        var keyStr:String;
        var valueStr:String;
        var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;   //set the paramObj variable to the parameters property of the LoaderInfo object
        for (keyStr in paramObj)
            valueStr = String(paramObj[keyStr]);
            if ( keyStr == 'qty' ) {
                qty = Number(valueStr);
            if ( keyStr == 'url' ) {
                url = escape(valueStr);
            if ( keyStr == 'appid') {
                appID = valueStr;
    catch (error:Error)
    var arguments:Array = [qty];
    launchBtn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_2);
    function fl_MouseClickHandler_2(event:MouseEvent):void
        airSWF.getApplicationVersion(appID, pubID, versionDetectCallback);    
    function versionDetectCallback(version:String):void
        if (version == null)
            trace("Not installed.");
            tf.appendText('Not Installed');
            try {
                   airSWF.installApplication(url, runtimeVersion, arguments);
                catch (error:Error){
                    tf.appendText(error.toString());
        else
            trace("Version", version, "installed.");
            tf.appendText("appID="+appID);
            try {
                airSWF.launchApplication(appID, pubID );
            catch(error:Error) {
                tf.appendText(error.toString());

    I managed to figure out what was causing the issue, I had a particular png image in my projects assets folder that seemed to be the culprit. Once I removed it the app installs just fine? Really weird?
    Adam

  • I create an id. on review option when i enter visa card and security code, it always gives an error msg "Invalid Secruity code". but i use this code for money withdraw from ATM and for shopping also. plz tell the solution ????

    i create an id. on review option when i enter visa card and security code, it always gives an error msg "Invalid Secruity code". but i use this code for money withdraw from ATM and for shopping also. plz tell the solution ????

    The code they are asking for is the last three digits of the number on the back of the card (you don't use this when using an ATM or presenting the card in shops).

Maybe you are looking for