Calling a char** array_name type of variable in the DLL.

Hi,
I have to call an external DLL from LabVIEW but I have the following issue. One one of the other forum posts, this issue, I think, had been addressed, by I guess editing the DLL itself, or maybe I did not understand the solution right. But I do not have access to the DLL code. I just have the header which has a function definition with char **.
The "Import DLL" functionality of LabVIEW is mistaking char** for a string, and so I cannot use that too. If I wire a string to the input, then the DLL throws an exception giving Error 1097.
Calling convention is C.
The header file has the following function definition:
DWORD Send(DWORD args, char ** strng)
So I think the DLL expects an array of Strings. I tried the Type: Array of "8 bit unsigned integers" using "Array Handle" in Call Library Function Node, which led to the following preview:
uint32_t Send(uint32_t args, Array1DUint8_t **strng);
Thus I give one string , and convert the characters to 8 bit unsigned array and LabVIEW code looks as shown as below: (Instead of Array of Strings). The input "1" is number of arguments/strings.
This code runs without error 1097. But my DLL reads the string as random symbols. One example is shown as:
I do not know why my DLL is reading random things from memory. I am pretty sure its expecting pointer to pointer of character, and may be LabVIEW is giving something different.
I also tried an array of strings, and used "Adapt to type" in the CLN, but then the output changes from random characters to some number. (Like x5bc087305bc003b5.....
Any help will be appreciated.
Also, I have come across posts which say I have to write an external wrapper. I do not want to do anything outside the LabVIEW environment as far as possible, and moreover have almost zero experience in writing one. Thus if a solution in LabVIEW exists, then it would be optimum.
Thanks.

You need to know what the DLL expects here: a pointer to a single string, an array of pointers to strings, or something else?  Is the "strng" value an input, an output, or both?  Without an understanding of the function call requirements it's not possible to provide specific advice.  However, it is most likely possible to get this working in LabVIEW.  You will probably need to use DSNewPtr, MoveBlock, and DSDisposePtr.  These are all memory manager functions that you can call from a Call Library Function Node by setting the library name to "LabVIEW" and these functions are documented in the LabVIEW help.  They will allow you to get a pointer to a string, or an array of pointers as appropriate.  You can find one example of using these functions to generate an array of strings in this thread at LAVA: "Passing array of string to C dll."

Similar Messages

  • When I use Call Library Function Node in real time, is the DLL loaded once for all or load every time it is called?

    When I use Call Library Function Node in real time, is the DLL loaded once for all or load every time when it is called?
    I have a time critical real time application, in which I use a piece of DLL function developed by C++.  It is OK?  Could any senior developer assure me?
    Thank you in advance.
    Solved!
    Go to Solution.

    qing_shan61 wrote:
    When I use Call Library Function Node in real time, is the DLL loaded once for all or load every time when it is called?
    Once
    qing_shan61 wrote:
    I have a time critical real time application, in which I use a piece of DLL function developed by C++.  It is OK?
    OK
    Be sure that all DLL calls are thread safe (do not perform calls in UI thread).
    Also for real-time application you need real-time OS.
    Andrey.

  • Char data type in mvc

    Char data type taking the numeric value  instead  of char data type while binding in the Mvc view

    For MVC questions please use the ASP.NET forums:
    http://forums.asp.net/1146.aspx/1?MVC

  • Using attribute variables in the planning folders

    Hi all,
    Is there way to use attribute variables in the planning folders?
    There is a following situation. We have a number of cost centers (0COSTCENTER). Cost center has responsible person (0RESP_PERS) as attribute.
    We planning some costs for cost center.
    To select certain cost center to cost planning we created
    variable ZVAR1 as type CHAR and placed this variable in the header of planning folder.
    Now we have to restrict list of cost center for selection according to selected responsible person.
    Of course, I can add 0RESP_PERS to my cube, create variable ZVAR2 as type CHAR based on this character. Then place this variable to folder. For variable ZVAR1 use type of replacement as "User Exit" and ABAP routine will restrict list of available cost centers based on value of ZVAR2.
    But... Is there way to use variable with type of attribute and place this variable to header of folder?
    Thanks in advance!

    Hi Dmitry,
        Yes, you can use the attribute variable in your folder.
        Just create attribute variable with 0COSTCENTER as the basic char and 0RESP_PERS as attribute.then when you create your folder with UPSPM, make sure to choose notweb-enable type then under the variable category you will see the the attribute vairable you just created at BPS0, just drug it to you folder, you are done.

  • How to call VC++ dll whiich return char[] data type value in powerbuilder

    Hi Everyone,
    I am using PowerBuilder 11.1 build 8123.
    I am calling VC++ DLL in our PowerBuilder application which return char[] data type value.
    I just declare Global External Function:-
         Function  char getOSSectionName() library "DocServClient.dll" alias for "getOSSectionName;Ansi"
    And then call this function in window as:-
         Char      ls_section[1] = 'DOCAPPLICATIONS9X'
         ls_section[1]=getOSSectionName()
    When I check ls_section[1] value in messagebox it display a symbol (please check attached attached image.)
    VC++ function and return variable declaration:-
         __declspec(dllexport) char *  __stdcall getOSSectionName()
           char    SectionName[_MAX_PATH];
    Please let me know that my code is valid or not.
    Please help..

    Hi,
    Thanks to Everyone for your suggestions.
    I am solved my problem to change VC++ function as :-
         Int __declspec(dllexport)  __stdcall getOSSectionName(char* SectionName)
                        instead of
         __declspec(dllexport) char *  __stdcall getOSSectionName()
    and declare global function as:-
           Function int getOSSectionName(Ref char ls_section[100]) library "DocServClient.dll" alias for "getOSSectionName;Ansi"
    and call function in window as:-
         int li_ret
         char ls_section[100]
         string ls_sec
         li_ret=getOSSectionName(REF ls_section)
         ls_sec=ls_section
    Thanks,
    Vikrant

  • Human tasks, complex types and variable assignment.

    Hi folks,
    I encountered a problem while working with 10.1.3.1 which I haven't managed to solve yet and would be grateful for assistance. I have defined a complex data type (just a sequence of strings) and want to fill that data type by going through a flow of screens, e.g. through several human tasks. I have defined that type as a variable to the BPEL process and have managed to assign simple expressions to the variable and pass that into a Human Task. In the task I see now a simple input form for all attributes of the type.
    Now the problem. After I fill out the form and complete the human task, I have
    The global variable:
    <outputVariable>
         <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
              <MyProcessResponse xmlns="http://xmlns.oracle.com/VacationRequest">
                   <vorname/>
                   <nachname/>
                   <strasse/>
                   <nummer/>
                   <postleitzahl/>
                   <stadt/>
                   <maximaleDauer/>
                   <minimaleDauer/>
              </MyProcessResponse>
         </part>
    </outputVariable>
    and the return value from the human task:
    <task>
         <title>CaptureData</title>-
              <payload>
                   <MyProcessResponse>
                        <vorname>David</vorname>
                        <nachname>Beckham</nachname>
                        <strasse>HighStreet</strasse>
                        <nummer/>
                        <postleitzahl/>
                        <stadt/>
                        <maximaleDauer/>
                        <minimaleDauer/>
                   </MyProcessResponse>
              </payload>
    </task>
    Now the only thing I would like to do is to replace the original values in the variable with the new values that have been returned from the task, this should be performed in an extra assign step. Sounds simple. JDeveloper wouldn't even let me klick through the return value from the HumanTask, so it seems as if I have to do things manually.
    These are my tries:
    Command 1:
    <copy>
         <from variable="CaptureData_1_globalVariable"
    part="payload" query="/task:task/task:payload" />
    <to variable="outputVariable" part="payload"
    query="/ns1:MyProcessResponse"/>
    </copy>
    Result 1:
    <outputVariable>
         <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
              <ns0:MyProcessResponse xmlns="http://xmlns.oracle.com/bpel/workflow/task"     xmlns:ns0="http://xmlns.oracle.com/VacationRequest">
                   <MyProcessResponse xmlns="http://xmlns.oracle.com/VacationRequest">
                        <vorname>David</vorname>
                        <nachname>Beckham</nachname>
                        <strasse>HighStreet</strasse>
                        <nummer/>
                        <postleitzahl/>
                        <stadt/>
                        <maximaleDauer/>
                        <minimaleDauer/>
                   </MyProcessResponse>
              </ns0:MyProcessResponse>
         </part>
    </outputVariable>
    --> There is one MyProcessResponse element too many
    Command 2:
    <copy>
         <from variable="CaptureData_1_globalVariable"
    part="payload" query="/task:task/task:payload"/>
    <to variable="outputVariable" part="payload"
    query="/ns1:MyProcessResponse/ns1:vorname"/>
    </copy>
    Result 2:
    <outputVariable>
         <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
              <MyProcessResponse xmlns="http://xmlns.oracle.com/VacationRequest">
                   <ns0:vorname xmlns="http://xmlns.oracle.com/bpel/workflow/task"                     xmlns:ns0="http://xmlns.oracle.com/VacationRequest">
                        <MyProcessResponse xmlns="http://xmlns.oracle.com/VacationRequest">
                             <vorname>David</vorname>
                             <nachname>Beckham</nachname>
                             <strasse>HighStreet</strasse>
                             <nummer/>
                             <postleitzahl/>
                             <stadt/>
                             <maximaleDauer/>
                             <minimaleDauer/>
                        </MyProcessResponse>
                   </ns0:vorname>
                   <nachname/>
                   <strasse/>
                   <nummer/>
                   <postleitzahl/>
                   <stadt/>
                   <maximaleDauer/>
                   <minimaleDauer/>
              </MyProcessResponse>
         </part>
    </outputVariable>
    --> This was moreless expected, since I tried to copy the stuff to some wrong place.
    Command 3:
    <copy>
         <from variable="CaptureData_1_globalVariable"
    part="payload" query="/task:task/task:payload/ns0:MyProcessResponse"/>
    <to variable="outputVariable" part="payload"
    query="/ns1:MyProcessResponse"/>
    </copy>
    Result 3:
    --> Task does't return (!!!). In the BPEL Worklist, the task is completed, however in the BPEL console it still apears as "waiting to return from Human task".
    Does anyone have a hint on how to copy the values so that I get exactly the structure that I printed at the very top?
    Thanks for help. Rock On !

    Hello everyone,
    It seems that we are talking about different things, I am afraid. Let me describe the scenario once again:
    - I want to have a BPEL process with more than one role involved
    - This process should be used to gather some complex data.
    - All data gathering should be done through HumanTasks.
    So I defined an xsd complex type, that contains a sequence of fields. This complex type should be part of the process payload.
    Now before HumanTask 1 is called, I copy the contents of this variable into the input for tasks1. This works fine and I see the appropriate values, when opening the Human Task in the BPEL worklist application.
    Now after HumanTask1 is completed, the values I entered inside that tasks are returned as a variable from the HumanTask. My problem is, that I cannot copy the contents of the task back into the main process. With simpleTypes this is relatively ok, since Jdev supports the assembling of the copy operation, however for complex tasks it fails.
    A typical scenario for this would be where e.g. a customer fills a shipping address and afterwards a store staff fills product details in the same order. In Java this could be solved via "pass by reference". Who can provide an example?

  • How to get data type of variable in program..

    Hi ABAP Guru.
    I need to know how to get data type of variable or any structure field.. because I got short dump when use command REPLACE ALL OCCURANCE ... with variable/structure field that has data type I or P, I think it should be used with data type CHAR only, So I need to check the data type first.
    Please give me your advice
    Thank you all.
    Nattapash C.

    data : v_value type i,
             v_char(10) type c.
    v_value = 10.
    move v_value to v_char.
    REPLACE ALL OCCURRENCES of '#' from v_char....
    Best regards,
    Prashant

  • Trace the variable in the peoplecode called by iScripts

    Hi,
    Do you have the experience on tracing the variable value of the peoplcode in iScript ? Which  peoplecode trace setting options i need to select ?
    I want to trace the some HTML variable in the method called by the iScript method.  I used most of the options in the peoplecode trace setting but the value can not be populated in the file.
    Thanks in advance.

    The PeopleCode trace setting traces ALL PeopleCode regardless of the event type. It doesn't matter whether it is an iScript or a component event. It will trace it. An easy way to generate a trace for an iScript is to use the New Window link to open two windows. In one window go to PeopleTools > Utilities > Debug > Trace PeopleCode and click save. In your other window, go to your iScript. After the iScript loads, go back to the trace window, uncheck everything, and save. This will trace just your iScript.
    Now, something in your question makes me wonder if this is what you really want. You said, "I want to trace the some HTML variable in the method called by the iScript method." You can see values in a trace file if you select Show Assignments to Variables, Show Fetched Values, Show Parameter Values, and Show Return Parameter Values. Just to confirm, this is just PeopleCode. It is the term "HTML variable" that is confusing me. PeopleCode only has PeopleCode variables, not HTML variables. A PeopleCode code listing may have variables that contain HTML content, but that would be a string variable type, not an HTML variable. The reason I point this out is because in HTML you have JavaScript variables. There is a lot going on at the client side that doesn't show in a PeopleCode trace file. PeopleCode doesn't trace anything that happens in the JavaScript and HTML.
    One more thing that confused me about the question that made me wonder if you really want a PeopleCode trace or JavaScript/HTML. iScripts are functions, not methods. An iScript can call a FUNCLIB function or an App Class method. Does the code you are trying to trace reside in the iScript or in a function/method called by the iScript? The reason I point these things out and ask these questions is just to get clarity around what, exactly you are trying to trace. JavaScript can have methods, and those methods would be in HTML.

  • Record type variables in the SQL database trace file

    Hi,
    I turned on the trace with binds and waits in a ebusiness form and captured the database SQL trace file. It lists the values for the generic datatypes for the call, but does not list the values of record type variables. Is there a way to identify the values of record type variables? The below section lists the procedure call and the values passed. Thanks in advance.
    RPC CALL:PROCEDURE APPS.HZ_PARTY_SEARCH.FIND_PARTY_DETAILS(P_INIT_MSG_LIST IN VARCHAR2, P_RULE_ID IN NUMBER, P_PARTY_SEARCH_REC IN PARTY_SEARCH_REC_TYPE, P_PARTY_SITE_LIST IN PARTY_SITE_LIST, P_CONTACT_LIST IN CONTACT_LIST, P_CONTACT_POINT_LIST IN CONTACT_POINT_LIST
    , P_RESTRICT_SQL IN VARCHAR2, P_MATCH_TYPE IN VARCHAR2, P_SEARCH_MERGED IN VARCHAR2, X_SEARCH_CTX_ID OUT NUMBER, X_NUM_MATCHES OUT NUMBER, X_RETURN_STATUS OUT VARCHAR2, X_MSG_COUNT OUT NUMBER, X_MSG_DATA OUT VARCHAR2);
    RPC BINDS:
    bind 0: dty=1 bfp=2ae5927c13c8 flg=08 avl=01 mxl=01 val="T"
    bind 1: dty=6 bfp=2ae5927c13f0 flg=00 avl=02 mxl=22 val=8
    bind 2: dty=118 bfp=2ae593432e48 flg=00 avl=00 mxl=00 val=00
    bind 3: dty=251 bfp=2ae5929ac0b8 flg=00 avl=1944 mxl=00 val=00
    bind 4: dty=251 bfp=2ae592d85548 flg=00 avl=5336 mxl=00 val=00
    bind 5: dty=251 bfp=2ae592d84d58 flg=00 avl=4984 mxl=00 val=00
    bind 6: dty=1 bfp=2ae5927c1550 flg=08 avl=125 mxl=2000 val="exists (select 'x' from hz_parties where party_id =stage.party_id and party_type = 'ORGANIZATION') and party_id <>1002277174"
    bind 7: dty=1 bfp=2ae5927c1d50 flg=0a avl=00 mxl=00 val=""
    bind 8: dty=1 bfp=2ae5927c1d80 flg=08 avl=01 mxl=01 val="I"
    bind 9: dty=6 bfp=2ae5927c1da8 flg=02 avl=00 mxl=22 val=00
    bind 10: dty=6 bfp=2ae5927c1de0 flg=02 avl=00 mxl=22 val=00
    bind 11: dty=1 bfp=2ae5927c1e28 flg=0a avl=00 mxl=01 val=""
    bind 12: dty=6 bfp=2ae5927c1e50 flg=02 avl=00 mxl=22 val=00
    bind 13: dty=1 bfp=2ae5927c1e98 flg=0a avl=00 mxl=2000 val=""

    Hello,
    From the sounds of it, when you are adding a child the application is not maintaining the Company's reference to it. For instance, in a 1:M and M:1 relationship, the application seems to be setting only the M:1 part (child to parent) which will cause the database to be updated, but both sides need to be set to keep the cache in synch with the database.
    Setting the cache type to be none is not a good idea - it prevents any caching, which will hurt performance and object identity. What instead is recommended is disabling the shared cache using the
    toplink.cache.shared.<ENTITY>=false property. This still might not help though if the Company's reference to the child hasn't been set as mentioned above if you are reading Company from the same context you are adding the child.
    The Cache is described for TopLink Essentials in the blog at:
    http://weblogs.java.net/blog/guruwons/archive/2006/09/understanding_t.html
    Best Regards,
    Chris

  • Initialization for char data type?

    I observed that as String I can declare something like this:
    String str = ""; but for char data type, if I declare:
    char ch = ''; the compiler will have an error: "empty character literal". So how can I fixe this problem when I want to initialize my char variables as "empty"? Anyone got an idea?
    Message was edited by:
    hoangSoccer
    Message was edited by:
    hoangSoccer

    Strings (and StringBuffers/Builders) are collections* of characters - so it makes
    sense to be able to refer to a String with precisely zero characters. But char is not a collection of anything - it has whatever value it has and can never
    be empty.
    *collections with a small 'c'.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Transfer an internal table with non char data type to an application server

    Here is a part of my code. lv_string variable was type string initially but i got an error Not mutually convertible in a Unicode Program. I changed it to type ty_afko. Now the program works but the data it puts out has just a bunch of  #####. I cannot make all value in the internal table type char because then my select statement is giving errors..  Please help...
    Type: BEGIN OF ty_afko,
           rsnum LIKE afko-rsnum,          " Number of reservation
           aprio LIKE afko-aprio,          " Order Priority
           maufnr LIKE afko-maufnr,          " Number of superior order
           lead_aufnr LIKE afko-lead_aufnr,     " Leading order in current processing
         END OF ty_afko.
    data: gt_afko         TYPE STANDARD TABLE OF ty_afko INITIAL SIZE 0,
          wa_afko         TYPE ty_afko,
    select  rsnum aprio maufnr lead_aufnr
    from afko into table gt_afko.
    IF gv_error = 'X'.
      EXIT.
    ELSE.
    <b>DATA: Lv_string type ty_afko.</b>
      loop at gt_afko into wa_afko.
        clear lv_string.
    <b>  move wa_afko to lv_string.</b>
        perform f_transfer_dataset using gc_f_afko lv_string changing gv_error.
      endloop.
    endif.
    FORM f_transfer_dataset USING         p_file
                                          p_data
                            CHANGING      p_error TYPE c.
      Data: lv_file(25) type c.
      CONCATENATE gc_path p_file INTO lv_file.
      TRANSFER p_data TO lv_file.
    ENDFORM.                    "F_TRANSFER_DATASET

    The key is to create another empty structure with fields of type c.
    TYPES:       BEGIN OF ty_resb,
                bdter TYPE RESB-BDTER,     " This field is type d
                bdmng type resb-bdmng,  " This field is type p with 3 decimals - total 14
              END OF ty_resb,
              BEGIN OF ty_resbstr,     " This structure is the same as above but the field types will be char.
               bdter(10),            
               bdmng(14),                
              END OF ty_resbstr.
    DATA:     gt_resb         TYPE STANDARD TABLE OF ty_resb,
              wa_resb         TYPE ty_resb,
           structure type  ty_resbstr. " Empty fields with the same structure as the work area.
    SELECT   bdter bdmng  FROM resb INTO corresponding fields of TABLE gt_resb.
          open dataset pfile for output in text mode encoding default.
          loop at gt_resb into wa_resb.
              clear gv_string.
            move-corresponding wa_resb to gv_string.
             perform f_transfer_dataset using gc_f_resb gv_string.     
            endloop.
         FORM f_transfer_dataset USING p_file p_data.         
           TRANSFER p_data TO lv_file.     
         ENDFORM.

  • Hierarchy variable for the char

    Hi All,
    Can v creat the Hierarchy variable for the char who does not hav the heir. another thing is whats the procedure to create the hierarchy variable bcoz when i select the char to create the variable its showing var of type char. how i hav to change it to hierarchy.
    Thanx

    hie,
    i think i understood what you want.
    I think you can achieve this by following way.
    1) create a text variable for user entry. For which user enters values 2,    3, or 4 as you said.
    2) create a dummy calculated key figure and assign this text variable to its description
    3) when query will execute, user inputs values 2 or 3 or 4 which will be reflected in the output in the title of the new dummy KF.
    4) then write a macro to read that value and delete 1 or 2 or 3 columns  from output as necessary before user can access the actual results.
    Regards,
    Purvang

  • Does CHAR data type work with Forms 11g

    We have an application in Forms 11g (32bit - version 11.1.2.0.0). DB is a Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production.
    When our Forms calls a stored procedure which has parameters defined using column name type (i.e. like p_customer_code customers.code%TYPE ) and if the column data type is CHAR we get a run time error when executing the package (ORA-06502: PL/SQL: numeric or value error string).
    When we change the data type of the tables column to varchar2, it works??
    Problem is we have dozens of tables with CHAR data type columns and we can't do all the changes manually. For one thing, if they are part of a primary or unique key or even foreign key, we can't change the data type of the column without dropping the constraint.
    What is the solution to this pls??

    When our Forms calls a stored procedure which has parameters defined using column name type (i.e. like p_customer_code customers.code%TYPE ) and if the column data type is CHAR we get a run time error when executing the package (ORA-06502: PL/SQL: numeric or value error string).this might also be related to compile settings, check your NLS settings (NLS_LANG, NLS_LENGTH_SEMANTICS) both times when you compile forms AND your stored procedures.
    As for the CHAR datatype: CHAR internally is treated like a blank padded varchar:
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:1542606219593
    Speaking of that it might be time to use varchar2 instead your char columns. You'd have to drop and recreate your constraints, but with the help of the data dictionary (+user_tables+, user_tab_cols, user_cons_columns, user_constraints) and dbms_metadata this shouldn't be that hard.
    Also you'd of course need to recompile all your forms after you are finished, but I guess you are aware of that ;)
    cheers

  • How to call a FM for a BEx Variable

    Hi,
       I have created a BEx Variable of type Customer Exit called 'ZCA8764'
       I intend to actually automatically calculate the number of days in the month.
       Through some discussions here, I found that I can use a FM NUMBER_OF_DAYS_PER_MONTH_GET
       So, I went to CMOD.
       But there onwards, I don`t know how to write a code to link the Variable and the FM.
      Can someone please advice with a sample code ?
       Can someone please assist.

    CALL FUNCTION  'NUMBER_OF_DAYS_PER_MONTH_GET'
            EXPORTING
                  (here u need to pass the values to the FM)
            IMPORTING
                  (here u will get the values that the function returns)
    e.g.
    CALL FUNCTION 'NUMBER_OF_DAYS_PER_MONTH_GET'
            EXPORTING
              day_in            = v_mth_beg
            IMPORTING
              last_day_of_month = v_mth_end.

  • Chnfind unable to find the decimal type by variable and sometimes "Round" command

    Dear all,
    During the work with Diadem I got two troubles. Could you please take a look and show me the wrong if you find the issue?
    1.) Here is my trouble as we see the photo below. It is most important problem which I have. I really have no idea why it could happened. It is alway happened to find a value with decimal type's variable, and even that variable is changed  to "str()".
    setlocale("en-gb")
    dim Min_point,Index_low,result
    Min_point=val(Data.Root.ChannelGroups(1).Channels("CopyYangle").Properties("minimum").Value)
    Min_point=round(Min_point,6)
    Min_point=str(Min_point)
    msgbox("The Min.Value is: "&Min_point)
    Index_low=Chnfind("ch(""CopyYangle"")<="&Min_point&"", 1)
    msgbox("Index No. of Min. Value is: "&Index_low)
    Index_low=Chnfind("ch(""CopyYangle"")<=-0.11374 ", 1)
    msgbox("Index No. of Min. Value is: "&Index_low)
    2.) Still the problem with ChnFind()  or  ChnFindreverse().   If I change the Rounds off a number to the nearest integer with the function "Round()" it might not work in ChnFindreverse(). Such like it works under 4, 6, 8 and even 7 but doesn't work with 3 and 5. Is this logical?
    setlocale("en-gb")
    Dim XE, Xchannel, Ychannel,round_N0
    Xchannel = "[2]/Right"
    T1 = Xchannel
    R1 =val(Data.Root.ChannelGroups(2).Channels("Right").Properties("maximum").Value)
    round_N0=4 ' <========= 3 and 5 Not work, 4, 6, 7, 8 .... work
    R1 =round(R1,round_N0) ' <=========
    msgbox("Max. point is: " &R1 &VbCrlf& "Round Nr is: "&round_N0)
    L1 = ChnFindReverse ("Ch(T1)>=R1",0)
    msgbox("Index number for Max.Point is: "&L1 &VbCrlf& "Round Nr is: "&round_N0)
     .tdx is a valid extensions for an attachement?
    If you couldn't open the TMD file. Please remove ".tdv" the attacments file name to make sure it is "ChnFind.tdx" but not "ChnFind.tdx.tdv".
    Kind regards / Mit freundlichen Grüßen
    J.Huang
    Attachments:
    ChnFind.TDM ‏5 KB
    ChnFind.tdx.tdv ‏39 KB

    Hello J.Huang,
    I downloaded the files and was able to get it to work. It looks like when you format the minimum value to a string, you loose precision and then ChnFind doesn't find the value your are looking for. He is an example which worked for me :
    Set oChnY = Data.Root.ChannelGroups(2).Channels("Right")
    sgValue = str(oChnY.Properties("minimum").Value,"d.ddddddddddddddd")
    Index = ChnFindReverse("Y<="&sgValue,,Array("Y"),Array(oChnY))
    LogFileWrite(Index)
     Using symbols (parameters 3 and 4) is not necessary to get the solution. The key is teh second value for "str" which formats using more digits. As soon as you reduce the number of digits, you may no longer get a result.
    Ther is an alternative to ChnFind, in case there is only one occurance in teh signal which has the minimum value
    Set oChnY = Data.Root.ChannelGroups(2).Channels("Right")
    Index = PNo(oChnY,oChnY.Properties("minimum").Value)
    LogFileWrite(Index)
     I hope one of the two options works for you. I tested the approach with teh first channel too and it worked as well

Maybe you are looking for

  • Getting an error 150:30 message on CS4 after migration from time capsule to new MacBook Pro

    Getting a constant error message... deleted the files stated in the forum and tried to run the LicenceRepair but nothing is happening... ran the .py file in teminal but still getting the error message... My MacBook is running OSX 10.9.3

  • Layered menu buttons not working when built.

    I have a project that has one menu and one track. The menu has 7 buttons linked to 7 different markers in the track. When I run the simulation in DVD SP, the buttons link fine, and play as they should...but when I build the project and run it in DVD

  • JavaScript on PDA

    Hello. I need to install a JAVA Plugin for the pocket ie. I already synced my SIEMENS LOOX with active sync. right now i have the problem that i don't find any working java VMs. i downloaded j2sdk, j2me, personal java.. nothing fits for the pda. whic

  • Index Taking Longer time to create

    Hi All I have a table which is 150 GB in size and I want to create a new Index on it  but when I am creating  index on it taking more  than 3 hours and lots of blocking also happening.   So I have kill that create index process. Can anyone give bette

  • STO CONFIG IN CIN

    Can anybody suggested me where is the configuration for STO setup in CIN or Tax on Goods movement in ECC 6.0