Question on the parameter type of DLL functions

Question on the parameter type of DLL functions
I am trying to develop an interface to control a laser with LV8.2  I am planing to use the VI “Call Library Function Node” to call the DLL and set the exact same parameters of functions in the DLL.
According to the DLL manual of the laser, there are six functions.  One of the prototypes is:  function getstatuspointer : pointer. I don't know how to set this parameter for the function. Is there anyone who can give some hints? Thanks!
BTW :The following is a description of the function:
This function returns a 32 bit pointer to the STATUS data structure (Tstatusrec). In the 32 bit DLL, every application is using its own copy of the data structure (local
memory). The data structure is a packed structure. "packed" means that the fields in the structure are not aligned on word or double-word boundaries.
Tstatusrec = packed record
                        size : word;
                        initstat : byte;
                        queuefill : byte;
                        anzapp16 : word; (not used)
                        anzapp32 : word;
                        anzdock16 : word; (not used)
                        anzdock32 : word;
                        dll16ver : tchararray; (not used)
                        dll32ver : tchararray;
                        excimerver : tchararray;
                        excimer : TExcimerStatus;
                  end;

Hi Jack,
This is a good starting point when using Call Library Function node. Check out this Help Page
Van L
NI Applications Engineer

Similar Messages

  • How to get parameter information on DLL function call (CVI) in TestStand?

    Hi,
     I wrote a simple Instrument Driver in CVI, and it has 3 parameters Voltage, Current, Channel.
    I made a DLL in order to call this function in TestStand as an action.
    That works fine, the only problem I have is that it shows my function as DC_Conf (arg1, arg2, arg 3) and I only get the type information like double double int.
    I do not get the parameter names Voltage, Current, Channel...
    How can I get this information to be displayed in TestStand so I know which parameter arg 1-3 is Voltage,Current,Channel in case I forgot?
    or 
    Is there a way to display the help text of the driver in TestStand?
    I tried clicking on the (?) button next to the function call but it did not do anything...
    My TestStand is version 4.1
    Thanks...Ness

    Ness,
    When TestStand populates the parameter information, it does so by looking at the dll's type library.  CVI automatically creates a type library for a dll based on the function's signature, which can include the parameter names.  However, if the function prototype does not contain variable names, then CVI cannot include names in the type library.
    You can define your own type library to directly control the information available to TestStand from your dll.  If you want to define your own type library, you can do so using a .fp file.  This will allow you to use complex data types (such as structs), and to rename your parameters.
    Here's a KnowlegeBase describing the process: Embedding Type Libraries in a LabWindows/CVI DLL for use in TestStand
    Either solution proposed here will work, and they each have tradeoffs:
    You can definte the variable names in the function prototype.  This keeps the functions self-documenting, and is the easiest solution.
    You can create a .fp file and define your own type library.  This allows you the most control over exactly what you will see in TestStand, but requires you to create a new file, and to keep that new file up to date if you make any changes to your source code.
    Message Edited by Josh W. on 12-11-2009 01:08 PM
    Josh W.
    Certified TestStand Architect
    Formerly blue

  • Question about the Filter type for the trace provide "Microsoft-Windows-Kernel-File"

    Hello all,
    I have moved this question from the Windows
    Server General Forum accorfing to the suggestion from Mr. Justin Gu 
    I have a question about the Filter function for the trace provider "Microsoft-Windows-Kernel-File".
    I can find the Filter function with the following operation.
    Mr. Justin Gu wrote:
    > You create a Data Collector Set for the trace provider "Microsoft-Windows-Kernel-File" and finish completely, then you > can right click it and select Properties.
    In the Properties dialog box, click Filter and
    then select ‘Edit…’. You will be> able
    to see the Filter type and Filter data in the Filter dialog box.
    What
    Kind of Filter can
    I use in this Filter dialog box?
    And, how can I set to exclude the some kind of datas?
    Could you give me your suggestion?
    Thank you.

    What
    Kind of Filter can
    I use in this Filter dialog box?
    And, how can I set to exclude the some kind of datas?
    Could you give me your suggestion?
    Thank you.
    I'm looking for the same information.

  • How to find out the parameter type of a parameterized object?

    Hi,
    I've got a list containing instances of a parameterized class. The parameters of the instances can be different. When using the instances, I need to know the types of the parameters. How can I find them out?
    Regards,
    Frank

    Look at the first item in the List and see what it is?
    I'm not trying to be funny. Generic information is compile time only, the types of the parameters are not generally available at run time.
    You can find out the bounds on the types, if any, but not the actual types.
    AndyT

  • Trigger Idoc by using the Output type in Z function module

    My requirement is when I run Z function module then  Idoc should be send which is configured in Output Type.
    Means when ever i run the Functional module that Output type should be triggered.?
    Does any one have solution??

    Hi,
    Remove the Material Class from Importing Tab and Place the same under Tables Parameter.
    Regards,
    SRinivas

  • Error in the call of a DLL function

    Hello,
    I'm trying to control a Switch Matrix of Agilent (HP5250A) with LabView 6.1. The connections are realized with GPIB. In fact, I have some problems with the DLL called "hpe5250a_32.dll". If I try to start my VI, this error occurs:
    "An exception occurred within the external code called by a Call Library Node. This may have corrupted LabVIEW's memory. You should save any work to a new location and restart LabVIEW. VI "hpe5250a Open List - modified.vi" was stopped at Call Library Function Node 0x844 of subVI "hpe5250a Open List - modified.vi" "
    Must I install the DLL in a special location as C:\VXIpnp\WinNT\Bin? I have nothing about HP5250 instrument
    here... and it is maybe the problem.
    Thank you very much for your help.

    Le problème a été résolu par mail directement.
    Il était dû au fait que l'utilisateur n'avait pas l'habitude des "instrument handle" dans labview et voulait utiliser certaines fonctions directement sans passer par les étapes de configurations.
    Cordialement
    David D.
    Ingénieur d'Applications
    NI France

  • Table parameter Types for this Function module

    I am using K_HIERARCHY_TABLES_READ to get the profit centers for a given profit center group.
    I have the following declarations for the parameters of this FM:
    TYPE-POOLS: gseth.
    Declarations for Profit Center Group
    DATA: g_pcgrp     TYPE rgsbs-class,
          g_setid     TYPE rgsbs-setnr,
          g_info      TYPE grphinfo,
          g_overwrite TYPE sy-datar.
    DATA:
          i_nodes      TYPE STANDARD TABLE OF gseth_node_tab,
          i_values     TYPE STANDARD TABLE OF gseth_val_tab,
          i_masterdata TYPE STANDARD TABLE OF grpmdline.
    When this is run, its taking me into a dump and it says:
    The reason for the exception is:
    The system tried to pass internal table "I_NODES" to the formal
    parameter "T_NODES", but a type conflict occurred between the
    formal and the actual parameter.
    Pl help me to correct this dump and error.
    Thanks
    Kiran

    DATA:
    i_nodes TYPE STANDARD TABLE OF gseth_node_tab,
    i_values TYPE STANDARD TABLE OF gseth_val_tab,
    i_masterdata TYPE STANDARD TABLE OF grpmdline.
    change your declarations
    to the below...
    DATA:
    i_nodes TYPE gseth_node_tab,
    i_values TYPE gseth_val_tab,
    i_masterdata TYPE STANDARD TABLE OF grpmdline.

  • Question about the Wait Until Next ms Function

    Hello,
    I met a problem when I tried to use wait until next ms function to control the period of the loop.
    I use Labview2009 now. I wrote a VI to sample the current values at 100Hz and then store the samples in a text file. The currents are sampled once in a loop and then wait for next 10ms to begin the next loop. After 360,000 loops (should be an hour), it will creat a new file to store the new samples in the following an hour.
    I left the VI runs on CompactRio for the whole weekend. The result I got is shown in the picture below:
    24 files should be created in one day. While there were only 3 files created in the firest 24 hours ( from Fri 16:00 - Sat 16:00). And after that it worked very well.
    When I checked the first three files (created from Fri 16:00 - Sat 16:00), I found that it didn't sample at 10Hz. It sampled at the frequency of about 20Hz (sometimes 18Hz, sometimes 19Hz).
    I am confused by the problem a lot. What may cause it didn't work in the first 24 hours and worked after 24 hours? And How could I fix this problem?
    Thank you very much!

    You need to show us some code!
    This cannot happen in a single loop, but can easily happen if you have e.g. stacked loops or sequences containing multiple wait statements.
    Also have a look at these old threads:
    Synchronization problems during measurements (using while loop)
    accurate timing between events
    If accurate timing is important, use a timed loop. Your incorrect times are faster, so I don't think there is a problem with the inner code taking too long.
    LabVIEW Champion . Do more with less code and in less time .

  • I have a question about the data type static

    for any of you that read my last post for my assignment this is still the same thing but i have broke it down more, but i am getting an error and i am not for sure i understand why that is. I think i am confused on why i should, or could use a static?
    thanks again guys
    package wordstester;
    import javax.swing.JOptionPane;
    * @author christopher izatt
    public class WordsTester {
         * @param args the command line arguments
        public static void main(String[] args) {
                  // prompt the user to enter a string of their choice
          String wordChosen;
          wordChosen = JOptionPane.showInputDialog
              ("Please enter a word of your choice here");
          String middlePart;
          middlePart = Words.getMiddle(wordChosen);      <----- error nonstatic method can not be referenced in a static context
          System.out.println("At the middle of " + wordChosen + " is: "
                     + middlePart);
    package wordstester;
    * @author christopher izatt
        public class Words {
        private String wordChosen;
        public String Words(String letters) {
            wordChosen = letters;
            return wordChosen;
        public String getMiddle(String wordChosen) {
            int letters = wordChosen.length() / 2;
            int endindex = letters +1;
            return wordChosen.substring(letters, endindex);
       

    Try this.
    Imagine a blueprint from which houses are constructed. The blueprint indicates that each house will have a garage, a roof, a front door, etc. However, each house will have its own roof - be it a tar shingle roof or a cedar roof or maybe thatch - but that's another issue.
    Now, in the lower left corner of the blueprint, we find the architect's name and company logo. That logo is part of the blueprint - each house will NOT have its own discreet copy of that item. Instead, each house will share the one and only copy of that logo.
    That's what static members are. They are called "class variables" or "class methods" and are accessed through the class name instead of an object name.
    I hope that helps.

  • Error -2318 occurred at Integrator.vi - The dimension of the parameter vectors of this function do not match

    I want to integrate each element of a 1D array (in a Control&Simulation Loop).
    With the Integrator.Vi i get the following error:
    The input (L*y) is a 1D array with a 1x78 structure. I want to have each element integrated for his own so that i also get a 1x78 structure as result.
    Is this possible with this vi? Or has anyone a suggestion how to solve this problem?
    I have also tried it with the numeric integration.vi but this gains only a single value (result).

    Here you have the vi.
    Attachments:
    State_Space_5_8b.vi ‏283 KB

  • Parameter types in FORTRAN DLL's

    Hi
    I am a novice to fortran programing but want to use existing fortran code
    within Labview. I have Digital Visual Fortran 5.0A and have suceeded in making
    an elementary .DLL and calling it with the Labview call library function.
    However, this only works if I set the parameter types to 'Adapt to Type'.
    If I try to specify the types Labview crashes with an invalid page fault.
    This particular example has only real parameters. I have tried with arrays
    and have even less sucess as the 'Adapt to Type' option does not even work
    in these cases.
    Any help or explanation would be most appreciated.
    Rory Stieger
    PS : If it's any help here is the fortran code (the commented out bits for
    the test with arrays)
    ccccccccccccccccc
    cccccccccccccccccccccccccc
    c subroutine ftoc (n,f,c)
    subroutine ftoc (f,c)
    implicit none
    !DEC$ ATTRIBUTES DLLEXPORT :: ftoc
    !DEC$ ATTRIBUTES ALIAS :'ftoc'::ftoc
    c integer n,i
    c real*8 f,c(n)
    real*8 f,c
    c do i=1,n
    c c(i) = (5.0/9.0) * (f*i-32.0)
    c = (5.0/9.0) * (f-32.0)
    c end do
    return
    end
    ccccccccccccccccccccccccccccccccccccccccccc

    [posted and mailed]
    [email protected] (Rory Stieger) wrote in <[email protected]>:
    >
    >Hi
    >
    >I am a novice to fortran programing but want to use existing fortran
    >code within Labview. I have Digital Visual Fortran 5.0A and have
    >suceeded in making an elementary .DLL and calling it with the Labview
    >call library function.
    >
    >
    >However, this only works if I set the parameter types to 'Adapt to
    >Type'. If I try to specify the types Labview crashes with an invalid
    >page fault. This particular example has only real parameters. I have
    >tried with arrays and have even less sucess as the 'Adapt to Type'
    >option does not even work in these cases.
    >
    >Any help or explanation would be most appreciated.
    >
    >Rory Stieger
    >
    >PS : If it's any help here is the fortran code (the commented out bits
    >for the test with arrays)
    >
    >ccccccccccccccccccccccccccccccccccccccccccc
    >c subroutine ftoc (n,f,c)
    > subroutine ftoc (f,c)
    > implicit none
    > !DEC$ ATTRIBUTES DLLEXPORT :: ftoc
    > !DEC$ ATTRIBUTES ALIAS :'ftoc'::ftoc
    >c integer n,i
    >c real*8 f,c(n)
    > real*8 f,c
    >c do i=1,n
    >c c(i) = (5.0/9.0) * (f*i-32.0)
    > c = (5.0/9.0) * (f-32.0)
    >c end do
    > return
    > end
    >ccccccccccccccccccccccccccccccccccccccccccc
    >
    First of all when passing arrays you need to define them before passing
    them to the call library node. So use the init tool before hand to allocate
    memory for the array before passing it (This causes a lot of crashes if not
    done correctly).
    Secondly, the type of call the dll uses is important. Usually you can set
    the dll fucntions to have the standard call and you then configure the call
    library node to take this into account.
    Thirdly, you need to find out how fortran passes parameters. I cannot
    remember enough of my fortran to help. But, for example if all values are
    passed by reference then configure all your call library parameters as
    (*varname). Otherewise by value they would be (varname). In the example
    above if they are not passed by reference then you will not receive any
    valid value in "c" on return from the subroutine.
    Fourthly, some function calls in some languages return values by default
    even though the standard way of accessing them might not use the return
    value. Check out whether fortran is returning a void function, otherwise
    you might need to set up a return in the call library node.
    Lastly, make sure that the types match in the parameters. For example is
    your int 32 or 16 bit by default?
    cheers, Alex.
    Alexander C. Le Dain, PhD
    ICON Technologies Pty Ltd
    http://www.icon-tech.com.au

  • Procedure parameter of type returned by function

    Hi there
    I want to know if it's possible to pass a parameter to procedure of type returned by function
    Something like that
    pocedure test(x in varchar2
    ,y in my_function(param)
    )

    Definitely don't fullish yourself ;-)
    AFAIK you cannot declare a variable based on the return type of a function.
    Perhaps though you are looking for SUBTYPEs.
    SQL> SET SERVEROUTPUT ON;
    SQL> DECLARE
      2    SUBTYPE subtype_name IS VARCHAR2 (30) NOT NULL;
      3
      4    PROCEDURE procedure_name (
      5      parameter_name IN subtype_name)
      6    IS
      7    BEGIN
      8      DBMS_OUTPUT.PUT_LINE (parameter_name);
      9    END;
    10
    11    FUNCTION function_name (
    12      parameter_name IN DATE)
    13      RETURN subtype_name
    14    IS
    15    BEGIN
    16      RETURN TO_CHAR (parameter_name, 'DAY');
    17    END;
    18
    19  BEGIN
    20    procedure_name (function_name (SYSDATE));
    21  END;
    22  /
    THURSDAY
    PL/SQL procedure successfully completed.
    SQL>

  • Pointer to structure in parameter list of DLL

    I want to use the CALL_LIBRARY_FUNCTION to access a function in a DLL
    which returns a pointer to a structure in its parameter list. How can I
    access this structure under LabVIEW 6.02? What is the parameter type I
    have to select in the CALL_LIBRARY_FUNCTION configuration window - there
    is no STRUCTURE or CLUSTER entry?
    Any help is very much appreciated. Thanks, Frank

    You may select "Adapt to Type" as a type of the parameter of the function, and then connect appropriate cluster to the output of the "Call Library" node.
    Oleg Chutko.

  • How to pass the parameter in "Data Template"

    Hi,
    Can any one please help me out to sort the problem, "Passing Parameter and checking condition for the parameters in the "data template".
    And also please tell me how to link the multiple query in "Data template", as per the user guide i have it says to use link tag. But its not working with my "Data template".
    Please check the data template given below and help me out to sort the problem.
    And one more thing is in table the data type for number and name is varchar. I dono weather i can use that data type in "Data template", please let me know if i can.
    <?xml version="1.0"?>
    <dataTemplate name="VENODR_DETAILS">
    <parameters>
    <parameter name="VENDOR_NUM" dataType="number"/>
    <parameter name="VENDOR_NAME" dataType="char"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[SELECT pv.segment1 ven_num,
              pv.vendor_name vname,
                          pvs.vendor_site_code VEN_SIT_CODE,
              pvs.purchasing_site_flag PURCH_SIT_FLG,
              pvs.pay_site_flag PAY_SIT_FLG,
              pv.vendor_name VENDOR_ADDR_NAME,
              pvs.address_line1 VENDOR_ADDR1,
              pvs.address_line2 VENDOR_ADDR2,
              pvs.city VENDOR_CITY,
              pvs.state VENDOR_STATE,
              pvs.zip VENDOR_ZIP
    FROM vendors pv,supplier_info pvi,vendor_sites_all pvs
    where pv.segment1 = pvi.vendor_id(+)
    and pv.vendor_id = pvs.vendor_id
    and (pv.segment1=:VENDOR_NUM or pv.vendor_name=:VENDOR_NAME)
    ]]>
    </sqlStatement>
    <sqlStatement name="Q2">
    <![CDATA[select pvc.area_code||'-'||pvc.phone Contact_Phone,
    pvc.last_name||' '||pvc.first_name||' '||pvc.middle_name cname
    from vendor_contacts pvc,vendor_sites_all pvs,vendors pv
    where pvs.vendor_site_id = pvc.vendor_site_id
    and pv.vendor_id = pvs.vendor_id
    and pv.segment1=(pv.segment1=:VENDOR_NUM or pv.vendor_name=:VENDOR_NAME)
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="VENDOR" source="Q1">
    <element name="VENDOR_NUMBER" value="ven_num"/>
    <element name="VENDOR_NAME" value="vname"/>
    <element name="CATEGORY" value="VENDOR_CAT"/>
    <element name="UPDATE_DATE" value="UPDATE_DT"/>
         <group name="VENDOR_SITE" source="Q1">
         <element name="VEN_SIT_CODE" value="VEN_SIT_CODE"/>
         <element name="PURCH_SIT_FLG" value="PURCH_SIT_FLG"/>
         <element name="PAY_SIT_FLG" value="PAY_SIT_FLG"/>
         <element name="VENDOR_ADDR1" value="VENDOR_ADDR1"/>
         <element name="VENDOR_ADDR2" value="VENDOR_ADDR2"/>
         <element name="VENDOR_CITY" value="VENDOR_CITY"/>
         <element name="VENDOR_STATE" value="VENDOR_STATE"/>
         <element name="VENDOR_ZIP" value="VENDOR_ZIP"/>
         </group>
    </group>
    <group name="VENDOR_CONTACT" source="Q2">
    <element name="Contact_Phone" value="Contact_Phone"/>
    <element name="cname" value="cname"/>
    </group>
    </dataStructure>
    </dataTemplate>
    Thanks in advance.
    Regards,
    SP

    Hi Rani,
    I see one issue in the Q2 with the where statement:
    and pv.segment1=(pv.segment1=:VENDOR_NUM or pv.vendor_name=:VENDOR_NAME)
    the right one should be
    and pv.vendor_id = :VEN_VENDOR_ID
    the variable VEN_VENDOR_ID you have to select from the first query Q1. Add here after select
    pv.vendor_id VEN_VENDOR_ID,
    Regarding the other question about the data types, well, number and varchar2 is fine, perhaps char also, but go with varchar2 instead.
    One last note: you should not mix uppercase and lowercase, keep it clear and structured, check your element names and values.
    Best Regards
    Volker

  • As to the data type of the data type of the difference between two date type of datas

    Hi,
    I have a question about the data type of the difference between two date type of datas.
    There are two date type of datas as:
    SSHIPMENTS.RECEIVEDATETIME
    SSHIPMENTS.PROMISEDATETIME
    I try to use the following SQL Script in Oracle SQL*Plus as:
    SELECT CASE
    WHEN (SSHIPMENTS.RECEIVEDATETIME - SSHIPMENTS.PROMISEDATETIME) < '000 01:00:00.000' THEN 'OnTime'
    WHEN (SSHIPMENTS.RECEIVEDATETIME - SSHIPMENTS.PROMISEDATETIME) < '000 01:30:00.000' THEN '60-89 Minutes'
    ELSE '3+ Hours'
    END
    FROM SSHIPMENTS;
    The error message of "Invalid Number" for the '000 01:30:00.000' happens.
    I don't know if the data type of the interval is wrong.
    Many Thanks,
    Cathy

    SELECT CASE
    WHEN (to_char(SSHIPMENTS.RECEIVEDATETIME,'hhmiss') - to_char(SSHIPMENTS.PROMISEDATETIME,'hh24miss')) < '010000' THEN 'OnTime'
    WHEN (to_char(SSHIPMENTS.RECEIVEDATETIME,'hhmiss') - to_char(SSHIPMENTS.PROMISEDATETIME,'hh24miss'))< '000 01:30:00.000' THEN '60-89 Minutes'
    ELSE '3+ Hours'
    END
    FROM SSHIPMENTS;
    just try it out..

Maybe you are looking for

  • Incorrect Duty Rates in ARE3 for Multiple Line Items

    Hi All I have a scenario where 1 ARE3 Form is generated referring to 2 Excise Invoices (Both the Invoices have the same Material, Excise Chapter Heading, Tariff Rates, Ship-to-Party; only Quantities are different) The issue until now was that in the

  • Plays fine in iMovie but the sound disappears once exported to Quick Time

    I read through all the little support things in the iMovie '06 help and nothing worked. No matter how many times I try to export my project to QuickTime everything works but the audio even though I've made sure the audio settings are correct. In iMov

  • Imgur pictures do not load in firefox, but work fine in IE.

    Embedded images in forums hosted in imgur (e.g. [IMG]http://i.imgur.com/oBNUb.jpg[/IMG] )won't load when using firefox. This does not happen when using IE. Also, the images load properly when I paste the image's url in the adress bar (e.g. http://i.i

  • Applying custom Group policy to existing users using group policy

    Hello Everyone, i am unable to find a way to push a custom theme to client PC using group policy. I have tried "Load a Specific Theme" Group Policy but it is only applying to a new user logging on windows. I have a custom theme that i want it to load

  • Password Manager won't save Logons under Win 7

    T61p win7 pro  64 bit .  Just installed CSS and fingerprint software.  Everything sets up and the fingerprint reader allows me to log on.  Try to set up a fingerprint log i.e. quicken on in Password Manager and it does NOT save. Asks if I want to.  C