How to make a driver using DLL in LabVIEW?

I had followed the "Using Exteranal Code in LabVIEW" manual having finished the making dll file, and the lsb file(I attempted that two ways). But when I load the code in LabVIEW, it can't work. I don't know what had happened, I only got a error message like this:"'0x100014f1'commond call memory'0x00000000',this memory can't be written" or other similar error message, if I push the "enter" button, the vi application which I having lunched will crash. If I push the "cancel" button, the debug model will start,and the next message is "Unhandle exception in LabVIEW.exe(MSVCRTD.DLL/LVS95.TMP/COUNTER.DLL(the last one is creat by myself)):0xC0000005:Access Violation", but I wonder what had cause this? My DLL had been made successf
ully under the VC++6.0, why LabVIEW can't call it fluently? How to make a driver for my own device using LabVIEW? How to correct my error to finished my hole work? Thank you very much. Jacky Wei
Attachments:
counter1.rar ‏33 KB

1. Can you call this DLL from within VC?
2. What operation system do you use? There may be a problem with calling of win95 dll under NT or win2000 for example.
3. If you use NT you may not have permissions to work with some ports and memory areas.
4. Under NT or win200 try to compile the library as a 32-bit dll, and under win95 - as 16-bit one.
Good luck.
Oleg Chutko

