How to pass a general datalog type to a subvi

I am writing a general subvi to determine if a file of a given name and optionally datalog type exists in a directory specified by the user. To match the datalog type I must be able to pass it into my subvi. To keep this question in a simple context, imagine putting the standard file/directory LIST vi inside a subvi. Now I want to pass the datalog type into this subvi so that this bit of code is generally useful. Is there a (preferrably easy) way?
I tried a variant control and it does not work - but does not generate an error either. It simply doesn't return any files. I also tried passing a cluster control refnum, but this failed for the same reason; when I wire the Value Property node it supplies a variant . . .
I am guessing that this job cannot be done with file/directory LIST since it checks the type of data wired to Datalog Type at program time. So if I take on the task of passing a type descriptor for a cluster/datalog type, how can I match this to the header of a datalog file? I see that most of the information matches, but not all . . .
Thanks,
Art Mihill
McPherson, Inc.

Hello,
Well, you may be able to do this, but it may be easier to have a naming convention for your files, where you can determine immediately the datalog type from the file name.  One way you may attempt this is to read the file and use it's size, perhaps (mod) something (ie. look at the remainder after dividing by some integer) to determine the underlying datatypes.  You may also be able to parse the file and look for clues; in that case you may want to reference the following tutorial:
LabVIEW Data Storage:
http://zone.ni.com/devzone/conceptd.nsf/2d17d611ef​b58b22862567a9006ffe76/370dfc6fd19b318c86256a33006​...
If this isn't sufficient or not a viable solution, repost and we'll try to get a bit more creative!
Best Regards,
JLS
Best,
JLS
Sixclear

