Instrument LabWindows DLL in memory DLL handles

I am rewriting some of the software of test of production for the company I work for. Development requires that I rewrite all instrument drivers placing them in a DLL. Then I re-wrote the functions test placing them in another DLL. Adding to what they were doing is adding TestStand to call the test functions in the desired sequence. The old code used the old sequencer LabWindows years ago. They insist to use the GPIB function calls rather than allow me to use the generic viWrite, viRead.

I developed the instrument drivers so that the driver keeps track of the handles. Which worked find when I test the test functions LabWindows calling the functions of the unit. However, I have problems when calling thanks TestStand test functions. I put my instrument driver code to see what is happening MessagePopups. I see that the handle is here sometimes and not others. I guess that maybe TestStand create different instances of the code of the DLL (?). Anyway, I have add a pragma to see if that would cure the issue.

struct AC_Power_Config
{
int ACPower_Device;
int ACPower_GPIB_BoardIndex;
int ACPower_GPIB_PrimaryAddress;
int ACPower_GPIB_SecondaryAddress;
int ACPower_GPIB_IOtimeout;
int ACPower_GPIB_EOImode;
int ACPower_GPIB_EOScharacter;
};
//
#if defined (__AC_POWER_SUPPLY__)
#pragma data_seg ("AC_POWER_SHARED")
//
int ACPower_GPIB_Handle = - 1;
struct AC_Power_Config AC_Power_Configuration;
//
#pragma data_seg()
#pragma how (linker, "/ section: AC_POWER_SHARED, RWS")
#endif

He did not. I don't know if I ironed the handle to TestStand to follow the handles if the handles would continue to operate.

Are there instructions I put in my code LabWindows or some link that I can use to make sure that the handles are maintained in the area of DLL memory and options that all the function calls reference this memory? Any thoughts on the best way to deal with this would be appreciated. Although the change in the overall design (TestStand for DLL DLL) cannot be done.

Thank you

Hi Bill,

I'm sorry to hear that you run in it, it seems like a strange behavior. Just to clarify, when you say "I see that the handle is here sometimes and not others" do you mean behavior varies according to the different tracks of the sequence or in a single pass, some handles are there, but others are not?

Also, what do you call the DLL? I don't know if you have seen this already or not, but this KB can be useful in ensuring that it is no more than one instance of the DLL in memory at the same time:

"Several Instances of dll or the sequence in memory files are possible with TestStand.

http://digital.NI.com/public.nsf/allkb/6E1FF9F8EB5DCC0086256944004B90B0

Tags: NI Software

