Subvi dll error handling

Hi everyone
I have a basic/principal question regarding subvi's and associated error handling.
Say I have an DLL which contains a function that takes input a and b, outputs c and d and that I want to wrap this function call (plus additional logic) into a SubVI. I can imagine this done in two ways with error handling:
Which one is the most "correct" (or pretty or smart) way to do it?
Best regards
Wuhtzu

First off, I agree with nathand that you do not need the case structure (the Call Library Function Node handles it).
Second, if you are wrapping DLL functions, take a look at the import DLL tool.  (Tools->Import->Shared Library in the menus).  It will create wrappers for your DLL functions -- then you just have to test them and make some tweaks
For example, if you have a parameter which is a pointer, the tool will make you an input and an output (since it can't tell which it is meant to be, and might be both).  Often you really just want it as an input or just as an output, so you have to change that (and make sure, if an output, that you have someplace to put it; in some cases you will need to make a constant of that type and pass it into the Call Library Function node, and then pass it out.
I have had a lot of success using this tool, and it saves a lot of repetetive grunt work.
B.

Similar Messages

  • Error Handling: VI response to any error

    Hey guys,
    I need to make sure a piece of code executes whenever there is any error in the VI. I'm pretty new to Labview, and cannot wrap my head around "extracting" the errors, so I can pass them into an error handler... All I want, is for my code to find out that there is an error, take some action, and then stop execution.
    Any help is greatly appreciated, thanks!
    Solved!
    Go to Solution.

    You simply wire the error wire to the selector of a case structure. Click on file/new/from template/frameworks/SubVI with Error Handling
    =====================
    LabVIEW 2012

  • Using code interface node with dll crashes LV 2011 but not LV 8.6... using max error handling does nothing

    Hi all,
    I'm having a peculiar problem.
    I inherited a project saved in LabVIEW 8.6. The project must use of particular dll that was built a few years ago. The original developer and source code for this .dll are long gone. The very core logic exists, in the form of embedded C code, and that's it. The .dll is called through a Code Interface Node in LV 8.6 and this setup manages to "work". Howver, running the VI that calls this .dll in LV 2011 causes an "insta crash", as in, no "program has stopped responding".  Error message pops up, then all LV windows close.
    It's very similar to that described in here:
    http://digital.ni.com/public.nsf/allkb/D84C9775ABD921CF8625772A005CA50C
    but this KB says to try putting the amount of error handling to maximum. I tried that, but it didn't help. 
    Using the "Debug" option allows me to run the just-in-time debugger with CVI 2010, which then proceeds to say this:
    Finally, I manage to get this out of it: 
    FATAL RUN-TIME ERROR:   Unknown source position, thread id 0x000012D4:   A non-debuggable thread caused a 'General Protection' fault at address 0x00000000.
    I don't think that really helps at all, but it's there.
    Here is the function prototype of the .dll:
    void  _inputPM@224(uint8_t arg1, uint16_t arg2, uint8_t arg3, float arg4, float arg5, float arg6, float arg7, float arg8, float arg9, float arg10, float arg11, float arg12, float arg13, float arg14, float arg15, float arg16, float arg17, uint16_t arg18, uint16_t arg19, uint16_t arg20, uint16_t arg21, uint16_t arg22, uint16_t arg23, uint16_t arg24, uint16_t arg25, uint16_t arg26, float arg27, float arg28, float arg29, float arg30, float arg31, float arg32, float arg33, float arg34, float arg35, float arg36, float arg37, float arg38, float arg39, float arg40, float arg41, float arg42, float arg43, float arg44, float arg45, float arg46, float arg47, uint16_t arg48, uint16_t arg49, uint16_t arg50, uint16_t arg51, uint16_t arg52, float arg53, float arg54, float arg55, float arg56);
    (never seen a function take 50 input params like that (wouldn't you use a struct? array? something? But I digress, and I don't know anything about .dlls...))  
    I do have a ".lib" and a ".cdb" file with the same name as the .dll, but those also looks like some kind of compiled file. 
    I'm sure the answer I'm going to get is that there is no way of telling what's really going on without .dll source code. I'm hoping against hope that there may be another way or hack.
    Any ideas? Thank you for you help. 
    Regards,
    Mark G 
    Solved!
    Go to Solution.

    MarkCG wrote:
    Changing the call library node to stdcall (WINAPI) did the trick! No more crash. Thank you very much!
    I haven't run LV2011 on windows XP, only on windows 7, so I don't know if that makes a dfference. But  The call type makes no difference when using LV 8.6 on the same machine, however.
    Now I've got to make the .DLL run corretly on a compact fieldpoint....  and avoid crashing IT. 
    Thank you for the help all!
    Well, the DLL did work fine in LabVIEW 8.6 because earlier versions of LabVIEW automatically proceeded to change the calling convention to stdcall, if they noticed a function name decoration of @# (# = number of bytes passed on the stack) appended to the name. This is the default naming decoration for stdcall functions used by VisualC. However this decoration can be overwritten with linker switches, other compilers don't use them always in the same way, and most likely there are in the mean time compilers out there that can produce such decorations also for non stdcall calling convention. So this automagic trickery was removed from newer LabVIEW versions.
    I do think it could be considered a bug in the code that upgrades LabVIEW VIs, that it uses the calling convention that is configuerd in the dialog, instead of the calling convention earlier LabVIEW versions used automagically, but it is an esoteric corner case.
    What Compact Fieldpoint controller do you have? If it's anything newer than 20xx or 21xx forget it. The 22xx controllers use a PPC CPU and VxWorks operating system and can never get a Windows DLL to operate properly. If it is a 20xx controller it's still highly likely that DLL can not even get loaded into LabVIEW as it likely relies on other runtime libraries and possibly Win32 APIs not present in the Pharlap ETS runtime kernel used on those controllers.
    There is a tool to check a DLL for incompatible imports that are not present on specific ETS RT systems. And this list summarizes the RT system used on the various NI controllers.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • LV7.1 Strange behavior with Automatic Error Handling occuring when it shouldn't [LV 7.1 Pro on WinXP for Tablet PC's]

    [LV 7.1 Pro on WinXP for Tablet PC's]
    I recently let a rather large LV app of mine run in the development environment while I was out for a couple of days. Upon returning I found that the app had hung for ~22 hours waiting for an answer to an Automatic Error Handling (AEH) dialog proclaiming an Error 7 in New File without any indication of the VI hierarchy that called New File.  I set about ensuring that AEH dialogs would not pop up and have not been able to discover how I could have possibly received one in the first place.
    Subsequent investigation revealed:
    Neither AEH option in Options>Block Diagrams were checked.
    Network problems had occurred around the time that the app had hung.  All file paths are network paths when running in the development environment, so the cause of the error was most likely valid, even if the AEH dialog appearance wasn't.
    My app has only one instance where the New File primitive is used by me. That subVI and all others above it in the hierarchy DO NOT have the AEH property enabled.  The error out cluster of New File in my subvi is wired.
    My app has three instances where New File is called from a vi.lib vi (Open/Create/Replace File.vi, Open Config Data.vi, and Prompt Web Browser Path.vi), none of which have the AEH property enabled.  Nor does any of their calling VI's.  All three instances also have their error out cluster wired.
    A utility to examine the AEH property of all VI's (with all top level and dynamic VI's loaded) in memory reported that only 1 of 308 vi's ( RGT Does File Exists.vi from the Report Generation Toolkit) had that property true.  That vi has no subVI's other than the File/Directory Info primitive and no calling VI's in common with any of the vi's that call New File, except a top level VI.
    As long as 'Enable automatic error handling dialogs' remains unselected in options>block diagram, I am unable to get an AEH dialog for either the New File or File/Directory Info primitives in a test VI with AEH property enabled and their error out clusters unwired no matter what invalid path I pass to the functions.  As soon as the options>block diagram>Enable AEH dialogs' is selected, both primitives fire AEH dialogs with no error out wired and don't when wired. i.e. works as advertised.
    In other words I can find no reason why I should have gotten the problem AEH dialog...
    I cannot afford for this app to hang because of a network problem, other portions of the app that were running concurrently correctly handled the error and, had the AEH dialog not appeared, the app would have made corrections or shutdown in an orderly fashion.
    Any ideas?

    Very good.
    Write Characters to File.vi>Open/Create/Replace File.vi>New File
    New File throws the error.  Open/Create/Replace strips the hierarchy from the source of the error.  Write Characters passes it to the General Error Handler.  I never looked above O/C/R file in the hierarchy except for enable automatic error handling property.  The tip-off should have been to realize that O/C/R file was stripping the hierarchy from the error and look above that. 
    The real irony is that Write Characters was being used to log error cluster data to an error log file...
    Save as... Copy without updating... the OEM 'Write Characters to File' is gone from this app.
    Thanx (a bunch)

  • Dboraslib.dll - Error 126 : "The specified module could not be found."

    Hi,
    After installation XI 3.0 and adapters, the dispatcher(dispwork.exe) is failing to start in a ABAPJ2EE system (web AS 6.40).
    The dev_disp trace file shows the following error:
    Please do help to resolve this problem.
    trc file: "dev_disp", trc level: 1, release: "640"
    Mon Aug 09 12:14:43 2004
    kernel runs with dp version 124000(ext=101000) (@(#) DPLIB-INT-VERSION-124000-UC)
    length of sys_adm_ext is 524 bytes
    ERROR => DlLoadLib: LoadLibrary(dboraslib.dll) Error 126 [dlnt.c       237]
            Error 126 = "The specified module could not be found."
    systemid   560 (PC with Windows NT)
    relno      6400
    patchlevel 0
    patchno    1
    intno      0
    make:      multithreaded, Unicode
    pid        2908
    ***LOG Q00=> DpSapEnvInit, DPStart (00 2908) [dpxxdisp.c   1093]
         shared lib "dw_xml.dll" version 1 successfully loaded
         shared lib "dw_xtc.dll" version 1 successfully loaded
         shared lib "dw_stl.dll" version 1 successfully loaded
         shared lib "dw_gui.dll" version 1 successfully loaded
    Mon Aug 09 12:14:48 2004
    WARNING => DpNetCheck: NiAddrToHost(1.0.0.0) took 5 seconds
    ***LOG GZZ=> 1 possible network problems detected - check tracefile and adjust the DNS settings [dpxxtool2.c  3878]
    MtxInit: -2 0 0
    DpSysAdmExtInit: ABAP is active
    DpSysAdmExtInit: JAVA is not active
    DpShMCreate: sizeof(wp_adm)          10528     (1316)
    DpShMCreate: sizeof(tm_adm)          2506872     (12472)
    DpShMCreate: sizeof(wp_ca_adm)          24000     (80)
    DpShMCreate: sizeof(appc_ca_adm)     8000     (80)
    DpShMCreate: sizeof(comm_adm)          290000     (580)
    DpShMCreate: sizeof(vmc_adm)          0     (372)
    DpShMCreate: sizeof(wall_adm)          (38456/34360/64/184)
    DpShMCreate: SHM_DP_ADM_KEY          (addr: 06440040, size: 2919328)
    DpShMCreate: allocated sys_adm at 06440040
    DpShMCreate: allocated wp_adm at 06441B58
    DpShMCreate: allocated tm_adm_list at 06444478
    DpShMCreate: allocated tm_adm at 064444A0
    DpShMCreate: allocated wp_ca_adm at 066A8518
    DpShMCreate: allocated appc_ca_adm at 066AE2D8
    DpShMCreate: allocated comm_adm_list at 066B0218
    DpShMCreate: allocated comm_adm at 066B0230
    DpShMCreate: allocated vmc_adm_list at 066F6F00
    DpShMCreate: system runs without vmc_adm
    DpShMCreate: allocated ca_info at 066F6F28
    DpShMCreate: allocated wall_adm at 066F6F30
    MBUF state OFF
    Mon Aug 09 12:14:49 2004
    EmInit: MmSetImplementation( 2 ).
    <ES> client 0 initializing ....
    <ES> InitFreeList
    <ES> block size is 1024 kByte.
    Using implementation std
    <EsNT> Memory Reset enabled as NT default
    <EsNT> EsIUnamFileMapInit: Initialize the memory 614 MB
    <ES> 613 blocks reserved for free list.
    ES initialized.
    Mon Aug 09 12:14:52 2004
    J2EE server info
      start = TRUE
      state = STARTED
      pid = 3216
      argv[0] = C:\usr\sap\SXI\DVEBMGS00/j2ee/os_libs/jcontrol.exe
      argv[1] = C:\usr\sap\SXI\DVEBMGS00/j2ee/os_libs/jcontrol.exe
      argv[2] = pf=C:\usr\sap\SXI\SYS\profile\SXI_DVEBMGS00_cgnlpt036
      argv[3] = -DSAPSTART=1
      argv[4] = -DCONNECT_PORT=1352
      argv[5] = -DLISTEN_PORT=1353
      argv[6] = -DSAPSYSTEM=00
      argv[7] = -DSAPSYSTEMNAME=SXI
      argv[8] = -DSAPMYNAME=cgnlpt036_SXI_00
      argv[9] = -DSAPPROFILE=C:\usr\sap\SXI\SYS\profile\SXI_DVEBMGS00_cgnlpt036
      argv[10] = -DFRFC_FALLBACK=ON
      argv[11] = -DFRFC_FALLBACK_HOST=localhost
      start_lazy = 0
      start_control = SAP J2EE startup framework
    DpJ2eeStart: j2ee state = STARTED
    rdisp/http_min_wait_dia_wp : 1 -> 1
    ***LOG CPS=> DpLoopInit, ICU ( 2.0 2.0 3.1.1) [dpxxdisp.c   1455]
    ***LOG Q0K=> DpMsAttach, mscon ( cgnlpt036) [dpxxdisp.c   9701]
    Mon Aug 09 12:14:54 2004
    CCMS: start to initalize 3.X shared alert area (first segment).
    DpMsgAdmin: Set release to 6400, patchlevel 0
    MBUF state PREPARED
    MBUF component UP
    DpMBufHwIdSet: set Hardware-ID
    ***LOG Q1C=> DpMBufHwIdSet [dpxxmbuf.c   1025]
    DpMsgAdmin: Set patchno for this platform to 1
    Release check o.K.
    Mon Aug 09 12:15:33 2004
    ERROR => W0 (pid 3224) died [dpxxdisp.c   12152]
    ERROR => W1 (pid 3232) died [dpxxdisp.c   12152]
    my types changed after wp death/restart 0xbf --> 0xbe
    ERROR => W2 (pid 3240) died [dpxxdisp.c   12152]
    my types changed after wp death/restart 0xbe --> 0xbc
    ERROR => W3 (pid 3248) died [dpxxdisp.c   12152]
    my types changed after wp death/restart 0xbc --> 0xb8
    ERROR => W4 (pid 3256) died [dpxxdisp.c   12152]
    ERROR => W5 (pid 3264) died [dpxxdisp.c   12152]
    my types changed after wp death/restart 0xb8 --> 0xb0
    ERROR => W6 (pid 3272) died [dpxxdisp.c   12152]
    my types changed after wp death/restart 0xb0 --> 0xa0
    ERROR => W7 (pid 3280) died [dpxxdisp.c   12152]
    my types changed after wp death/restart 0xa0 --> 0x80
    DP_FATAL_ERROR => DpWPCheck: no more work processes
    DISPATCHER EMERGENCY SHUTDOWN ***
    increase tracelevel of WPs
    killing W0-3224 (SIGUSR2)
    ERROR => DpWpKill(3224, SIGUSR2) failed [dpxxtool.c   2464]
    killing W1-3232 (SIGUSR2)
    ERROR => DpWpKill(3232, SIGUSR2) failed [dpxxtool.c   2464]
    killing W2-3240 (SIGUSR2)
    ERROR => DpWpKill(3240, SIGUSR2) failed [dpxxtool.c   2464]
    killing W3-3248 (SIGUSR2)
    ERROR => DpWpKill(3248, SIGUSR2) failed [dpxxtool.c   2464]
    killing W4-3256 (SIGUSR2)
    ERROR => DpWpKill(3256, SIGUSR2) failed [dpxxtool.c   2464]
    killing W5-3264 (SIGUSR2)
    ERROR => DpWpKill(3264, SIGUSR2) failed [dpxxtool.c   2464]
    killing W6-3272 (SIGUSR2)
    ERROR => DpWpKill(3272, SIGUSR2) failed [dpxxtool.c   2464]
    killing W7-3280 (SIGUSR2)
    ERROR => DpWpKill(3280, SIGUSR2) failed [dpxxtool.c   2464]
    NiWait: sleep (10000 msecs) ...
    NiISelect: timeout 10000 ms
    NiISelect: maximum fd=489
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Aug 09 12:15:43 2004
    NiISelect: TIMEOUT occured (10000 ms)
    dump system status
    Workprocess Table (long)               Mon Aug 09 06:45:43 2004
    ========================
    No Ty. Pid      Status  Cause Start Err Sem CPU    Time  Program  Cl  User         Action                    Table
    0 DIA     3224 Ended         no      1   0             0                                                             
    1 DIA     3232 Ended         no      1   0             0                                                             
    2 UPD     3240 Ended         no      1   0             0                                                             
    3 ENQ     3248 Ended         no      1   0             0                                                             
    4 BTC     3256 Ended         no      1   0             0                                                             
    5 BTC     3264 Ended         no      1   0             0                                                             
    6 SPO     3272 Ended         no      1   0             0                                                             
    7 UP2     3280 Ended         no      1   0             0                                                             
    Dispatcher Queue Statistics               Mon Aug 09 06:45:43 2004
    ===========================
    --------++++--
    +
    Typ
    now
    high
    max
    writes
    reads
    --------++++--
    +
    NOWP
    0
    3
    2000
    10
    10
    --------++++--
    +
    DIA
    5
    5
    2000
    5
    0
    --------++++--
    +
    UPD
    0
    0
    2000
    0
    0
    --------++++--
    +
    ENQ
    0
    0
    2000
    0
    0
    --------++++--
    +
    BTC
    0
    0
    2000
    0
    0
    --------++++--
    +
    SPO
    0
    0
    2000
    0
    0
    --------++++--
    +
    UP2
    0
    0
    2000
    0
    0
    --------++++--
    +
    max_rq_id          13
    wake_evt_udp_now     0
    wake events           total     9,  udp     6 ( 66%),  shm     3 ( 33%)
    since last update     total     9,  udp     6 ( 66%),  shm     3 ( 33%)
    Dump of tm_adm structure:               Mon Aug 09 06:45:43 2004
    =========================
    Term    uid  man user    term   lastop  mod wp  ta   a/i (modes)
    Workprocess Comm. Area Blocks               Mon Aug 09 06:45:43 2004
    =============================
    Slots: 300, Used: 1, Max: 0
    --------++--
    +
    id
    owner
    pid
    eyecatcher
    --------++--
    +
    0
    DISPATCHER
    -1
    WPCAAD000
    NiWait: sleep (5000 msecs) ...
    NiISelect: timeout 5000 ms
    NiISelect: maximum fd=489
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Aug 09 12:15:48 2004
    NiISelect: TIMEOUT occured (5000 ms)
    Shutdown server ...
    DpIJ2eeShutdown: send SIGINT to SAP J2EE startup framework (pid=3216)
    killing process (3216) (SOFT_KILL)
    DpIJ2eeShutdown: j2ee state = SHUTDOWN
    NiSelClear: removed hdl 3 from selectset
    DpDelSocketInfo: del info for socket 3 (type=7)
    NiBufClose: clear extensions for hdl 3
    NiBufSetStat: bufstat of hdl 3 changed from OK to OFF
    NiICloseHandle: shutdown and close hdl 3 / socket 456
    NiSelClear: removed hdl 4 from selectset
    DpDelSocketInfo: del info for socket 4 (type=9)
    NiBufClose: clear extensions for hdl 4
    NiBufSetStat: bufstat of hdl 4 changed from OK to OFF
    NiICloseHandle: shutdown and close hdl 4 / socket 448
    DpModState: buffer in state MBUF_PREPARED
    NiBufSend starting
    NiIWrite: write 110, 1 packs, MESG_IO, hdl 5, data complete
    MsINiWrite: sent 110 bytes
    MsIModState: change state to SHUTDOWN
    DpModState: change server state from STARTING to SHUTDOWN
    Switch off Shared memory profiling
    ShmProtect( 57, 3 )
    ShmProtect(SHM_PROFILE, SHM_PROT_RW
    ShmProtect( 57, 1 )
    ShmProtect(SHM_PROFILE, SHM_PROT_RD
    DpWakeUpWps: wake up all wp's
    Stop work processes...
    Stop gateway
    killing process (3172) (SOFT_KILL)
    Stop icman
    killing process (3196) (SOFT_KILL)
    Terminate gui connections
    [DpProcDied] Process lives  (PID:3172  HANDLE:472)
    waiting for termination of gateway
    NiWait: sleep (1000 msecs) ...
    NiISelect: timeout 1000 ms
    NiISelect: maximum fd=489
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Aug 09 12:15:49 2004
    NiISelect: TIMEOUT occured (1000 ms)
    [DpProcDied] Process died  (PID:3172  HANDLE:472)
    [DpProcDied] Process died  (PID:3196  HANDLE:464)
    DpHalt: cancel all lcom connections
    MPI CancelAll 2 -> 0
    MPI DeleteAll 2 -> 0
    [DpProcDied] Process lives  (PID:3216  HANDLE:440)
    [DpProcDied] Process lives  (PID:3216  HANDLE:440)
    waiting for termination of J2EE server
    NiWait: sleep (1000 msecs) ...
    NiISelect: timeout 1000 ms
    NiISelect: maximum fd=489
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Aug 09 12:15:50 2004
    NiISelect: TIMEOUT occured (1000 ms)
    [DpProcDied] Process lives  (PID:3216  HANDLE:440)
    waiting for termination of J2EE server
    NiWait: sleep (1000 msecs) ...
    NiISelect: timeout 1000 ms
    NiISelect: maximum fd=489
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Aug 09 12:15:51 2004
    NiISelect: TIMEOUT occured (1000 ms)
    [DpProcDied] Process lives  (PID:3216  HANDLE:440)
    waiting for termination of J2EE server
    NiWait: sleep (1000 msecs) ...
    NiISelect: timeout 1000 ms
    NiISelect: maximum fd=489
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Aug 09 12:15:52 2004
    NiISelect: TIMEOUT occured (1000 ms)
    [DpProcDied] Process lives  (PID:3216  HANDLE:440)
    waiting for termination of J2EE server
    NiWait: sleep (1000 msecs) ...
    NiISelect: timeout 1000 ms
    NiISelect: maximum fd=489
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Aug 09 12:15:53 2004
    NiISelect: TIMEOUT occured (1000 ms)
    [DpProcDied] Process lives  (PID:3216  HANDLE:440)
    waiting for termination of J2EE server
    NiWait: sleep (1000 msecs) ...
    NiISelect: timeout 1000 ms
    NiISelect: maximum fd=489
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Aug 09 12:15:54 2004
    NiISelect: TIMEOUT occured (1000 ms)
    [DpProcDied] Process lives  (PID:3216  HANDLE:440)
    waiting for termination of J2EE server
    NiWait: sleep (1000 msecs) ...
    NiISelect: timeout 1000 ms
    NiISelect: maximum fd=489
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Aug 09 12:15:56 2004
    NiISelect: TIMEOUT occured (1000 ms)
    [DpProcDied] Process lives  (PID:3216  HANDLE:440)
    waiting for termination of J2EE server
    NiWait: sleep (1000 msecs) ...
    NiISelect: timeout 1000 ms
    NiISelect: maximum fd=489
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Aug 09 12:15:57 2004
    NiISelect: TIMEOUT occured (1000 ms)
    [DpProcDied] Process lives  (PID:3216  HANDLE:440)
    waiting for termination of J2EE server
    NiWait: sleep (1000 msecs) ...
    NiISelect: timeout 1000 ms
    NiISelect: maximum fd=489
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Aug 09 12:15:58 2004
    NiISelect: TIMEOUT occured (1000 ms)
    [DpProcDied] Process lives  (PID:3216  HANDLE:440)
    waiting for termination of J2EE server
    NiWait: sleep (1000 msecs) ...
    NiISelect: timeout 1000 ms
    NiISelect: maximum fd=489
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Aug 09 12:15:59 2004
    NiISelect: TIMEOUT occured (1000 ms)
    [DpProcDied] Process lives  (PID:3216  HANDLE:440)
    waiting for termination of J2EE server
    NiWait: sleep (1000 msecs) ...
    NiISelect: timeout 1000 ms
    NiISelect: maximum fd=489
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Aug 09 12:16:00 2004
    NiISelect: TIMEOUT occured (1000 ms)
    [DpProcDied] Process lives  (PID:3216  HANDLE:440)
    waiting for termination of J2EE server
    NiWait: sleep (1000 msecs) ...
    NiISelect: timeout 1000 ms
    NiISelect: maximum fd=489
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Aug 09 12:16:01 2004
    NiISelect: TIMEOUT occured (1000 ms)
    [DpProcDied] Process lives  (PID:3216  HANDLE:440)
    waiting for termination of J2EE server
    NiWait: sleep (1000 msecs) ...
    NiISelect: timeout 1000 ms
    NiISelect: maximum fd=489
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Aug 09 12:16:02 2004
    NiISelect: TIMEOUT occured (1000 ms)
    [DpProcDied] Process lives  (PID:3216  HANDLE:440)
    waiting for termination of J2EE server
    NiWait: sleep (1000 msecs) ...
    NiISelect: timeout 1000 ms
    NiISelect: maximum fd=489
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Aug 09 12:16:03 2004
    NiISelect: TIMEOUT occured (1000 ms)
    [DpProcDied] Process lives  (PID:3216  HANDLE:440)
    waiting for termination of J2EE server
    NiWait: sleep (1000 msecs) ...
    NiISelect: timeout 1000 ms
    NiISelect: maximum fd=489
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Aug 09 12:16:04 2004
    NiISelect: TIMEOUT occured (1000 ms)
    [DpProcDied] Process lives  (PID:3216  HANDLE:440)
    waiting for termination of J2EE server
    NiWait: sleep (1000 msecs) ...
    NiISelect: timeout 1000 ms
    NiISelect: maximum fd=489
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Aug 09 12:16:05 2004
    NiISelect: TIMEOUT occured (1000 ms)
    [DpProcDied] Process lives  (PID:3216  HANDLE:440)
    waiting for termination of J2EE server
    NiWait: sleep (1000 msecs) ...
    NiISelect: timeout 1000 ms
    NiISelect: maximum fd=489
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Mon Aug 09 12:16:06 2004
    NiISelect: TIMEOUT occured (1000 ms)
    [DpProcDied] Process died  (PID:3216  HANDLE:440)
    NiIMyHostName: hostname = 'cgnlpt036'
    AdGetSelfIdentRecord: >                                                                           <
    AdCvtRecToExt: opcode 60 (AD_SELFIDENT), ser 0, ex 0, errno 0
    AdCvtRecToExt: opcode 4 (AD_STARTSTOP), ser 0, ex 0, errno 0
    DpConvertRequest: net size = 163 bytes
    NiBufSend starting
    NiIWrite: write 562, 1 packs, MESG_IO, hdl 5, data complete
    MsINiWrite: sent 562 bytes
    send msg (len 110+452) to name          -, type 4, key -
    detach from message server
    ***LOG Q0M=> DpMsDetach, ms_detach () [dpxxdisp.c   9927]
    NiBufSend starting
    NiIWrite: write 110, 1 packs, MESG_IO, hdl 5, data complete
    MsINiWrite: sent 110 bytes
    MsIDetach: send logout to msg_server
    MsIDetach: call exit function
    DpMsShutdownHook called
    NiSelClear: removed hdl 5 from selectset
    MBUF state OFF
    AdGetSelfIdentRecord: >                                                                           <
    AdCvtRecToExt: opcode 60 (AD_SELFIDENT), ser 0, ex 0, errno 0
    AdCvtRecToExt: opcode 40 (AD_MSBUF), ser 0, ex 0, errno 0
    AdCvtRecToExt: opcode 40 (AD_MSBUF), ser 0, ex 0, errno 0
    blks_in_queue/wp_ca_blk_no/wp_max_no = 1/300/8
    LOCK WP ca_blk 1
    make DISP owner of wp_ca_blk 1
    DpRqPutIntoQueue: put request into queue (reqtype 1, prio LOW, rq_id 19)
    MBUF component DOWN
    NiBufClose: clear extensions for hdl 5
    NiBufSetStat: bufstat of hdl 5 changed from OK to OFF
    NiICloseHandle: shutdown and close hdl 5 / socket 368
    MsIDetach: detach MS-system
    EsCleanup ....
    ***LOG Q05=> DpHalt, DPStop ( 2908) [dpxxdisp.c   8460]
    Good Bye .....

    Hi,
    Thanks for the reply.
    dboraslib.dll is properly installed - I checked the registry and physical location of the file.
    The problem was : Environment variable "Path" not being set properly for the "oracle jre".
    Solution:
    After setting the path, the dispatcher started to run properly without any problems.
    Path=<Drive>\oracle\ora92\bin;<Drive>\Program files\Oracle\jre\1.3.1\bin; <Drive>\Program files\Oracle\jre\1.1.8\bin
    FYI - We are using WIN2K with SP4 and oracle DB 9.2
    Regards,
    Sridhar

  • 'Structured' error handling and reentrancy

    The parentheses in the subject are due to the fact that I'm not using the Structured Error Handler reference library, but have rolled my own to do something similar but in the manner I want it to. I don't actually use the SEH (haven't even got it installed at the moment on this PC) so am not sure exactly how it works under the hood.
    I have a reasonably large application with a number of distinct parallel modules (GUI, state module, communication, motion control). The final parallel module is an error handling module. This consists of two queues - one for incoming errors, and one for outgoing actions. Errors are dequeued and their codes checked for their category (critical, warning, ignore or unclassified, for instance) and the appropriate category is returned to a local error handler via the action queue. When an error is passed to a local error handler VI, it enqueues the error to the main handler and waits for a response to that particular error.
    This all works nicely, in much the same way the SEH would do. However, with either the SEH or my local error handler method, I find myself wondering how often to place these down and the consequences of doing so. If they're non-reentrant, I imagine I may end up with lots of parallel processes sitting patiently to access the VI as it's blocked by another, causing jitter. If I go pre-allocated clone, I could potentially have many many callers using this function, which strikes me as a bit of a waste of resources. My gut feel is to go with shared-allocation clones, as the vast majority of the time it'll be no error passed through an empty case, and not to place them in absolutely every subVI - just perhaps after a state executes in the state handler, in all the parallel loops of the submodules etc.
    Just wondering what anyone else does with their error handling solution, and whether my thoughts make sense.
    CLD

    Having chatted to my friendly neighbourhood Spiderman Architect, he suggested I should probably just stop being a wimp and just use pre-allocated clones to avoid the jitter and to stop worrying about the resource hit, as you suggest
    I'll use the same code on both PC host and RT host, hence the jitter concerns on the RT.
    Thanks for the thoughts!
    CLD

  • Error handling in simulatenous loops

    I am trying to design a good error handling system for a project I am working on, but I have run into a "design" problem. I thought it would be good to ask for some guidance here before I sit down and start create the error handling system.
    I have more than one subVI started from one mainVI, each subVI with an individual while loop running (they all stop when I press the same stop button from the mainVI). Each while loop continously retrievews information from various serial devices. Each VISA call etc. can thus of course generate errors. I only want one error dialog box in my mainVI front panel displaying any error that happens.
    How would I design this in a good way? As I see it, I would have to use the error dialog box in the mainVI as a global/functional global. Each subVI would then write to this global error dialog box. This could however cause race conditions where only the latest error gets displayed even if earlier errors happened. Appreciate some good advice here.
    Solved!
    Go to Solution.

    First and foremost I would avoid using the sequence structure. LabVIEW is a data flow language and you should take advantage of that rather than forcing it to be a sequenctial language. Take a look various examples that ship with LabVIEW. You will want to definitely check out the examples for state machines and the producer consumer architectures. Your current code will not meet your needs of continually monitoring for errors since your "Error" queue is not in a parallel loop task.
    I have attached a very quik example of a producer consumer architecture with an error processing loop. There are no real code details but this is a simple example of an approach to take for an application. This along with the above examples should give you a decent starting point.
    Message Edited by Mark Yedinak on 10-05-2009 04:05 PM
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot
    Attachments:
    Simple Application Architecture (8-6).vi ‏13 KB

  • Database DLL error on editing the record selection formula?

    Post Author: Aravind
    CA Forum: Older Products
    Hi All,I recently edited the record selection formula of an old report and since then the report is issuing me an "Error detected by database DLL" error.The report was running fine earlier and still continues to run fine if I undo the changes. Earlier, the records were selected based on a 'date' field and I edited the formula to select records based on another date field, but the report doesn't work.The report runs fine on my local PC using Crystal Reports, but web based reporting fails with the error message. The data is selected from a view and the date parameters I talked about are the fields in the same view.This view has around five date parameters and the report runs fine for all of them, except one date field.Any pointers are appreciated.Crystal reports version is 8.5. Regards,Aravind.

    Post Author: DPowell
    CA Forum: Older Products
    Ah, yes, the good old generic date error.
    The problem is likely an invalid date value in one (or all) of your records with that field.  You don't say what database engine you are connected to or which driver you are using for the report, but I'll give you some "pointers".
    Basically, the SQL fetch has encountered an error in your date field and the driver you are using in the report can't handle it.
    A null date could cause that problem.  Also a date-time field with an invalid value or truncated time value.  A robust ODBC driver, like one of the Microsoft drivers might be able to overcome it.  Likewise, vendors frequently release updated drivers to improve error handling just like this.
    1.  Analyze your data, specifically the contents of the "new" date field you are using for some kind of invalid date.
    2.  Experiment with different ODBC drivers by creating alternate ODBC connections to the same database using different ODBC drivers.
    3.  Browse and experiment with options in Crystal Reports Properties that allow you to specify data conversions for NULLs and Dates.
    Good luck !

  • Error handler for event based messaging framework

    I've been very interested in using the event based messaging framework (described here http://forums.ni.com/t5/LabVIEW/Community-Nugget-2009-03-13-An-Event-based-messageing-framework/td-p...) for my next large application.
    My main concern is the fact that it seems like typos would be very difficult to debug since you need to ignore unknown commands to make this system work.
    To solve this problem I've been considering the idea of having a single message error handler VI which will store all valid commands and check all sent commands to see if they are valid.  Each VI would send out a register message on startup with their name and all messages they can send and receive.  The message error handler would store these and then check all future messages to be sure it is a valid message, throwing an error if it is not.
    My basic problem is this: for this to work the message error handler VI would have to be started before any messages are sent so that it can capture all the register events.  If this is a VI that will be continuously running the entire application how can I ensure it starts first since I cannot wait for it to complete? (I.e. the usual method of running an error out wire or using a sequence structure will not work since everything will then wait for it to complete which will not happen until the program is ready to shut down)
    I'm assuming the answer might be to use an asynchronous call but I'm not very familiar with this method.  
    Any help is appreciated.  Thanks. 

    Could you just use the error handler as a subVI inside a case structure that is only called when you have new message to be checked? I'm not sure I understood the exact functionality you are looking for, so sorry if this does not apply.
    Zach P.
    Product Support Engineer | LabVIEW R&D | National Instruments

  • Error handling in the LVWebUIBuilder

    Impressive stuff.
    I don't see any error handling mechanisms in the LVWUIB.  Are they there, and I'm missing it?
    Thanks,
    Joe Z.
    Solved!
    Go to Solution.

    Hi Joe,
    With the error cluster, you can use the Unbundle Error function (http://zone.ni.com/reference/en-XX/help/373286A-01/uibuilderref/wuib_unbundle_error/).
    To add error handling to your subVIs, you need to create error terminals from any function that has error inputs and outputs.  Then, select the View tab and click SubVI Settings.  From there you can add error in and error out terminals.
    You can create error windows using the Display Debug Assert function (http://zone.ni.com/reference/en-XX/help/373286A-01/uibuilderref/wuib_display_debug/):
    Note that I have to invert the error boolean to make the dialog pop-up.

  • Custom Error Handling

    Hello,
    I would like to create a custom error handler in a model file similar to the ErrorHandlerExample.seq.
    In my case, I will be handing errors genereated in several different dlls.  We are trying to avoid writing wrappers around the dll functions to fill in the TestStand error strings.  However, this information is available by calling a "get error message" function in the dll.  Since I have more than one dll and more than one handle that I will need to check the errors for, I need to know the information about the step that caused the error.  Is there a way to get more information about the step that caused the error?  I might have a dll function call that had the format: 
    kiOpenVSA(StationGlobals.KiManager, StationGlobals.VsaSession, StationGlobals.VsaResourceString, StationGlobals.DisplayEnable, StationGlobals.SendInitCommands)
    Based on the parameters of the function call, I would be able to call the correct error handling function.
    Thanks,
    Mike
    Solved!
    Go to Solution.

    Hi Mike,
    If you want to pragmatically get the name of the DLL file, DLL function and parameters that were called in a previous step, you will first need to reference the step in which the DLL call was made and use the following TestStand API.
    Assuming that the DLL was called in the previous step you can use the following expressions using TestStand 4.1.
    Access the dll function expression
    RunState.PreviousStep.Module.CommonCModule.FunctionCall
    Access the dll function name
    RunState.PreviousStep.Module.CommonCModule.FunctionName 
      Access the parameters
    RunState.PreviousStep.Module.AsDllModule.Parameters.item(index)
    Note that if you are using an older version of TesStand, these functions may not work and you may have to use the ActiveX/COM steps to access this information.
    I hope this helps.  
    Message Edited by S_Hong on 02-10-2009 05:02 PM
    Message Edited by S_Hong on 02-10-2009 05:07 PM
    S_Hong
    National Instruments
    Applications Engineer

  • TestStand sequence error handling

    I have a sequence which calls DLL steps and subsequencies (which also call DLL steps). I would like to know which is the best way to handle DLL error return values. My DLL's return non-zero values on error and also error message string.
    I have configured all my DLL steps as Actions. In the "Post Action" of each DLL step I have set a custom condition: "If Locals.status != 0 Goto destination (end_ERROR)". In each of my sequence I have end_ERROR and end_OK labels at the end. In the end_ERROR block I store the DLL numeric error code and error string to StationGlobal variables (StationGlobals.system_error and StationGlobals.error_msg), which I then display in the Cleanup Group of my main sequence, if StationGlobals.system_error != 0.
    My prob
    lem is basically this: How can I tell the end user the DLL step name which returned error code, and also tell in which sequence the error occurred. Currently I only get error codes and strings from DLL's but there will be so many DLL calls, so knowing the exact location would be usefull.
    I am not sure whether this is the most pratical way to do this. Are there any built-in mechanisms in TestStand to do this? Should I change my DLL steps to Pass/Fail Tests? There seems to be TestStand property RunState/PreviousStep? Maybe I could somehow use this in my end_ERROR label to check where the error occurred.
    Any help would be greatly appreciated.
    BR,
    Timo Sakari

    I'm not sure of the prototype of your dll functions as far as how the error code and message are returned, but there is an easier solution that involves the use of built-in properties of the action steptype.
    When you are "specifying the module" of a DLL Flexible Prototype Adapter step, you can specify that the return value or any output parameter (those passed by reference) can be assigned to the Step.Result.Error.Code property value. You can also specify that if this value falls within a predetermined range it will cause the Step.Result.Error.Occurred boolean value to be set to true. If this property is set to true, the specific step will be marked as causing an error in the report and the error message will be reported to the user as it happens. If you want to
    see examples (including DLL source code examples) that are structured to more efficiently use these properties, take a look at the examples C-DLL based examples in the \Examples\AccessingPropertiesAndVariables.
    For more information on using the DLL Flexible Prototype Adapter (more specifically the parameter settings mentioned above), take a look at Chapter 13 of the TestStand User Manual (available via the Sequence Editor's Help menu).
    Jason F.
    Applications Engineering
    National Instruments
    www.ni.com/ask

  • How to disable the LV error handler?

    I want to disable the LV error handler, im my application if an error happens i use a case structure to handle it.
    how can i do?

    青风细雨楼 wrote:
    I want to disable the LV error handler, im my application if an error happens i use a case structure to handle it.
    how can i do?
    Once you wire the error output of your function, automatic error handling is no longer relevant. That setting only matters for subVIs where you don't wire the error output.
    Just take the error output and wire it to the selector terminal of the case structure. You'll get an "error" and a "no error" case. Place appropriate code in each case so it act like you want it to.
    LabVIEW Champion . Do more with less code and in less time .

  • Execution properties, Enable automatic error handling

    Hi
    I am writing real-time code for standalone execution on a cRIO-9074.
    If I untick the "Enable automatic error handling" option in VI properties (Execution), what is the consequence if I have an application with no error handling case structures to detect the occurrence of errors elsewhere and within subVI's ? Does the error just go undetected and the application continue regardless? If ticked, could a standalone application hang as there is no user-interface for the error to get reported automatically to? Can I configure the LabVIEW RTE to automatically handle errors in a certain way regardless of individual VI settings of the "Enable automatic error handling" option?
    I am a bit confused by the usefulness of "Enable automatic error handling" within RT/FPGA code, and where in the development process it is best enabled then disabled (if necessary).
    Thanks

    If I untick the "Enable automatic error handling" option in VI properties (Execution), what is the consequence if I have an application with no error handling case structures to detect the occurrence of errors elsewhere and within subVI's ? Does the error just go undetected and the application continue regardless?
    That's the case: the error is lost (i.e. it's not handled), and the application goes on.
    If ticked, could a standalone application hang as there is no user-interface for the error to get reported automatically to?
    The property "Enable automatic error handling" is not availabe in the run-time engine, so there's no automatic error handling in a built application,
    Can I configure the LabVIEW RTE to automatically handle errors in a certain way regardless of individual VI settings of the "Enable automatic error handling" option?
    No, for the reason stated above.
    I am a bit confused by the usefulness of "Enable automatic error handling" within RT/FPGA code, and where in the development process it is best enabled then disabled (if necessary).
    There's no "Enable automatic error handling" property in Labview RT either.
    Regards,
    Marco

  • Advanced Error handling

    Hi all,
    I am developing an error handling system for an extensive LabView application, unfortunately I can't  call it's purpose due to confidentiality.
    I just graduated for my university degree in Applied Physics, and therefore I am pretty experienced with LabVIEW (got core 1,2 and 3).
    The used synchonization technique is a queue-operated producer/consumer  handler. The testing set-up consists out of the following hardware:
    - Keithley 2700 multimeter
    - A Stanford SR830 Lock-in
    - PI-Mercury 863 (Z-stage controller, for moving up and down)
    - NI DAQ 6244
    My Question is:
    How can you make sure that you cover most errors with your error handling application? What would be a correct approach to find all possible errors that could occur during a measurement?
    For example: I could disconnect the K2700 and start the application, then a VISA error is most likely to occur. Besides that I could disconnect the power supply of the hardware and start the application and see which error would occur then.
    Is there some general kind of rule of thumb to find the possible errors which could occur in the set-up?
    Thanks for your reply in advance.
    Cheers,
    San
    Solved!
    Go to Solution.

    Aha! Found it: https://decibel.ni.com/content/docs/DOC-20726
    I think that was the presentation that I was trying to find earlier as it gives some information about actual strategies for dealing with errors and reporting them versus just how to wire up error wires and the general error handler.
    As for your reply, you need to think about grouping sections of code and say to yourself "what should happen if an error occurs here?". You will probably end up identifying gating points in your code (e.g. at the end of a case)
    As a couple of examples:
    - During initialisation, if a device fails to initialise, should you retry and if so, how many times before giving up? Should you let the user attempt to reconfigure the device
    - If you're using a queue based architecture and the reference gets destroyed
    You end up having to analyse your code and saying "What if....?" a lot!
    I think the errors boil down to something like the following:
    - Critical application errors: A terminal error caused by a software bug such as accidentally releasing a reference to a main message queue. In this case you have to shut-down the software but you should report or log some information to help you debug the issue remotely!
    - Device errors: Failed to initialise, device not present, lost connection, incorrect configuration - the software can't operate normally but maybe you could keep trying to re-initialise or allow the user to try to change settings rather than exit the application.
    - User errors: User has misconfigured something such as entered an invalid path or selecting an incorrect file (type, format etc.) - in this case you should probably notify the user and let them try again.
    - Known errors: errors that you expect might occur such as creating a folder that already exists - these would usually be ignored or handled in a case structure. Another example of this is errors out of 'close' subVIs in your exit case (the device might never have initialised or may have already shut down)
    You'll never be able to catch every single error (and it's not possible to see all errors a VI might produce and you may want to generate your own errors) but you should try to properly handle (& rectify) errors that are more likely to occur (such as lost connection to a device because someone tripped over a serial cable) and leave the other errors to your general handler.
    You also want to think about the experience for the end user of your software - something that the presentation linked above mentions. Chances are that the average user isn't going to be able to understand LabVIEW error codes and will be disappointed if the software just shuts down on launch because a device is missing. 
    There is no holy grail of error handling/reporting - it's something I'm always reading/learning about and try to apply that as much as I can in my applications!
    Certified LabVIEW Architect, Certified TestStand Developer
    NI Days (and A&DF): 2010, 2011, 2013, 2014
    NI Week: 2012, 2014
    Knowledgeable in all things Giant Tetris and WebSockets

Maybe you are looking for

  • Remove White Space in JSP in Websphere 5.1

    I am look for a way to remove all the white spaces generated in all the jsp pages. Since I am not using Jsp 2.1, <%@ page trimDirectiveWhitespaces="true" %> doesn't work. Please help.

  • DropDown Menu Script Question

    Real Simple, if "United States" is chosen on my dropdown, I would like a certain textbox to dissappear. I have tried all of these syntax, but nothing will work, please help: if(xfa.event.newTexT == 'United States'){ txtTempID.presence = "hidden"; or

  • Illustrator CS6 (Mac) crashes when opening large documents with drop shadows

    I have a Macbook Pro ver. 10.6.8 i7 Core, 8 Gb Ram, and I am running Adobe Illustrator CS6. I have a document that is 18" x 42" and contains drop shadows. It was created using CS6. When I apply a graphic style (gradient and drop shadow) It has a prog

  • 6G iPod Nano Volume Spike Issue

    I tried checking the thread on this matter but could not find any discussion on it.  I noticed that there is a sudden spike in volume particularly when switching from one song to another.  This can happen when double clicking any iPod compatible earp

  • Planning Job Aggregation Level

    I am running a Background Job (Univariate Forecast Profile).  My Selection Profile excludes 3 single values can I still run the model at this level of aggregation "total" excluding those 3 single values.  Running the model at the Total should be more