Similar Messages

  • How to pass a parameter of type __int64 to a DLL from LabVIEW?

    I have a DLL function built in C that has a parameter of type __int64. Is it possible for me to represent a control of type equivalent to __int64 in LabVIEW?

    kelsie,
    I would agree with the other answers, but I have a bit more information as well. LabVIEW's EXT data type is in an IEEE format for an 80-bit floating point number (1 sign, 15 exponent, 64 mantissa, see Application Note 154). This should then represent an 64-bit integer with no issues (theoretically). However, I have only ever been able to get it to represent integers up to 1000000000000000000.000000 visually (1*10^18). I have a VI that reproduces this and I am trying to get it fixed. Now, the numerical value in memory is correct, but LabVIEW cannot visualize it to you at each integer value from 10^18 to 2^64. (Try placin
    g an EXT control on the front panel and typing in 1000000000000000000.000000. Then type in 1000000000000000001.000000. Notice that it does not display that value. However, run the attached LabVIEW VI and notice that the numerical values are not identical because they are not equal.) Another thing to note is that the increment/decrement buttons quit working after 9007199254741000.00.
    This all came about because customers wanted to get 64-bit integers from GPIB instruments. So what I did what to take the string and make the 64-bit integer into 2 32-bit integers. I then put them back together into an EXT data type to represent the large number. This is when I ran into the issue of the very large numbers.
    So, I agree that inputting two 32-bit integers would be the best method. Then use the "Scale by Power of 2" function to multiply the high part by 2^32 and add it to the low part. Again, this works for numbers up to 10^18.
    I hope this helps.
    Randy Hoskin
    Applications Engineer
    National Instruments
    http://www.ni.com/ask
    Attachments:
    EXT_Test2.vi ‏25 KB

  • Pass String[] (String Array) type to a parameter in "Edit Action Binding"

    Hi
    Hope you are doing fine. This is very important to me, kindly help me in this regad.
    I have a scenario where I need to pass in a parameter of type String[] that has only one value {"Name"} to a webservice that returns some values.
    I've created a WS datacontrol, dragged and dropped the return value on to a jspx, then it asks me to give the input value
    How do I pass it to the Parameter in "Edit Action Binding"?
    When I say new String[]{"Name"}, it gives me the following error
    Cannot create an object of type:[Ljava.lang.String; from type:java.lang.String with value:new String[]{"Name"}
    Similarly, I hardcoded this value in a managedBean, added it to requestScope/applicationScope and queried it using #{applicationScope.AppCreationBean.epsName}
    But this time, it says, the value is null. I guess the value is not getting initialized properly. But if i hardcode the value in the getter method, I'm again getting the error as above.
    Would some one tell me how to pass an array of type String (ie, String[]) with a value "Name" in the "Edit Action Binding" wizard itself?
    Regards
    RaviKiran

    Hi Frank
    Thanks for the reply.
    Issue resolved by initializing it in the ManagedBean.
    For some reason, when I put it in request/application scopes, it was coming as null, but when I registered the Bean in PageFlowScope, it was working!
    Regards
    RaviKiran

  • Issue in passing Oracle User Defined Types to PL SQL from Websphere Applica

    HI,
    I am facing an issue when trying to pass Oracle collection object(User Defined Types) from Java to PL SQL. The issue happens inside J2EE application which is running inside Websphere Application Server 6.x. My database is Oracle 10g and i am using ojdbc1.4.jar as thin driver.
    The issue is that when i pass the Oracle Object from java side, the attribute values of the collection objects at the Oracle PL SQL side is coming as empty. I have tried the same java code in a standalone application and it works fine. The issue happens only when the application is running inside WAS.
    Anybody has any idea how to pass Oracle User Defined Types from WAS 6.x server to Oracle PL SQL?

    Andy Bowes wrote:
    Hi
    I am using WebLogic 8.14 & Oracle 9i with thin JDBC driver.
    Our application needs to perform the same DB operation for every item in a Java Collection. I cannot acheive the required performance using the standard Prepare & Execute loop and so I am looking to push the whole collection to Oracle in a single invocation of a Stored Procedure and then loop on the database.
    Summary of Approach:
    In the Oracle database, we have defined a Object Type :
    CREATE OR REPLACE
    TYPE MYTYPE AS OBJECT
    TxnId VARCHAR2(40),
    Target VARCHAR2(20),
    Source VARCHAR2(20),
    Param1 VARCHAR2(2048),
    Param2 VARCHAR2(2048),
    Param3 VARCHAR2(2048),
    Param4 VARCHAR2(2048),
    Param5 VARCHAR2(2048),
    and we have defined a collection of these as:
    CREATE OR REPLACE
    TYPE MYTYPE_COLLECTION AS VARRAY (100) OF MYTYPE
    There is a stored procedure which takes one of these collections as an input parameter and I need to invoke these from within my code.
    I am having major problems when I attempt to get the ArrayDescriptor etc to allow me to create an Array to pass to the stored procedure. I think this is because the underlying Oracle connection is wrapped by WebLogic.
    Has anyone managed to pass an array to an Oracle Stored procedure on a pooled DB connection?
    Thanks
    AndyHi. Here's what I suggest: First please get the JDBC you want to work in a
    small standalone program that uses the Oracle thin driver directly. Once
    that works, show me the JDBC code, and I will see what translation if
    any is needed to make it work with WLS. Will your code be running in
    WebLogic, or in an external client talking to WebLogic?
    Also, have you tried the executeBatch() methods to see if you can
    get the performance you want via batches?
    Joe

  • How to pass date into a sp?

    Hi,
    Could anybody know how to pass a parameter of type date into a
    sp? Below are something I tried:
    1.
    create or replace package empTest AS
         PRAGMA SERIALLY_REUSABLE;
         TYPE curType IS REF CURSOR;
         function Details (
              hd date)
              RETURN curType;
    END;
    CREATE OR REPLACE PACKAGE BODY empTest AS
         PRAGMA SERIALLY_REUSABLE;
    function Details (
              hd date)
              RETURN curType IS
              sum_cv curType;
         err_num NUMBER;
         err_msg     VARCHAR2(200);
         sql_statement VARCHAR2(3000);
    BEGIN
    DBMS_OUTPUT.PUT_LINE(hd);
         sql_statement :=' SELECT * from emp where hiredate <
    to_date(''hd'', ''Dd-Mon-YY'') ';
    DBMS_OUTPUT.PUT_LINE(sql_statement );
         OPEN sum_cv FOR sql_statement ;
         IF NOT sum_cv%ISOPEN THEN
              OPEN sum_cv FOR sql_statement;
         END IF;
         RETURN sum_cv;
    END Details ;
    END;
    RUN      EXEC      :CV := empTest.Details('10-DEC-01');
    ORA-01858: a non-numeric character was found where a numeric was
    expected
    2. sql_statement :=' SELECT * from emp where hiredate <
    to_date(hd) ';
    Run in the same way:
    ORA-00904: invalid column name
    3. sql_statement :=' SELECT * from emp where hiredate < to_date
    (''hd'') ';
    Run in the same way:
    ORA-01858: a non-numeric character was found where a numeric was
    expected
    Thanks

    Use the call syntax ...
    empTest.Details(to_date('10-DEC-01','DD-MON-RR'));
    .. or better yet ...
    empTest.Details(to_date('10-DEC-2001','DD-MON-YYYY'));
    As you are passing a date you do not need to use the to_date function in the cursor SQL statement.

  • How to pass in complex data to a web service using dynamic client

    I wrote to dynamic client to access the complex example in weblogic 7.000, I would
    like to know how I passed in a complex type to a dynamic client.

    An example of using dynamic client is attached:
    regards,
    -manoj
    "fkeita" <[email protected]> wrote in message
    news:3d051775$[email protected]..
    >
    I wrote to dynamic client to access the complex example in weblogic 7.000,I would
    like to know how I passed in a complex type to a dynamic client.[call4.jar]

  • How to pass IMAQ session to subVI

    Hi,
    My experience with LabView is neither very good nor extensive. I am a scientist and I am acquiring data with IMAQ.My current problem is that the people who wrote the script in the beginning made it neither versatile, nor modular nor clear structured. So I am trying to reduce the ridiculous numbers of execution controls in a single flowchart to a level that people can actually understand it... and to make the script more versatile for future experiments.
    I am introducing quite a few subVIs to be executed repetitively. However, I can't find out how to pass the IMAQ session on to the subVI. I always get error messages. In this case I want to acquire frames with OIDE_CollectFrame.vi controlled by OIDE_TrialPhaseCollect.vi. I couldn't figure out how to assign the IMAQ session refnum class, either.
    It's probably a newbie question but I usually don't program with LabView.
    Dennis
    P.S. I use LabView 2009
    Solved!
    Go to Solution.
    Attachments:
    OIDE_CollectFrame.vi ‏19 KB
    OIDE_TrialPhaseCollect.vi ‏15 KB

    Hi,
    See the attached example.  It passes the IMAQ session created in the main VI on to the subVI and then passses it again from the SubVI to the main VI.
    Regards,
    Greg H.
    Applications Engineer
    National Instruments
    Attachments:
    Snap.vi ‏14 KB
    Snap_Main.vi ‏38 KB

  • How to pass values to XML complex type of a Webservice using PL/SQL

    HI,
    I need to call a web service from PL/SQL that has an complex type element. That complex type element has 4 child elements each of integer type.
    I want to pass values for this complex type using SOAP_API.add_parameter but I can't understand how to pass the values.
    <xsd:element name="getBestFit">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element maxOccurs="1" minOccurs="1" name="circleId" type="xsd:string"/>
                        <xsd:element maxOccurs="1" minOccurs="1" name="usage" type="Q1:UsageInfoType"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
    <complexType name="UsageInfoType">
         <sequence>
              <element maxOccurs="1" minOccurs="1" name="a1" type="int"/>
              <element maxOccurs="1" minOccurs="1" name="a2" type="int"/>
              <element maxOccurs="1" minOccurs="1" name="a3" type="int"/>
              <element maxOccurs="1" minOccurs="1" name="a4" type="int"/>
         </sequence>
    </complexType>
    Please help me in getting a solution here.
    Thanks in advance.

    Have you tried doing a google search on "SOAP_API.add_parameter" to see what comes back? I see a lot of hits come back so hopefully one of those will help you. I've never used soap_api as I used utl_http to make WS calls. This required me to build the SOAP message (aka XML of a specific nature) by hand and then pass it to the WS using utl_http. How this approach is done via SOAP_API, I can't say.

  • How to pass table type variable into function from SQL*PLUS ?

    How to pass a table type variable from sql*plus prompt into a function ?
    Thanx in advance.

    Krishna,
    Do you mean like this?SQL> DECLARE
      2      TYPE t_tbl IS TABLE OF VARCHAR2(20);
      3      l_sample_tbl           t_tbl;
      4
      5      FUNCTION print_contents ( p_tbl IN t_tbl )
      6      RETURN VARCHAR2
      7      IS
      8          l_string            VARCHAR2(1000);
      9      BEGIN
    10          FOR i IN 1..p_tbl.COUNT LOOP
    11              IF (i = 1) THEN
    12                  l_string := p_tbl(i);
    13              ELSE
    14                  l_string := l_string || ', ' || p_tbl(i);
    15              END IF;
    16          END LOOP;
    17          RETURN (l_string);
    18      END print_contents;
    19
    20  BEGIN
    21      l_sample_tbl := t_tbl();
    22      l_sample_tbl.EXTEND;
    23      l_sample_tbl(1) := 'one';
    24      l_sample_tbl.EXTEND;
    25      l_sample_tbl(2) := 'two';
    26      l_sample_tbl.EXTEND;
    27      l_sample_tbl(3) := 'three';
    28      l_sample_tbl.EXTEND;
    29      l_sample_tbl(4) := 'four';
    30      l_sample_tbl.EXTEND;
    31      l_sample_tbl(5) := 'five';
    32      DBMS_OUTPUT.PUT_LINE(print_contents(l_sample_tbl));
    33  END;
    34  /
    one, two, three, four, five
    PL/SQL procedure successfully completed.
    SQL> HTH,
    T.

  • How to pass attribute of type java.util.ArrayList Property to a Tag

    How do I pass an attribute of type, java.util.ArrayList<my.entity.Property> to a Tag implementation class?
    Please advise!
    Thanks,
    Joe
    package my.tags;
    import java.io.IOException;
    import java.util.ArrayList;
    import javax.servlet.jsp.tagext.SimpleTagSupport;
    import javax.servlet.jsp.JspException;
    import my.entity.Property;
    public class PropertiesTag extends SimpleTagSupport {
        private ArrayList<Property> properties;
        public void setProperties(ArrayList<Property> properties) {
              this.properties = properties;
         public void doTag() throws JspException, IOException {
    <?xml version="1.0" encoding="utf-8" ?>
    <taglib ...>
         <tag>
              <name>propertiesTag</name>
              <tag-class>my.tags.PropertiesTag</tag-class>
              <body-content>empty</body-content>
              <description>Displays the product selection left menu</description>
              <attribute>
                   <name>properties</name>
                   <required>true</required>
                   <rtexprvalue>true</rtexprvalue>
                   <type>java.util.ArrayList<my.entity.Property></type>
              </attribute>
         </tag>
    </taglib>Here's the error message:
    org.xml.sax.SAXParseException: The element type "my.entity.Property" must be terminated by the matching end-tag "</my.entity.Property>".

    802826 wrote:
    How do I pass an attribute of type, java.util.ArrayList<my.entity.Property> to a Tag implementation class?
    Please advise!
    As already pointed out, there is no way to specify a generic type in a tag library descriptor. You may however specify an Object type in your tld and still have the variable in your tag as a parameterized generic type.
    In your tld change the type to Object.
    <type>java.lang.Object</type>.
    The properties tag itself needs no change and can continue to use parameterized types.
    cheers,
    ram.

  • How to pass one sapce to char type variable

    Hi,
    There is one import parameter in rfc "zstat" with char type and length 1. I want to pass value equal to one space in this variable during execution of RFC so that it passes the condition in code where it is not initial.
    But during runtime it doesnt store value equal to one space and become initial.
    So my question is how to pass value equal to one sapce to this variable.?
    Thanks in Advance!!!
    -Harkamal

    Hi!
    If it a char type, then its initial value is a SPACE character.
    If it confuses the program and you wanted to use it another way, then use numbers (type i - integer). It's initial value is "0".
    Or try to use other flag characters, like "T" for true and "F" for false values.
    Regards
    Tamá

  • How to pass parameter to cursor for loop having table type?

    Hi Friends,
    I am wondering how to pass a parameter into second for loop in the example code below.Please see the bold statements and answer my queries.
    Thanks a lot .Here is the code .
    declare
    l_bom_header_tbl BOM_BO_PUB.BOM_HEADER_TBL_TYPE ; ---TABLE TYPE
    V_bom_header_tbl Bom_Bo_Pub.Bom_Head_Rec_Type := Bom_Bo_Pub.G_MISS_BOM_HEADER_REC; ---Record type
    v_bom_components_tbl Bom_Bo_Pub.Bom_Comps_Tbl_Type := Bom_Bo_Pub.G_MISS_BOM_COMPONENT_TBL;---nested table type
    c:=0 number ;
    k:=1 number ;
    begin
    BOMPXINQ.Export_BOM(
    P_org_hierarchy_name => l_org_hierarchy_name,
    P_assembly_item_name => l_assembly_item_name,
    P_organization_code => l_organization_code,
    P_alternate_bm_designator => '1Test',
    P_Costs => l_costs,
    P_Cost_type_id => l_cost_type_id,
    X_bom_header_tbl => l_bom_header_tbl,
    X_bom_revisions_tbl => l_bom_revisions_tbl,
    X_bom_components_tbl => l_bom_components_tbl,
    X_bom_ref_designators_tbl => l_bom_ref_designators_tbl,
    X_bom_sub_components_tbl => l_bom_sub_components_tbl,
    X_bom_comp_ops_tbl => l_bom_comp_ops_tbl,
    X_Err_Msg => l_Err_Msg,
    X_Error_Code => l_Error_Code);
    if l_Error_Code = 0 then
    for i in 1 .. l_bom_header_tbl.COUNT LOOP
    V_bom_header_tbl.organization_code :='DSC';
    Can we assign a table type to record type like below statement?
    V_bom_header_tbl.assembly_item_name:= l_bom_header_tbl(i).assembly_item_name ;
    k:=1;
    I want to pass parameter  l_bom_header_tbl(i).assembly_item_name  into the for statement below: How to achieve this?
    for j in 1 .. l_bom_components_tbl.COUNT LOOP
    Can we assign a table type to table  type like below statement?
    v_bom_components_tbl(k).Assembly_Item_name := l_bom_header_tbl(i).assembly_item_name ;
    k := k + 1;
    end LOOP;
    end loop;
    end;
    Edited by: ILovePlSql on Mar 22, 2010 7:51 AM
    Edited by: ILovePlSql on Mar 22, 2010 8:16 AM

    ILovePlSql wrote:
    V_bom_header_tbl.assembly_item_name:= l_bom_header_tbl(i).assembly_item_name ;
    v_bom_header_tabl is a record type and l_bom_header_tbl is a table type .So is the above statement ok?I asked you for type definition. Please provide definition of BOM_BO_PUB.BOM_HEADER_TBL_TYPE and Bom_Bo_Pub.Bom_Head_Rec_Type. If BOM_BO_PUB.BOM_HEADER_TBL_TYPE is table of Bom_Bo_Pub.Bom_Head_Rec_Type then your statment is OK. For example:
    SQL> declare
      2      type BOM_HEADER_TBL_TYPE is table of emp%rowtype index by binary_integer;
      3      l_bom_header_tbl BOM_HEADER_TBL_TYPE;
      4      V_bom_header_tbl emp%rowtype;
      5  begin
      6      select * bulk collect into l_bom_header_tbl from emp;
      7      for i in 1 .. l_bom_header_tbl.count loop
      8        V_bom_header_tbl.ename := l_bom_header_tbl(i).ename;
      9      end loop;
    10  end;
    11  /
    PL/SQL procedure successfully completed.
    SQL> SY.

  • How to pass Visa Resoure Name parameter to labview dll in labwindows​​/cvi

    Hi, everyone
    I build a dll from labview, the prototype is : double  getchannelpower(double f, uintptr_t *VISAResourceName);
    I don't know how to pass VISAResourceName to this function.How can I get the VISAResourceName of this type(uintptr_t *)?
    Is it related to the paremeter ViPSession in function viOpen(ViSession sesn,ViRsrc rn,ViAccessMode am,ViUInt32 ti,ViPSession vi)?
    BRs,
    lotusky

    1. uintptr_t *VISAResourceName in the labview dll is connected to viOpen function as input parameter internally.
    2.I can call the labview dll in labview via CLF Node, when the VISAResourceName parameter is set  to Numeric(32-bit int or 32-bit usigned int) OR Adapt to data(Handle by Value). And I got the value of the VISAResourceName parameter, which is 0; When I directly connect 0 to the dll, it still works. But in labwindows, when  I pass 0 to the VISAResourceName parameter of the dll function, I got a FATAL RUN-TIME ERROR: The program has caused a 'General Protection' fault.
    mkossmann 已写:
    Could you check what exactly uintptr_t *VISAResourceName in your labview dll does.Might it be that it is connected to the labviews Dll internal ViOpen() ViSession output parameter ?.   And the name VISAResourceName is misleading.
    Another idea would be that Labview uses 32bit Unicode for the ResourceName. And you have to convert the C String to that Unicode first.

  • Default method - how to pass value to method container?

    Hello,
    I am dealing with a hyperlink in 'Objects and Attachements' section of the workitem.When i click on the link, the default method of the business object gets called automatically.
    My question is: How to pass values to the default method (i.e. method container) as i don't invoke the method in my workflow explicitly?  The method gets called when we click on the hyperlink.
    Regards,
    Monica.

    Hello Monica,
    a default method doesn't require parameters (and cannot make use of them), as they are designed to be called from various situation, such as the view from a workflow container, the display button within a workitem or the attachment list. So this is part of the system design.
    To make an object dependent of workitem values I usually follow two different design patterns:
    <b>1) Using a flowitem/workitem instance with a special default method</b>
    - Create a subobject from type WORKITEM (if I'm going to use values from the current workflow instance) or subobject from type WORKINGWI (if I'm going to use values from the current dialog workitem).
    - Do not make a general substitution for this new object type
    - If using a ZWORKITEM, create an instance of this object type before the dialog step and then pass this object to the dialog workitem
    - If using ZWORKINGWI, assign the object instance during the data flow to the step.
    - In the properties of the object choose (any one) default method
    - Within the coding you have the reference to the workitem/flowitem as object-key-... and you can further use functions/methods to read the workitem/flowitem container and do whatever has to be done
    <b>2) Retrieving values from the current workitem on-the-fly</b>
    Within the coding of the default method call the function module SWO_QUERY_REQUESTER that returns the instance/id of the current workitem-in-work (with is also set when using the hyperlink from a workitem). If the list is empty, there's no active workitem, otherwise use functions/methods to read the workitem container.
    --> edit: Solution is not release safe, is it aint working with SAP R/3 Enterprise and higher
    Best regards,
       Florin
    Message was edited by:
            Florin Wach

  • How to Pass Command line arguments to an exe created in LV8.0

    Hi Friends,
    I have Created an exe in LV8.0, which accepts the Folder path as input and executes.
    I want to call this exe passing the parameter (i.e folder path in my case)  from the command line argument. How to pass arguments to the exe ?
    Generally we may be having different types of input parameters to a vi like numeric control, string, boolean etc..If we create an exe that needs three input parameters among which one is boolean, other is string and third is a numeric value.
    How to pass these different types of input controls to the exe as parameters in command line at the same time?
    Thanks and Regards,
    SODLB

    I don't have any experience with the 8.x application builder, but the 7.x one has a checkbox for passing the arguments to the executable.
    As for reading them, there should be an example in the example finder (Help>>Find Examples) which shows how to do this. If you want to pass multiple parameters, I suggest you use a structure similar to NAME=VALUE, so that you can parse each element to find the = and then use a case structure to decide what to do with the parameters. This allows your users to enter or not enter any of the switches.
    Try to take over the world!

Maybe you are looking for