Similar Questions

  • Place the dimension table of DLL handle size

    Hello

    What is the correct way to handle the transition matrix dimensions, I found this document, outlining only the memory and situation examples that indicate the following two possibilities:

    typedef struct {}
    dimSizes [measures]
    ArrDatatype data [1];
    } Array * ArrayHdl;

    or this one:

    typedef struct {}
    dimSize1 of Int32;
    .
    .
    .
    .
    dimSizeX of Int32;
    ArrDatatype data [1];
    } Array * ArrayHdl;

    Bublina wrote:

    Hello

    What is the correct way to handle the transition matrix dimensions, I found this document, outlining only the memory and situation examples that indicate the following two possibilities:

    typedef struct {}
    dimSizes [measures]
    ArrDatatype data [1];
    } Array * ArrayHdl;

    or this one:

    typedef struct {}
    dimSize1 of Int32;
    .
    .
    .
    .
    dimSizeX of Int32;
    ArrDatatype data [1];
    } Array * ArrayHdl;

    They are equivalent, except that the int32 has been forgotten in the first!

    And a comma in the declaration of type for both!

    Personally, I tend to use the other, but never did more 2D pictures. For multi-D arrays, the first can be interesting if you get to make a loop on the dimensions of the matrix somehow.

  • With Dll handling table

    Hello everyone

    I did a dll with labview and I call the DLLs in labview only

    I gave a table of entry and an exit table to the connector pane and made this feature as a dll by adding 100 to the input to the internal array.

    But when I called this dll in another vi It shows input, output, len next to the entrance and the entrance 2, exit 2, len 2 at the end

    But I expect to have a single entry, len and output

    Please see the attached code

    Thank you

    This corresponds to the way you set up the function prototype in the specification to build for the library. For the desired behavior, in the specification of the DLL build, modify the prototype of the function so that the parameter is an output parameter as shown below.

  • MBAM put in quarantine the file daisymread.dll by mistake that would hurt Firefox?

    Back on July 27, my scans in Malwarebytes Pro real-time found what he thought, it was a Trojan horse, so I put in quarantine it but after I did a reboot of my PC and browsers have been slow and buggy, but fortunately there was a .net for Windows was updated the next day so I think that probably repair this file but what about Firefox is possible that it has been damaged since the daisymreader.dll handles browsers if remember correctly.

    This is a false positive by Malwarebytes. According to the next post, this file is «...» File Visual Studio debugger for .NET that unless you are a programmer... you'll use [n] never directly... »

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

  • LabWindows 2015 Titlebar UIR classic and not shown as classic Panel

    LabWindows/CVI 2015, complete development system, Version 15.0.0 (413)

    In my test code, I put in a DLL to call from TestStand, I a UIR displayed when I need the user to return a switch on the test station. I have the title bar of the Panel, established in the Visible and the classical style. Which seems, in the LabWindows/CVI development window, with the title centered at the top of the Panel. However, when I have the window that appears, by using either an executable LabWindows or LabWindows DLL function call to TestStand, the Panel is not displayed as classic. The title is left justified at the top of the window. The code, indicators and controls work fine. It all works on a functional level, I prefer the look of the Classic (centered title) sytle.

    Is there some files that I need to include in the project / linker to have the Panel located in the classic style?

    NOTE:

    If you're wondering what I did to the uir:

    I realized, after removing the code that is not relevant to this discussion, the code that I use. The IUR is a laminated board. For the rings around the switch, I have layered the outer ring, inner ring and then the switch (up and down). For the text, I created a text box to place text inside. I could not determine just how to put text on the screen without using a text box. However, I couldn't put the framework of text box to zero or change the color. So I placed a decoration of chassis on the text box frame and changed the color of the background color decoration to give the illusion that the framework of text box is not there. When I run the code, although the text boxes have been defined as indicators, when the user has placed their mouse on the text box, the box would move slightly and highlight the text or the framework for this kind of thing. The user could not change the data, but it annoyed me. To get rid of it, I placed a decorative box on all of the panel layout interior color to transparent. In this way, said he layered on the text boxes so that text boxes don't behave oddly. Finally, I put the control in FACT on top of that, so that the user could say the test program when the switch of the test station has been configured according to the needs. Also, the omega symbol uses the value transparent background image control.

    Unfortunately, the classic title bar, is visible (observable) for signs of the child only. For parent panels, it is the Windows setting that determines the display of the title bar.

  • Qosmio G30 (PQG32C) - support for the memory of the 3.90 BIOS

    Hello

    I wonder what type of memory can handle my Toshiba with the new BIOS 3.90. Repair said I can put DDRII 533 and 667 MHz only. My new BIOS will manage with DDRII 800 MHz or 1066 MHz? Description of the BIOS says nothing.

    Exactly what are the models of memory you prefer for G30 (GoodRAM, Kingston, G.Skill, Kingmax, Samsung, Hynix, Patriot)?

    Hello

    Update BIOS doesn t affect the handling of the RAM modules. This will be controlled by the chipset and motherboard and the new BIOS doesn t support newer or other RAM modules.

    On the different modules of RAM I have good experience with the modules of Kingston. This module s high-quality and is compatible with most laptops. I never had a problem with them.

  • M30 - upgrade memory

    Hello

    I wanted to add more memory to my Satellite M30 841. It came with two 256 MB 2700 (333 MHz) modules installed.

    I was hoping someone can help me find answers to some questions about an upgrade of memory:

    1. can you my memory laptop handle 1 024 MB (2 GB of RAM total)?
    2. can I use my laptop with one memory module (ie. just one of the two slots occupied)? Memory required old jobs to be added in pairs.
    3. in addition, I can't install 2 sticks of memory of different capacities / manufacturers? For example, could I keep one of the 256 MB modules and replace another with a 512 or 1 024 MB module?

    I still don't know if I want to replace the bars with two 512 MB 256 MB or two modules of 1 024 MB, or if I want to just replace one of the 256 MB with a 1 GB module modules.

    Thank you in advance for your time and help,

    Felipe Blanco
    [email protected]

    Hello

    Just for info. For your laptop model, you can use this RAM module:
    512 MB (PA3312U - 1 M 51)
    1024MB (PA3313U-1M1G)

    You can find them on http://eu.computers.toshiba-europe.com under options of products & accessories.

    Good bye

  • Conversion of a driver to labview labwindows

    http://sine.NI.com/apps/UTF8/niid_web_display.download_page?p_id_guid=E3B19B3E9628659CE034080020E748...

    I try to convert the driver on the link above for labview labwindows (8.5) and I'm doing it via the tools--> instrumentation---> interface VI create driver Instruments LabWindows/CVI.

    If I select "basic" to perform the conversion, I get an error message saying that it is not a file valid .fp or the version of the file is too low.

    On the site he lables the driver as being of labwindows/CVI version 6.0, who worked for before conversions.

    If I select 'Advanced' I notice that although the .h file is present, it is NOT the .sub file.

    My trial version of the CVI has expired, if I uninstall and reinstall I'll be able to generate a .sub file?

    Or is there another way to make the driver work?

    Hello Lars,.

    I saved the CVI 2010 .fp file and now the error disappeared when using the wizard. Attached is a fixed zip file.

    Concerning

    Mart G.

  • -1074130544 the session handle is not valid.

    I'm using LabView 2011 on Win7.

    I'm working my way through the part of the "verification Procedure" of the "NI PXI-4071 calibration procedure.  Step 3 of the "Call the niDMM Reset VI." verification procedure and display Figure 1. The device, the NI PXI-4071, OK appears in NEITHER-MAX (Figure 2) and works well with the program 'NOR DMM Soft Front Panel'. When I run what I think is the correct code, the error 1074130544, "the session handle is not valid." appears. The BD and FP are shown in Figure 3.

    Hi Ed,

    If you want to call niDMM Reset, you will need to provide a descriptor of instrument rather than a descriptor of instrument.

    To start a session to your DMM and generate a handle of the instrument that you can use with other functions OR DMM, you must first call niDMM to initialize or niDMM initialize with Options.  You can wire the 'Dev1' to pin 'Descriptor of Instrument' and the function returns a handle of the instrument.  You can then wire the "instrument handle" PIN to pin "handle of the instrument" on the Reset niDMM VI.  Whenever you initialize a session to an instrument, it is also to close the session by plugging in the handle of the instrument to a function niDMM close .  The code snippet below shows what I described:

    I have also included a Simple VI of error handler to report all errors that occur.

    In addition, it seems that if you call niDMM reset with the default values instead of niDMM reset.  If you have not assigned any of the default values user defined logical name calls then both of your device should be functionally equivalent.

    If you make these changes, you should no longer generate the error.

    Good luck!

  • Max amount of memory

    I was wondering what is the maximum amount of memory, you can add to windows xp. I get the "WARNING os paged pool memory low" so I need to upgrade, but I do not know the max that I can put in. I have 4 GB and I would get 8Gb

    Physical memory limits: Windows XP

    The following table specifies the physical memory limits for Windows XP.

    Version Limit in 32-bit Windows Limit in 64-bit Windows
    Windows XP

    4 GB

    128 GB

    Windows XP Starter Edition

    512 MB

    Does not apply

    Published on April 25, 2005 byMicrosoft Edition of Microsoft Windows XP Professional x 64 is a variant of the Windows XP operating system for computers personal x 86-64 .

    Windows XP Professional x 64 edition uses version 5.2.3790.1830 of core files, the same version used byWindows XP 64-bit edition 2003 and Windows Server 2003 SP1, because they were the latest versions during the development of the operating system. It is designed to use the expanded memory 64-bit address space provided by the x 86-64 architecture.

    The main advantage of switching to 64 bit is the maximum increase of the system totalmemory (RAM). Windows XP 32 bit is limited to a total of 4GB, which is, by default, evenly distributed between theWindows kernel and application use. Using the/3 GB switch in the boot.ini file will force Windows to limit the kernel to the superior of 1 GB and offers up to 3 GB for applications. Windows XP x 64 can support much more memory; Although the theoretical limit than a 64-bit computer memory can handle about 16 exbibytes (16 billion Gibabytes), Windows XP x 64 is currently limited to 128 GB of physical memory and 16-bit virtual memory. Microsoft argues that this limit will be increased to improve the hardware capabilities

    Published on April 25, 2005 byMicrosoft Edition of Microsoft Windows XP Professional x 64 is a variant of the Windows XP operating system for computers personal x 86-64 .

    Windows XP Professional x 64 edition uses version 5.2.3790.1830 of core files, the same version used byWindows XP 64-bit edition 2003 and Windows Server 2003 SP1, because they were the latest versions during the development of the operating system. It is designed to use the expanded memory 64-bit address space provided by the x 86-64 architecture.

    The main advantage of switching to 64 bit is the maximum increase of the system totalmemory (RAM). Windows XP 32 bit is limited to a total of 4GB, which is, by default, evenly distributed between theWindows kernel and application use. Using the/3 GB switch in the boot.ini file will force Windows to limit the kernel to the superior of 1 GB and offers up to 3 GB for applications. Windows XP x 64 can support much more memory; Although the theoretical limit than a 64-bit computer memory can handle about 16 exbibytes (16 billion Gibabytes), Windows XP x 64 is currently limited to 128 GB of physical memory and 16-bit virtual memory. Microsoft argues that this limit will be increased to improve the hardware capabilities

  • p6670t memory

    The amount of memory can handle my p6670t?   I want to put in 16 GB, but I read somewhere that it allows only 8GB.

    Someone at - it a response?

    Hello @gregw54,

    Welcome to the HP Forums, I hope you enjoy your experience! To help you get the most out of the Forums of HP, I would like to draw your attention to the Guide of the Forums HP first time here? Learn how to publish and more.

    I understand that you are looking to upgrade the RAM in your HP Pavilion p6670t desktop PC. I provided you with a link to the HP Pavilion p6670t product specifications and configurable Options which indicates specifically that your computer Maximum memory: 16 GB (4 x 4 GB) (64-bit OS) or 4 GB (4 x 1 GB) (32-bit operating system).

    So you can improve your system with 16 GB of RAM as long as you use a configuration 4 x 4 GB.

    I hope that I have answered your question to your satisfaction. Thanks for posting on the HP Forums. Have a great day!

  • help upgrade memory for laptop

    I'm trying to understand the amount of memory can handle my notebook?

    I have a small plus (2009) laptop HP Pavilion entertainment dv4t-1400, I originally bought for writing. He came with, and currently, 4 gigb of memory.

    is the product number: LV 244AV

    Whenever I go to one of the recommended sites to check the upgrade memory, I don't see my model in the list, so I don't know if this means that his already maxed out at 4 or not?

    I want maximum memory for more speed for now and its too slow, I installed PhotoShop CS6.

    Thanks for any assistance, Lily Marie

    I had already tried and did not find my phone model, but I tried again and this time I called them and they helped me to understand. pays the persistence, 2 slots, 8 GB thanks, now to install

  • How and when Berkeley releases the memory of the key and data?

    Hello
    even if I just posted a question a few days ago, I couldn't find an answer to these questions in the docs of Berkeley or the Internet:

    Berkleley Db releases data that are transmitted to him with the key or the objekt data?
    When is it free?
    How data in the secondary databases that points directly to the primary of the base and do I need to copy managed?

    It would be nice to have some answers, because it's hard to write something with little memory use when you do not know how the memory is handled.

    Yes, of course, you can delete "buffer", it's your memory in your process space. It can be deleted or changed in any way you want in your application. The contents of the 'buffer' in your code snippet went to db 'put', it is up to you to do what you want to do with "buffer" and the memory associated with it.

    Debsubhra Roy

  • CanvasClear causes the application crash

    I use a simple rectangular control canvas with movement indicator (Vshape) that displays the currently measured value.

    The value is updated 10 to 14 times per second, and deliberately, I made these values fluctuate.

    The canvas is filled with gradient colors (5 ranges) and the indicator moves upwards or downwards. In order to redraw the indicator,

    I use CanvasClear with the VAL_ENTIRE_OBJECT attribute and then redraws its content.  A few days ago, I noticed,

    that the software crashed, when the Panel containing the canvas control, was behind another window (belonging to an another SW

    tell the programmers Notepad or msword). I was able to reproduce the crash, which occurred immediately, but

    After that the software worked anywhere from 0.5 to 5 hours and the questionable control was behind another window.

    I also have seen, before the accident, if I move the window covering away from the canvas control, rectangle covered

    becomes black (break in non-se mode, it remains white) and it takes several seconds to redraw the partial region.

    Sometimes I noticed irregular elements (a diagonal line, not planned, from the left corner down to the right).

    Labwindows2010 IDE always shows crash-point as a call to CanvasClear().

    None of the functions, manipulating the canvas control, the return of negative values, because the software checks to see if it and if found newspapers a

    appropriate message. The canvas control has to draw political as mark for update.

    Does anyone has an idea how to everyone such instability or how to solve this problem?

    I was also able to capture the call stack and dismantling:

    Unhandled exception at 0x6850226E (cvirte.dll) in sw_dbg.exe: 0xC0000005: breach of access writing location 0 x 00000000.
    6850226E

    68502258 or eax, 0C00h
    6850225D mov dword ptr [esp + 50 h], eax
    fldcw 68502261 word ptr [esp + h 50]
    fistp 68502265 dword ptr [esp + h 50]
    movzx 68502269 eax, byte ptr [esp + h 50]
    6850226E mov byte ptr [esi], al / / the esi content is 0
    movzx ecx 68502270, byte ptr [edi]
    fldcw 68502273 word ptr [esp + h 54]
    68502277 imul ecx, ebx
    6850227A mov dword ptr [esp + 50 h], ecx
    6850227E fild dword ptr [esp + h 50]
    68502282 fdiv qword ptr ds: [68802D40h]
    68502288 fadd qword ptr ds: [68802D38h]
    6850228E ptsps qword ptr [esp]
    68502291 call 687D 5950

    Call stack:

    cvirte.dll! (6850226e)
    [Frames below are may be incorrect and/or missing, no symbols loaded for cvirte.dll]
    cvirte.dll! 684d149c)
    cvirte.dll! 687b036c)
    cvirte.dll! 687b09c2)
    cvirte.dll! 684d9759)
    cvirte.dll! 684d9981)
    cvirte.dll! 687b 5850)
    cvirte.dll! 687bc167)
    cvirte.dll! 687bd40f)
    User32.dll! 7674c4e7)
    User32.dll! 7674c5e7)
    User32.dll! 7674c590)
    User32.dll! 76744f0e)
    User32.dll! 76744f7d)
    ntdll.dll! 779c6fce)
    User32.dll! 76744ec3)
    User32.dll! 76741be4)
    User32.dll! 7673ffcd)
    cvirte.dll! 687c13c1)
    cvirte.dll! (68483419)
    cvirte.dll! (68722687)
    cvirte.dll! (68729882)
    cvirte.dll! 68525b8b)
    cvirte.dll! 686042a 6)
    cvirte.dll! 6846d7dd)
    cvirte.dll! 68557bcc)
    sw_dbg.exe! (00402470)

    Sorry for the delay in response. I followed a red herring for a few hours when troubleshooting this. It turns out that this could have been resolved much more quickly using the resource followed in CVI. If you have the full development system, you can change the compiler Options > debug to cabins lying level and then open the window > Resource Tracking. This will show you all the memory and handles your code currently open. It will appear when the elements are created, changed, or destroyed. Looking at it when your application is running (you need to suspend execution at a breakpoint to see the tracking of resources), you will see that the program continues to create plots that belong to the curve of the COLORSCALE. It is your intensity graph. If you look at using the function for PlotIntensity, he recalled in a note that a new trace is created every time that you call this function, and you want to get rid of these plots with DeleteGraphPlot.

    You can add something like this in InitScaleData.

    if(plotHandle != 0)
    {
            DeleteGraphPlot (IndicatorPanel(0), IND_COMP_COLORSCALE, plotHandle, VAL_DELAYED_DRAW);
    }
    plotHandle = PlotIntensity (IndicatorPanel(0), IND_COMP_COLORSCALE, scaleArray, 2, OGL_SCHEME, VAL_DOUBLE, gColorMap,gColorMap[OGL_SCHEME-1].color, OGL_SCHEME, 1, 1);
    

    I don't think you run necessarily in a memory problem here throwing the parcels. Intensity plots use rather a small number of GDI handles. In Windows Vista and 7, the number of GDI handles is limited to 10,000 by a Windows registry key. I look at the number of open GDI handles in the process Explorer reveals that 10000 handles were open when the application crashed on my system after about 45 minutes of execution.

    Let me know if it works if you have a chance to try this solution.

  • Connections Rs232 multi

    Hello

    I have developed a small test bench equipment controlled by RS - 232. The trial will be done with TestStand and LabWindows. I want to use several RS-232 ports that communicate with Labwindows (dll). I want to know if is possible to keep these connections open simultaneously, or can not do this. If we succeed, do you recommend this method or it is best to open and close a connection whenever I order the material.

    Thank you

    Hello

    I have a Setup with 32 serial ports (via maps OR). As a general rule, all available instruments are in communication with the software, timer controlled (note their status on a time scale of 10 to 60 seconds). This should answer your first question: Yes, you can have several ports simultaneously.

    Regarding your second question: in my application, ports are kept open until the instrument is closed. However, I can not answer, if it is better or worse than the reopening of the port each time...

    Hope this helps a little,

    Wolfgang

Maybe you are looking for