Similar Messages

  • How to make load simulator using labview 2010

    i want to ask how to make load simulator using labview? 
    Solved!
    Go to Solution.

    what have you tried so far? and exactly what is it your tying to do?
    Please remember to accept any solutions and give kudos, Thanks
    LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7

  • How to use dll in Labview ?

    I compile this code to dll file with VC++2010 filename is test_dll.dll .
    #include "stdafx.h"
    #include <iostream>
    #include <Windows.h>
    using namespace std;
    int main(int a){
        cout << "Test dll...............\n";
        return a;
    After that, I put Call Library Function node in editor and double click Call Library Function node. I browse test_dll.dll into Library name or path and set function prototype to int32_t main(int32_t a); but it show error Call Library Function Node 'test_dll.dll:main':function not found in libraly. How to use dll in Labview ?  And I have more question is what is differrent from Tools -> Import -> Shared Library(.dll) and use Call Library Function node.
    Solved!
    Go to Solution.

    The issue you are having is that LabVIEW is not capable of using C++ DLLs directly. It only handles C DLLs. This does not mean that if you you cannot use the DLL if it's compiled with the C++ compiler as opposed to the C compiler. Rather, it means that you must take extra steps in order to use it from LabVIEW. The primary issue is that of name mangling or adornment. This is discussed here: http://zone.ni.com/devzone/cda/tut/p/id/4877. Basically you need to prepend extern "C" in front of your prototypes in your header files. I would also suggest reviewing this article: https://decibel.ni.com/content/docs/DOC-14564.

  • How to make RC circuit using labview

    Hi,
    how to make RC circuit using labview... Thx

    Your question seems awfully similar to this thread. Is this a school assignment?
    Jeff
    Using Labview 7 Express

  • Can someone help me in learning how to make business cards using pages

    can someone please help me in learning how to make business cards using pages

    You could jump start the process with an Avery MS Word 8-up business card template as a free download. Either version of Pages will digest it nicely. Once you load it into Pages, do a File > Save As Template.. , add it to Chooser, and give it your name choice. Both versions of Pages will remove the printer registration marks in all four template corners. The free LibreOffice Writer retains them.

  • How to make destop application using java

    how to make destop application using java
    i mean to say when we double click on the exe file the program should lounch the application
    for windows

    when i double click ii got the msg
    Failed to lad main class manifest attribute from
    x/x/xyz.jar
    what exatly it meansIt means that your Manifest.MF for the JAR file should contain an attribute called Main-Class pointing to a class containing the main() method.
    Something like this should be present in META-INF/Manifest.MF :
    Main-Class: MyApplicationMain

  • How to make image resizable using mouse ?

    Hi,
    I want to know about that how to resize image by using mouse in Java Canvas. I created some tools like line, free hand, eraser. And want to know how to make an image resizable in canvas by using mouse. An image is jpeg, png, or gif format. I want to make image stretch and shrink by using mouse.
    Please help me..
    Thnax in advance.
    Manveer

    You make a listener to handle the mouse event that you want to capture, then program the affect you want using the event as the trigger.

  • How do I find driver MSVCR80.DLL to get my Itunes working again on my PC

    Unable to boot Itunes due to missing driver MSVCR80.DLL.  What do I need to do?

    Check the user tip below.
    https://discussions.apple.com/docs/DOC-6562

  • Using dll in labview realtime

    Hi to all,
    I would like to know the best way how to open a file DLL in labview.
    I  created this dll with matlab, real time-workshop, nidll.tlc
    after that I have to use these dll in a real time VI, for using that into a cRIO,does it exist a tutorial in order to explain the procedure?
    thank you

    No it is not! As it uses Cygwin to port the Gnu Unix tools so they can run under Windows. Cygwin is a great tool but had always a hard time to run on newer Windows versions than what was released at the time a particular Cygwin version was created.
    The VxWorks versions that NI used for their realtime controllers is very old. There is no hope that someone would go through the trouble of trying to backport the Cygwin bugfixes since that time to this Gnu toolchain, nor has VxWorks any interest in creating a new Gnu toolchain based on modern Cygwin and Gnu tools for older VxWorks versions.
    NI has moved since away from using VxWorks. In fact the only reason they went with VxWorks, was because Pharlap ETS was not compatible with the PPC CPU and at that time the choice in powerful x86 compatible CPUs for embedded applications was VERY small or actually non-existent.
    As you can see Open source observes similar rules as commercial software. Don't spend much time in trying to make old stuff work on new versions. In fact commercial software usually makes a lot more effort to be portable across different versions. In Open Source the general tenor is, I want feature X, that requires GCC Y, which will only work with glibc x.z.v. Don't spend time in trying to make any of these work with older versions too, or update older applications to work with newer OSes etc. If you want Windows 7 or 8 you have to have Cygwin 1.7.something and that will usually require GCC 4.something and a myriad of other dependencies. The gnu toolchain for VxWorks 6.3 which is used on the NI controllers since LabVIEW 8.5 uses GCC 3.4.4.
    Considering that LabVIEW 8.5 was released in 2008 and the VxWorks tools to create the OS for the controllers obviously even quite some time before that, but Windows 7 RTM was only in July 2009, there is not much you can complain about the fact that those tools do not run on Windows 7 or 8.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to open a 16-bit dll in Labview

    Hi,
    I would like to open a vi for a spectrometer (Jobin Yvon 270M), but I get the following error message: "A CIN tried to load a 16-bit dll. This operation is not supported under Labview for Windows 95 or Windows NT. The CIN and DLL must be recompiled". Is there any way how I can open the 16-bit dll in Labview? I´ve read that it could be possible by writing a Thunk DLL(???). Do you have some advise how to solve this problem?
    Thanks a lot,
    Markus.

    This isn't a LabVIEW issue, but a Windows issue. To call 16-bit code from a 32-bit OS you need a bridge. That's what the thunk is. You can read more from this MS KB article. There's also this NI article. Not for the faint of heart.

  • Please teach me how to make the arrangement using Code Interface Node.

    How is what is necessary just to make arrangement (for example, Sine?Wave)
    using Code Interface Node? Please teach me a way.

    Try to get hold of the 'Advanced Analyis' library for labview. It contains VIs for doing FFT! No need to reinvent the wheel.
    If you can't get it and want to take the hard way, try to learn CIN programming by
    - reading the manual (no joke or cynism intended)
    - look for advice in NI's developer zone (www.ni.com/devzone) by using the search phrase 'CIN tutorial': you'll get several links which should be helpful in your case.
    - better than a CIN: try to use the DLL calling mechanisms and compile your C code into a dll. In order to learn dll intewrfacing for LabVIEW, follow the route explained under point 1 and 2 above...
    Good luck,
    Franz

  • How to make a Mac use dedicated GPU in Windows

    So I have this problem: when I launch games through Boot Camp on my late 2013 15 rmbp, I occasionally run into lags and frame drops in various games. The thing is, sometimes the same games run perfectly smooth with a decent frame rate, and sometimes the lags are so bad that it's almost impossible to play.
    This makes me think that my Macbook is using the integrated Iris Pro gpu instead of dedicated 750m. So my question is, how can I force Windows to use dedicated graphics in games? In NVidia control panel, there's no option like Dynamic swithing.
    P.S. I just reinstalled Boot Camp drivers using the WININSTALL drive, and checked NVidia website for updates

    Furthermore, Boot Camp only uses the dedicated GPU because of problems related to GPU switching, so this is not the problem. Anyway, you can check which GPU Windows is using > http://windows.microsoft.com/en-us/windows/video-cards-faq#1TC=windows-7
    Have you checked if there is any app open while you are playing games and they do not run as smooth as you want to?

  • How to make an index use in a query execution

    Hi,
    I have the below query for which ename column has an index. As of my knowledge below queries 1st and 2st will not use index. Hence i used the 3rd statement and that too its not using the index. Finally i used the 4th query, but even the 4th query is not using the index. Then how do i make this query to use my index??? Do i need to create a function based index for this??? Is that the final option????
    1. select * from emp where ename !='BH' ;
    2. select * from emp where ename <> 'BH';
    3. select * from emp where ename not in ('BH');
    4. select * from emp where ename < 'BH' or ename > 'BH';
    Regards,
    007
    Edited by: 007 on Jun 6, 2013 7:56 AM
    Edited by: 007 on Jun 6, 2013 8:06 AM
    Edited by: 007 on Jun 6, 2013 8:06 AM
    Edited by: 007 on Jun 6, 2013 8:06 AM
    Edited by: 007 on Jun 6, 2013 8:12 AM

    Sorry 007, I really thought you were posting a trick question as on the OCP tests.
    Anyway, as Justin mentioned, if you have an index on ename, it may be used when doing a comparison predicate statement with the ename value.
    What it depends on are several other things: stats, how many rows in the table, use of an index hint, etc.
    Rather than questioning the group on this, why not just turn on autotrace and run the query for the different scenarios.
    The output will show you if it used the index, number of rows returned, blocks read, etc.
    SQL> create table emp (ename  varchar2(40));
    Table created.
    SQL> insert into emp select username from sys.dba_users;
    25 rows created.
    SQL> commit;
    Commit complete.
    SQL> set autotrace on
    SQL> select * from emp where ename != 'SYSTEM';
    Execution Plan
    Plan hash value: 2951343571
    | Id  | Operation        | Name      | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT |           |    24 |   528 |     1   (0)| 00:00:01 |
    |*  1 |  INDEX FULL SCAN | ENAME_IDX |    24 |   528 |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter("ENAME"<>'SYSTEM')As you can see, the above used an index, even though there were only 25 rows in the table.
    You can test each of your scenarios, one by one, including use of a hint.

  • How to make sql to use index/make to query to perform better

    Hi,
    I have 2 sql query which results the same.
    But both has difference in SQL trace.
    create table test_table
    (u_id number(10),
    u_no number(4),
    s_id number(10),
    s_no number(4),
    o_id number(10),
    o_no number(4),
    constraint pk_test primary key(u_id, u_no));
    insert into test_table(u_id, u_no, s_id, s_no, o_id, o_no)
    values (2007030301, 1, 1001, 1, 2001, 1);
    insert into test_table(u_id, u_no, s_id, s_no, o_id, o_no)
    values (2007030302, 1, 1001, 1, 2001, 2);
    insert into test_table(u_id, u_no, s_id, s_no, o_id, o_no)
    values (2007030303, 1, 1001, 1, 2001, 3);
    insert into test_table(u_id, u_no, s_id, s_no, o_id, o_no)
    values (2007030304, 1, 1001, 1, 2001, 4);
    insert into test_table(u_id, u_no, s_id, s_no, o_id, o_no)
    values (2007030305, 1, 1002, 1, 1001, 2);
    insert into test_table(u_id, u_no, s_id, s_no, o_id, o_no)
    values (2007030306, 1, 1002, 1, 1002, 1);
    commit;
    CREATE INDEX idx_test_s_id ON test_table(s_id, s_no);
    set autotrace on
    select s_id, s_no, o_id, o_no
    from test_table
    where s_id <> o_id
    and s_no <> o_no
    union all
    select o_id, o_no, s_id, s_no
    from test_table
    where s_id <> o_id
    and s_no <> o_no;
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=6 Card=8 Bytes=416)
    1 0 UNION-ALL
    2 1 TABLE ACCESS (FULL) OF 'TEST_TABLE' (TABLE) (Cost=3 Card=4 Bytes=208)
    3 1 TABLE ACCESS (FULL) OF 'TEST_TABLE' (TABLE) (Cost=3 Card=4 Bytes=208)
    Statistics
    223 recursive calls
    2 db block gets
    84 consistent gets
    0 physical reads
    0 redo size
    701 bytes sent via SQL*Net to client
    508 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    5 sorts (memory)
    0 sorts (disk)
    8 rows processed
    -- i didnt understand why the above query is not using the index idx_test_s_id.
    -- But still it is faster
    select s_id, s_no, o_id, o_no
    from test_table
    where (u_id, u_no) in
    (select u_id, u_no from test_table
    minus
    select u_id, u_no from test_table
    where s_id = o_id
    or s_no = o_no)
    union all
    select o_id, o_no, s_id, s_no
    from test_table
    where (u_id, u_no) in
    (select u_id, u_no from test_table
    minus
    select u_id, u_no from test_table
    where s_id = o_id
    or s_no = o_no);
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=16 Card=2 Bytes=156)
    1 0 UNION-ALL
    2 1 FILTER
    3 2 TABLE ACCESS (FULL) OF 'TEST_TABLE' (TABLE) (Cost=3 Card=6 Bytes=468)
    4 2 MINUS
    5 4 INDEX (UNIQUE SCAN) OF 'PK_TEST' (INDEX (UNIQUE)) (Cost=1 Card=1 Bytes=26)
    6 4 TABLE ACCESS (BY INDEX ROWID) OF 'TEST_TABLE' (TABLE) (Cost=2 Card=1 Bytes=78)
    7 6 INDEX (UNIQUE SCAN) OF 'PK_TEST' (INDEX (UNIQUE)) (Cost=1 Card=1)
    8 1 FILTER
    9 8 TABLE ACCESS (FULL) OF 'TEST_TABLE' (TABLE) (Cost=3 Card=6 Bytes=468)
    10 8 MINUS
    11 10 INDEX (UNIQUE SCAN) OF 'PK_TEST' (INDEX (UNIQUE)) (Cost=1 Card=1 Bytes=26)
    12 10 TABLE ACCESS (BY INDEX ROWID) OF 'TEST_TABLE' (TABLE) (Cost=2 Card=1 Bytes=78)
    13 12 INDEX (UNIQUE SCAN) OF 'PK_TEST' (INDEX (UNIQUE)) (Cost=1 Card=1)
    Statistics
    53 recursive calls
    8 db block gets
    187 consistent gets
    0 physical reads
    0 redo size
    701 bytes sent via SQL*Net to client
    508 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    4 sorts (memory)
    0 sorts (disk)
    8 rows processed
    -- The above query is using index PK_TEST. But still it has FULL SCAN to the
    -- table two times it has the more cost.
    1st query --> SELECT STATEMENT Optimizer=ALL_ROWS (Cost=6 Card=8 Bytes=416)
    2nd query --> SELECT STATEMENT Optimizer=ALL_ROWS (Cost=16 Card=2 Bytes=156)
    My queries are:
    1) performance wise which query is better?
    2) how do i make the 1st query to use an index
    3) is there any other method to get the same result by using any index
    Appreciate your immediate help.
    Best regards
    Muthu

    Hi William
    Nice...it works.. I have added "o_id" and "o_no" are in part of the index
    and now the query uses the index
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=2 Card=8 Bytes=416)
    1 0 UNION-ALL
    2 1 INDEX (FULL SCAN) OF 'IDX_TEST_S_ID' (INDEX) (Cost=1 Card=4 Bytes=208)
    3 1 INDEX (FULL SCAN) OF 'IDX_TEST_S_ID' (INDEX) (Cost=1 Card=4 Bytes=208)
    Statistics
    7 recursive calls
    0 db block gets
    21 consistent gets
    0 physical reads
    0 redo size
    701 bytes sent via SQL*Net to client
    507 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    8 rows processed
    But my questions are:
    1) In a where clause, if "<>" condition is used, then, whether the system will use the index. Because I have observed in several situations even though the column in where clause is indexed, since the where condition is "like" or "is null/is not null"
    then the index is not used. Same as like this, i assumed, if we use <> then indexes will not be used. Is it true?
    2) Now, after adding "o_id" and "o_no" columns to the index, the Execution plan is:
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=2 Card=8 Bytes=416)
    1 0 UNION-ALL
    2 1 INDEX (FULL SCAN) OF 'IDX_TEST_S_ID' (INDEX) (Cost=1 Card=4 Bytes=208)
    3 1 INDEX (FULL SCAN) OF 'IDX_TEST_S_ID' (INDEX) (Cost=1 Card=4 Bytes=208)
    Before it was :
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=6 Card=8 Bytes=416)
    1 0 UNION-ALL
    2 1 TABLE ACCESS (FULL) OF 'TEST_TABLE' (TABLE) (Cost=3 Card=4 Bytes=208)
    3 1 TABLE ACCESS (FULL) OF 'TEST_TABLE' (TABLE) (Cost=3 Card=4 Bytes=208)
    Difference only in Cost (reduced), not in Card, Bytes.
    Can you explain, how can i decide which makes the performace better (Cost / Card / Bytes). Full Scan / Range Scan?
    On statistics also:
    Before:
    Statistics
    52 recursive calls
    0 db block gets
    43 consistent gets
    0 physical reads
    0 redo size
    701 bytes sent via SQL*Net to client
    507 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    8 rows processed
    After:
    Statistics
    7 recursive calls
    0 db block gets
    21 consistent gets
    0 physical reads
    0 redo size
    701 bytes sent via SQL*Net to client
    507 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    8 rows processed
    Difference in recursive calls & consistent gets.
    Which one shows the query with better performance?
    Please explain..
    Regards
    Muthu

  • How to make XML element used in RTF PRIVATE/PUBLIC ? I know how to hide columns in RTF, but dont know how to generate the xml in below way. Please help.

    Hi
    I am following below link to hide/show my columns dynamically. See "Column Formatting"
    http://docs.oracle.com/cd/E12844_01/doc/bip.1013/e12187.pdf
    As per doc, element can be made private/public.
    <items type="PUBLIC">
    <item>
      <name>Plasma TV</name>
      <quantity>10</quantity>
      <price>4000</price>
    </item>
    <item>
    And same can be used to hide the column using condition
    <?if@column:/items/@type="PUBLIC"?>
    MY QUESTION IS HOW TO DO THIS IN MY XML BELOW?
    Below is part of my XML code which I am using in Data Definition for RTF.
    <group name="GH3" source="QH3">
    <element name="COLUMN_HEAD3" value="COLUMN_NAME" />
    </group>
    <group name="GH4" source="QH4">
    <element name="COLUMN_HEAD4" value="COLUMN_NAME" />
    </group>
    I am getting output like this.
    <LIST_GH3>
    <GH3>
    <COLUMN_HEAD3>REBILL_TO_OTHER_BUSINESS_UNIT</COLUMN_HEAD3>
    </GH3>
    </LIST_GH3>
    <LIST_GH4>
    <GH4>
    <COLUMN_HEAD4>XYZ</COLUMN_HEAD4>
    </GH4>
    </LIST_GH4>
    In order to use logic as per oracle document I want output like this.
    <LIST_GH3 type="PUBLIC">
    <GH3>
    <COLUMN_HEAD3>REBILL_TO_OTHER_BUSINESS_UNIT</COLUMN_HEAD3>
    </GH3>
    </LIST_GH3>
    <LIST_GH4 type="PRIVATE">
    <GH4>
    <COLUMN_HEAD4>BLANK</COLUMN_HEAD4>
    </GH4>
    </LIST_GH4>
    What changes I need to make in my XML code to get the runtime output as above? Please help. Where do i need to make changes in the above xml? Group name? Element name?
    I am planning to use below condition in RTF template to hide the column,  but dont know how to set the type of column as PRIVATE/PUBLIC in the XML output used to populate data in the RTF at runtime.
    <?if@column:/BTSPIEXP/LIST_GH3/@type=”PUBLIC”?>COLUMN_HEAD3<?end if?>
    Regards,
    Swapnil K.

    Hi,
    Issue has been resolved. I used the value of the element to determine to display it or not.
    Regards,
    Swapnil K.

Maybe you are looking for

  • Is there a way to receive phone notifications such...

    Hello Everyone, To Start I have a Lumia 800, Latest Updates all installed. I am running windows 8, completely up to date 64 bit. I am running the latest version of zune. My question to the community is: Is there a way to receive phone notifications s

  • Connecting to a Network Projector

    We're looking to upgrade our office projector and are interested in using the built in Windows feature, "Connect to a Network Projector". I've asked a few manufacturers if they support the future and they said no. I have a feeling that all network pr

  • Boris 3D titles disappear when more than one font/size used

    I've had a LOT of two-line supers created in Boris 3D (the first and second line are either different fonts or two different sizes of the same font) go invisible without any reasonable explanation. This has happened on 3 or 4 different Macs of variou

  • HT1212 my mini is disable and i cant conect it to itune

    my apad mini is disable. my son lock de dives and i cont conected to itunes

  • Can't Open the CD on my Mac Pro

    How do I open my CD player? I thought I'd open it in Finder, but all I see is the HD and iDrive. Please advise. TIA, beno