Using TestStand How I pass an array of data into a DLL (IPC3.dll) for serial communication

I am ussing a DLL created by another party. I have the list of the C declaretions. I have been able to write a seq that can turn the comport ON/OFF or select a different port but I have not been able to send or recieved any data. I have created an array of bytes(unsigned 8-bit integers)to send and recieved data but nothing goes out or in.

Hi Toro,
There is an example in your \Examples\AccessingArrays\PassingArrayParametersToDLL directory that illustrates exactly how to pass TestStand arrays as arguments to dll functions. The source files for the .dll are located in the same directory.
For more information on passing arrays as parameters to modules you should read the "DLL Flexible Prototype Adapter" section of Chatper 13 in the TestStand User Manual, and pay special attention to the subsection entitled "Array Parameters". You can access the User Manual from the TestStand Start Menu group, the TestStand Sequence Editor's Help menu, the \Doc directory, or online at the following link:
http://digital.ni.com/manuals.nsf/websearch/50B69DA356B8D38C86256A0000660E6B?OpenDocumen
t&node=132100_US
Jason F.
Applications Engineer
National Instruments
www.ni.com/ask

Similar Messages

  • How to pass byte array / binary data to a webservice as parameter in osb

    i have a webservice that has a byte array input parameter. i tried to use this WS in a message flow via service-callout. the problem i encountered is the following: since webservice call by using service-callout requires you to use an xml input as part of soap message, i insert both of $body/ctx:binary-content and $body/ctx:binary-content/@ref variables individually into this xml-message to pass binary-data to WS. When i debug the code, i see that it make calls to WS with $body/ctx:binary-content/@ref parameter, but the byte array passed is empty(not NULL)...
    note: i tried java-callut instead of service-called and used $body/ctx:binary-content as input parameter it worked. i think, this is because java-callout doesnt need an xml input and enable to take variables as is...
    can anybody help me to solve the problem with service-callout please?
    here is the input i use to call ws with service-callout method...
    <iso2Xml xmlns="http://www.mycompany.com.tr">
    <request>{$body/ctx:binary-content/@ref}</request>
    </iso2Xml>
    and this is my WS's signature:
    @WebMethod
    public String iso2Xml(byte[] request)

    Hi
    See this thread
    /message/2187817#2187817 [original link is broken]
    Kind Regards
    Mukesh

  • How to pass int array as an IN parameter to PLSQL Procedure

    Hi,
    How to pass int array in java to a stored procedure througn jdbc
    and what type of data type I should declare to this IN parameter
    in PLSQL Procedure.
    Thanks,
    Simi

    Hi,
    The best way to do what you want depends on what you want.  Start by describing what you need to do.  It's best to post some sample data (CREATE TABLE and INSERT statments) and what results you want from that sample data.  (See the forum FAQ: https://forums.oracle.com/message/9362002)
    If you have ideas about how to do the job (e.g., populating a temporary table) it can be helpful to include those, too, but distinguish clearly between WHAT you need to do and HOW you might do it.
    As Bencol suggested, a SYS_REFCURSOR might be the best way to pass back the results.
    Since you didn't post your table, or even describe what you wanted to do with it, I'll illustrate using scott.emp, which is probably on your system.
    Say you wanted a procedure that took a DATE as an argument, and returned a some designated columns (empno, ename and hiredate in the example below) for all employees hired on or after the given DATE.  You might write a procedure like this:
    CREATE OR REPLACE PROCEDURE  hired_since
    (   start_date  IN   DATE
    ,   out_data    OUT  SYS_REFCURSOR
    AS
    BEGIN
        OPEN out_data FOR
            SELECT  empno, ename, hiredate
            FROM    scott.emp
            WHERE   hiredate  >= start_date;
    END  hired_since;
    SHOW ERRORS
    You can test it in SQL*Plus like this:
    VARIABLE   c REFCURSOR
    EXEC  hired_since (DATE '1982-01-01', :c);
    PRINT :c
    The output I got from this test was:
         EMPNO ENAME      HIREDATE
          7788 SCOTT      19-APR-87
          7876 ADAMS      23-MAY-87
          7934 MILLER     23-JAN-82

  • How to pass an array to a stored procedure

    create or replace package demo_pkg
    as
    type cityArray is table of city%rowtype index by binary_integer;
    procedure city_report( p_inputs in cityArray );
    end;
    CREATE OR REPLACE PACKAGE BODY demo_pkg
    AS
    PROCEDURE city_report (p_inputs IN cityarray)
    IS
    BEGIN
    FOR i IN 1 .. p_inputs.COUNT
    LOOP
    DBMS_OUTPUT.put_line ( 'citycode = '
    || p_inputs (i).city_code
    || ' CITYDESCRIPTION = '
    || p_inputs (i).city_description
    INSERT INTO testing
    (city_code, city_description
    VALUES (p_inputs (i).city_code, p_inputs (i).city_description
    commit;
    END LOOP;
    END;
    END;
    to call that procedure ia m using this
    declare
    my_data demo_pkg.cityArray;
    begin
    my_data(1).city_code := 1234;
    my_data(1).CITY_DESCRIPTION := 10;
    my_data(2).city_code := 4567;
    my_data(2).CITY_DESCRIPTION := 20;
    my_data(3).city_code := 4321;
    my_data(3).CITY_DESCRIPTION := 30;
    demo_pkg.city_report( my_data );
    end;
    but actually the procedure (demo_pkg.city_report)is called from front end(.net).how they will call this procedure in .net invironment

    Hi,
    Your exact question has been asked before, see: http://asktom.oracle.com/pls/ask/search?p_string=How+to+pass+an+array+to+a+stored+procedure
    or do a search on this forum.
    And please use this tag => (yes, just the 4 characters forming the word 'code' between curly brackets)
    *before* and *after* your example to maintain formatting and indentation, it's hard to read now....                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to store array of data into a single row of  table ,using any of Stmts

    HI Friends,
    Based on my requirements ,i have retrived a set of data from a XXX.jsp page using a request.getParameter() and stored into single dimenssional array . Now i am paassing that array to JAVA class to store a into some table .
    In JSP page users can add text boxes dynamically based on his intrest then those attributes will store in table .it means table attributes are not conatant , it table attributes may change at any time when user adds any textboxs or any fields on JSP page ....thats my module ..
    Now i wanted to store all array of data into Table in a single row .......thats is my requirements .
    How can we use prepareStatement and Statement to store array of results intoo table row ...on each iteration i wanted to store array of results into table atributes ..It means entire array of results should to into table row at time .....coule any one write sytax ,how we do this...
    could any one suggest me stps that i can impliment ......?....please reply ASAP

    Well ..you code can be works for constant number of attributes in table .oopss here my requirement is table attributes not fixed ,we cant put constant number of place holder(? ) in a statement ,because those are not fixed ,
    Let me explain here :
    i am doing in that way only. As i mentioned you Table attributes are not constant .It may very if users add any fields dynamically on JSP page .If users have option to add any text box on Jsp page ,then that attribute will store in table as a attribute .
    Now i amable fetching the all dyamic form data and stored in a Result Array below ...in this iteration all form result data are from jsp page as suggestion form ,it should stored in table in single row on corrsponding attribtes ......next time when users fills FROM ,then those data i am fetching and storing in a Result Array as below and need to store in corrsponding table attributes in a single row ....
    for(int i=0;i<result.length;i++)
                   System.out.println(result);
                   pst3=connection.prepareStatement("insert into *emprecord* values(?)");
                   if(!result[i].equals(""))
                        System.out.println(result[i]);
                             pst3.setString(1,result[i]);
                             pst3.executeUpdate();
    Thnks in advance ....let me know the the way we can store dynamic form data into dyanamic table ...

  • How to pass an Array to jsp:param

              Hi,
              I am trying to find out how to pass an array to a jsp:param tag abnd then retrieve
              the values in the next page. Please help soon. Thanks
              Here's my code - Assume the books array has more than 1 value
              String[] books = request.getParameterValues("book");
              <jsp:include page="<%=contentPage%>" flush="true">
              <jsp:param name="bookSelected" value="<%= books %>" />
              </jsp:include>
              The 'contentPage' takes me to the next page where I have the following to retrieve
              the value of 'bookSelected'
              String[] bookSelected = request.getParameter("bookSelected");
              I tried accessing the array like this
              if(bookSelected.equals("book1"))
              but did not succeed.
              I tried accessing the array in a loop but it did not work. Here's what I tried.
              <jsp:include page="<%=contentPage%>" flush="true">
              <%for (int i = 0; i<books.length; i++){
              %>
              <jsp:param name="bookSelected" value="<%= books %>" />
              <% } %>
              </jsp:include>
              

    Hi
    tell me how you redirect from __confirmdelete.jsp:__ to deleteServlet.java..
    and post detail code of __confirmdelete.jsp:__

  • How can I pass a Presentation Variable (Date) into a prompt

    Hello
    How can I pass a Presentation Variable (date) into a prompt? I seem to be able to do this successfully for a non-date value but have had no luck with a Date variable.
    Here's a simplistic version of what I'm trying to do:
    1. I have a Presentation Variable called startDate which is a Date that defaults to this SQL - SELECT "Reporting Dates"."Measure Date" FROM Trading WHERE "Reporting Dates"."Date Name" = 'Current'.
    2. I now want to pass this variable into a prompt with SQL like this: SELECT "Position Date"."Position Date" FROM Trading where "Position Date"."Position Date" = date'@{startDate}{2009-04-24}'
    I get this error: Datetime value @{startDate}{2009-04-24} from @{startDate}{2009-04-24} does not match the specified format.
    Now I can use the exact same syntax in a filter. For example, a simple Answers request where I pick Position Date with a filter saying "Position Date"."Position Date" = date'@{startDate}{2009-04-24}' works fine.
    What am I doing wrong?
    Thanks!

    Can you provide more information please?
    1. What is the format of the first date prompt, is it YYYY-MM-DD or?
    2. Which data type is Position Date."Position Date" in the physical layer, date or date time?
    3. What is the column formula in the first prompt?
    4. The first prompt is set to drop-down or?
    5. If you are using this SQL Results in the second prompt:
    SELECT "Position Date"."Position Date" FROM Trading where "Position Date"."Position Date" = date '@{startDate}{2009-04-24}'
    then @{startDate} must be in YYYY-MM-DD format to work properly, otherwise (for example):
    datetime value 01/01/2000 from 01/01/2000 does not match the specified format.
    This doesn't work for example:
    SELECT Times.time_id FROM "Normal model" where Times.time_id =date '01/01/2000'
    Regards
    Goran
    http://108obiee.blogspot.com

  • How to get the plsql table data into output cursor

    Hi,
    Could anybody please help me.
    Below is an example of the scenario..
    CREATE OR REPLACE PACKAGE chck IS
    PROCEDURE getdata(dept_no IN VARCHAR2,oc_result_cursor OUT sys_REFCURSOR);
    TYPE get_rec is record (ename varchar2(20),
    eno number(12));
    TYPE t_recs IS TABLE OF get_rec INDEX BY BINARY_INTEGER;
    emp_tab t_recs;
    END chck;
    CREATE OR REPLACE PACKAGE BODY chck AS
    PROCEDURE getdata(dept_no IN VARCHAR2,oc_result_cursor OUT sys_REFCURSOR)
    is
    BEGIN
    select ename, eno
    bulk collect into emp_tab
    from emp;
    open oc_result_cursor for select * from table(emp_tab); -- I believe something is wrong here ....
    END;
    END chck;
    the above package is giving me an error:
    LINE/COL ERROR
    10/29 PL/SQL: SQL Statement ignored
    10/43 PL/SQL: ORA-22905: cannot access rows from a non-nested table
    item
    let me know what needs to be changed
    Thanks
    Manju

    manjukn wrote:
    once i get the data into a plsql table, how to get this plsql table data into the cursor?There is no such thing as a PL/SQL table - it is an array.
    It is nothing at all like a table. It cannot be indexed, partitioned, cluster, etc. It does not exist in the SQL engine as an object that can be referenced. It resides in expensive PGA memory and needs to be copied (lock, stock and barrel) to the SQL engine as a bind variable.
    It is an extremely primitive structure - and should never be confused as being just like a table.
    Its use in SQL statements is also an exception to the rule. Sound and valid technical reasons need to justify why one want to push a PL/SQL array to the SQL engine to run SELECT 's against it.

  • How to store the flat file data into custom table?

    Hi,
    Iam working on inbound interface.Can any one tell me how to store the flat file data into custom table?what is the procedure?
    Regards,
    Sujan

    Hie
    u can use function
    F4_FILENAME
    to pick the file from front-end or location.
    then use function
    WS_UPLOAD
    to upload into
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'   "Function to pick file
        EXPORTING
          field_name = 'p_file'     "file
        IMPORTING
          file_name  = p_file.     "file
      CALL FUNCTION 'WS_UPLOAD'
       EXPORTING
         filename                       = p_file1
        TABLES
          data_tab                      = it_line
    *then loop at it_line splitting it into the fields of your custom table.
    loop at it_line.
              split itline at ',' into
              itab-name
              itab-surname.
    endloop.
    then u can insert the values into yo table from the itab work area.
    regards
    Isaac Prince

  • How can I read the trace data into LabVIEW for E5071B

    HI 
    I am setting up the measurement using vector network analyzer (VNA) E5071B controlled by NI 488.2. How can I read the trace data into LabVIEW and display on the graph? If anyone having an idea or know well about this process please give me the suggestion, I will much appreciate it.
    Many Thanks

    You want to start with the driver
     In case you do not know it, you can do the driver search in LabVIEW from Tools>Instrumentation>Find Instrument Drivers. You might also want to bookmark the Instrument Driver Network for information on what a driver is and how to use it.

  • How  to Pass String array from Java to PL/SQL  and this use in CURSOR

    hi,
    I cant understand how to pass Array String as Input Parameter to the Procedure and this array use in Cursor for where condition like where SYMPTOM in( ** Array String **).
    This array containing like (SYMPTOM ) to be returned from the java to the
    pl/sql (I am not querying the database to retrieve the information).
    I cannot find an example on this. I will give the PL/SQL block
    create or replace procedure DISEASE_DTL<*** String Array ***> as
    v_SYMPTOM number(5);
    CURSOR C1 is
    select distinct a.DISEASE_NAME from SYMPTOM_DISEASE_RD a
    where ltrim(rtrim(a.SYMPTOM)) in ('Fever','COUGH','Headache','Rash') ------- ***** Here use this array element(like n1,n2,n3,n4,n5..) ******
    group by a.DISEASE_NAME having count(a.DISEASE_NAME) > 3 ----------- ***** 3 is no of array element - 1 (i.e( n - 1))*****
    order by a.DISEASE_NAME ;
    begin
    for C1rec IN C1 loop
    select count(distinct(A.SYMPTOM)) into v_SYMPTOM from SYMPTOM_DISEASE_RD a where A.DISEASE_NAME = C1rec.DISEASE_NAME;
    insert into TEMP_DISEASE_DTLS_SYMPTOM_RD
    values (SL_ID_SEQ.nextval,
    C1rec.DISEASE_NAME,
    (4/v_SYMPTOM), --------**** 4 is no of array element (n)************
    (1-(4/v_SYMPTOM)));
    end loop;
    commit;
    end DISEASE_DTL;
    Please give the proper solution and step ..
    Thanking you,
    Asish

    I've haven't properly read through your code but here's an artificial example based on a sql collection of object types - you don't need that, you just need a type table of varchar2 rather than a type table of oracle object type:
    http://orastory.wordpress.com/2007/05/01/upscaling-your-jdbc-app/

  • How to pass an array to a procedure & how to use array in IN clause in SQL

    Hi all,
    how do i pass an array of varchar2[10] in an procedure and i want to use this array in the IN caluse of the SQL statement inside the procedure. Can anyone please help me on this.
    Thanks & regards
    shyam~

    There are multiple ways. For example:
    SQL> create or replace
      2    type str10_tbl_type is table of varchar2(10)
      3  /
    Type created.
    SQL> -- Using TABLE operator
    SQL> create or replace
      2    procedure p1(
      3                 p_str10_tbl str10_tbl_type
      4                )
      5      is
      6      begin
      7          for rec in (
      8                      select  ename,
      9                              sal
    10                        from  emp,
    11                              table(p_str10_tbl)
    12                        where ename = column_value
    13                     ) loop
    14            dbms_output.put_line(rpad(rec.ename,10) || rec.sal);
    15          end loop;
    16  end;
    17  /
    Procedure created.
    SQL> set serveroutput on format wrapped
    SQL> exec p1(str10_tbl_type('KING','ALLEN','SMITH'));
    KING      5000
    ALLEN     1600
    SMITH     800
    PL/SQL procedure successfully completed.
    SQL> -- Using MEMBER OF method
    SQL> create or replace
      2    procedure p1(
      3                 p_str10_tbl str10_tbl_type
      4                )
      5      is
      6      begin
      7          for rec in (
      8                      select  ename,
      9                              sal
    10                        from  emp
    11                        where ename member of p_str10_tbl
    12                     ) loop
    13            dbms_output.put_line(rpad(rec.ename,10) || rec.sal);
    14          end loop;
    15  end;
    16  /
    Procedure created.
    SQL> set serveroutput on format wrapped
    SQL> exec p1(str10_tbl_type('KING','ALLEN','SMITH'));
    SMITH     800
    ALLEN     1600
    KING      5000
    PL/SQL procedure successfully completed.
    SQL> SY.

  • How to pass an array to a function from a SELECT statement

    Hi all. I have a problem with passing an array to a function directly from a SELECT statement.
    Here is what I want. If I have a function
    function AAA(arrayVar <ArrayType>) return number;
    I want to be able to call this function this way
    select AAA((2,3,4))
    from dual
    or this way
    select AAA((10,12))
    from dual
    In other words I want to be able to pass an arbitrary number of numbers to the function. And I want this to work in a SELECT statement.
    Does anyone have any ideas how to implement this? What <ArrayType> should I use?(I've read about VARRAY, nested tables in the Oracle documentation but as far as I've understood these array types are meant to be used within PL/SQL blocks).
    I found only this http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:208012348074 through Google but it didn't help me.
    Thank you in advance.

    > What <ArrayType> should I use?
    SQL data types - as 3360 showed above. You cannot use PL/SQL structures and user types in the SQL Engine.
    You can however use all SQL structures and types in PL/SQL.
    Arrays in SQL is created as collection type - basic o-o. The collection type (or class) serve as a container for instantiated objects or scalar type.
    This is covered in detail in [url http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14260/toc.htm]
    Oracle® Database Application Developer's Guide - Object-Relational Features

  • How to pass an array of values to  a view criteria

    Hi all,
    How to pass mutiple values as array into a view criteria.I want to search
    based on mutiple values.
    Please help.
    Thanks

    Swapna wrote:
    I have a search panel with mutilselect combobox for attributes "a","b", & "c".
    Based on selction"a" ,I need to filter the comboboxes "b" and "c".
    This's the requirement.I'm not sure that I understand your question. Are you saying that you have three different controls in your UI? Or one control that has three possible values?
    Assuming that you have one control with three possible values, if "a" is selected, does that mean that you want all rows where some column has a value of "a"? Or does that mean that you want all rows where that column does not have a value of "a"? Or does that mean that you want all rows where that column has a value of "b" or "c" (note that the last two may be different if the column allows NULL values).
    What language is your application written in? What framework/ library are you using to access the database? Are you passing a PL/SQL collection of selected values?
    Justin

  • How to pass an array which in the jsp to a javascript file

    now i have 2 files: jsp and js(javascript)
    i want pass an array which in the jsp to another file--> js file
    how can i do it ???
    can u give me some related links or some source codes as the references???
    thx

    bcos ....my senior has resigned!!! so i take over his job !!!!!
    depend on the talent and the project ....only that way to implement to whole project !!!!
    but , i had settled it already ....
    it is very simple
    in the middle.jsp
    Collection result = menuManager.getUserRoleMenu(webSessionUser.getGnuserId());
    String menuname[]=new String[110];
    int menucounter=0;
    Iterator vi = result.iterator();
    while(vi.hasNext())
    HashMap hm=(HashMap)vi.next();
    menuname[menucounter]=hm.toString();
    menucounter++;
    int i;
    String tempstr="";
    for(i=0;i<menuname.length;i++)
    tempstr+=menuname[i]+",";
    session.setAttribute("menuname",tempstr);
    %>
    <script language="javascript">
    menu123("<%=tempstr %>");
    </script>
    in the body,js
    function menu123(string123)
    //doing
    so ....through the script --menu123
    i can get the string from jsp to the js!!!!!
    is it very simple, but it spends my 2 days!!!
    i just learn javascript ....about 1 month !!!

Maybe you are looking for