How to read enumerated values from an OPC server via Datasocket

Hi Labviewers,
I am using LV8.2 and I am trying to find if it is possible to read enumerations from an OPC server via Datasocket, not just the values.
I can successfully read a value for an OPC server via Datasocket and I get a value for example 3, is it possible to get the enumeration/string that corresponds to this value i.e. "Open".
Many thanks in advance
Dimitris

Hi Sarah,
With the input type as variant I get the following response:
1                                     <-This is the current numeric value of the parameter
4 Attribute(s):
   'Quality' -> 192
   'TimeHigh' -> 29861723
   'TimeLow' -> -665408304
   'Timestamp' -> 39.238E+3
With the Input set to         Enum constant I get no values or strings coming back. With the Input set to                Ring constant I just get the numeric value   
Dimitris   

Similar Messages

  • How to read the value from one context node in other in the same view.

    Hi,
    I am working on enhanced component ICCMP_BP_CP/BuPaContactPersonCreate ,  i need to read the partner_guid from Customer context node in  contactpersonaddress context node.
    Could you please guid me how to achieve this? if possible, please explain me with some sample code.
    i am trying this code in GET_FAXFAX method of contactpersonaddress-faxfax, but it is throwing me the type cast exception.
    data: lr_entity type ref to cl_crm_bol_entity.
    data: lv_test type string.
    lr_entity ?= collection_wrapper->get_current( ).
    lr_entity = lr_entity->get_related_entity( 'BuilContactPersonAddressRel' ).
    Thanks in advance.
    Regards,
    Kamesh Bathla
    Edited by: Kamesh Bathla on Jun 25, 2009 7:46 PM

    problem solved by writing the code in context node class CREATE_CONTPERSADDRESSVALNODE method
      coll_wrapper = customer->get_collection_wrapper( ).
      TRY.
          entity ?= coll_wrapper->get_current( ).
        CATCH cx_sy_move_cast_error.
      ENDTRY.
      IF entity IS BOUND.
    CONTPERSADDRESSVALNODE->on_new_focus( focus_bo = entity ).
        DATA: lr_collection TYPE REF TO cl_crm_bol_entity,
              lv_fax TYPE string,
              lv_fax_ext TYPE string,
              lv_tel TYPE string,
              lv_tel_ext TYPE string,
              entity_addr TYPE REF TO if_bol_bo_property_access, "#EC *
              coll_wrapper1 TYPE REF TO cl_bsp_wd_collection_wrapper.
         lr_parrent type
        lr_collection = entity->get_related_entity( 'BuilStandardAddressRel' )."'BuilContactPersonAddressRel' ).
        IF lr_collection IS BOUND.
          coll_wrapper1 = contpersaddressvalnode->get_collection_wrapper( ).
          TRY.
              entity_addr ?= coll_wrapper1->get_current( ).
            CATCH cx_sy_move_cast_error.
          ENDTRY.
    getting fax number
          CALL METHOD lr_collection->if_bol_bo_property_access~get_property_as_value
            EXPORTING
              iv_attr_name = 'FAXFAX'
            IMPORTING
              ev_result    = lv_fax.
    ***setting fax number
          CALL METHOD entity_addr->set_property
            EXPORTING
              iv_attr_name = 'FAXFAX'
              iv_value     = lv_fax.

  • How will read the value from Adobe Reader/Viewer in c# windows App

    I m using VS2005 . working in windows appliction. i am using adobe Reader 9, Then the new pdf document open  inside the Acrobat adobe reader , Exsiting PDF file is created by Adobe Forms(Adobe LiveCycle designer and Adobe pro 9).
    Using the Class is:
    1.AcroExch.App
    2.AcroExch.AVDoc
    3.AcroExch.pdDoc
    4.Acrobat.CAcroApp
    namespace is:
    using AxAcroPDFLib;
    using AFORMAUTLib;
    using Acrobat;
    Using DLL is:
    1. Interop.Acrobat
    2. Interop.AcroPDFLib
    3. Interop.AFORMAUTLib
    4. AxInterop.AcroPDFLib
    My problem is,
    I am Working in
                       PDFis open inside the adobe reader/Viewer, but i can not able to get the value from PDF Forms.
                        ( This Pdf forms is Some more Control Design is Available)
    Ex:
    I have Attached my Pdf  disgn file.        Please see this Pdf file.
    I am not able to get the value from  inside window(adobe Reader/Viewer),  but i can able to get the value from the out side of adobe viewer/Reader.
    This coding not working properly,
    try
                    CAcroAVDoc AcroExchAVDoc = default(CAcroAVDoc);
                    CAcroApp AcroExchApp = default(CAcroApp);
                    CAcroPDDoc oDoc = default(CAcroPDDoc);
                    AFORMAUTLib.AFormApp AFormAut = default(AFORMAUTLib.AFormApp);
                    AFORMAUTLib.Field Field = default(AFORMAUTLib.Field);
                    AFORMAUTLib.Fields Fields = default(AFORMAUTLib.Fields);
                    bool OK = false;
                    AcroExchApp = new AcroApp();
                    oDoc = new AcroPDDoc();
                    AcroExchAVDoc = new AcroAVDoc();
                    AFormAut = new AFormAppClass();
                    //AcroExchApp = (Acrobat.AcroApp)Activator.CreateInstance(Type.GetTypeFromProgID("AcroExch.App" ));
                    //oDoc = (Acrobat.AcroPDDoc)Activator.CreateInstance(Type.GetTypeFromProgID("AcroExch.PD Doc"));
                    //AcroExchAVDoc = (Acrobat.AcroAVDoc)Activator.CreateInstance(Type.GetTypeFromProgID("AcroExch.AV Doc"));
                    //AFormAut = (AFORMAUTLib.AFormApp)Activator.CreateInstance(Type.GetTypeFromProgID("AFormAut .App"));
                    bool bOK = AcroExchAVDoc.Open(pdfWindowLeft.src, "Temp"); ' some time not true
                        ' if  ok (true) then
                    if (bOK)
                        Fields = (AFORMAUTLib.Fields)AFormAut.Fields;
                        foreach (Field myField in Fields)
                            if (myField.Name == "form1[0].#subform[0].Id[0]")   ' field value not get from the inside window
                                string Id = myField.Value; ' not getting a answare
                            if (myField.Name == "form1[0].#subform[0].PatientName[0]")
                                string PatientName = myField.Value;
                            if (myField.Name == "form1[0].#subform[0].Email[0]")
                                string Email = myField.Value;
                            if (myField.Name == "form1[0].#subform[0].PhoneNo[0]")
                                string PhoneNo = myField.Value;
                            if (myField.Name == "form1[0].#subform[0].Address[0]")
                                string Address = myField.Value;
                catch (Exception Ex)
                    lbl_Result.Text = Ex.Message;
                finally
                    Conn.Close();
    This coding is working properly,
    try
                    String FORM_NAME = addressLeft.Text;
                    //String FORM_NAME = Application.StartupPath + "\\..\\..\\..\\..\\..\\TestFiles\\SampleForm.pdf";
                    // Initialize Acrobat by cretaing App object.
                    CAcroApp acroApp = new AcroAppClass();
                    // Show Acrobat Viewer
                    acroApp.Show();
                    // Create an AVDoc object
                    CAcroAVDoc avDoc = new AcroAVDocClass();
                    // Open the pdf
                    if (!avDoc.Open(FORM_NAME, ""))
                        lbl_Result.Text = "Cannot open" + FORM_NAME + ".\n";
                        return;
                    // Create a IAFormApp object, so that we can access the form fields in
                    // the open document
                    IAFormApp formApp = new AFormAppClass();
                    // Get the IFields object associated with the form
                    IFields myFields = (IFields)formApp.Fields;
                    // Get the IEnumerator object for myFields
                    IEnumerator myEnumerator = myFields.GetEnumerator();
                    bool bFound = false;
                    // Fill the "Name" field with value "John Doe"
                    while (myEnumerator.MoveNext())
                        // Get the IField object
                        IField myField = (IField)myEnumerator.Current;
                        // If the field is "Name", set it's value to "John Doe"
                        // form1[0].#subform[0].Name[0]
                        if (myField.Name == "form1[0].PatientInformation[0].Id[0]")
                            //form1[0].#subform[0].Id[0]
                            bFound = true;
                            lbl_id.Text = myField.Value;
                        //form1[0].#subform[0].Name[0]
                        if (myField.Name == "form1[0].PatientInformation[0].PatientName[0]")
                            bFound = true;
                            lbl_name.Text = myField.Value;
                        if (myField.Name == "form1[0].PatientInformation[0].Email[0]")
                            bFound = true;
                            lbl_email.Text = myField.Value;
                        if (myField.Name == "form1[0].PatientInformation[0].PhoneNo[0]")
                            bFound = true;
                            lbl_phoneno.Text = myField.Value;
                        if (myField.Name == "form1[0].PatientInformation[0].Address[0]")
                            bFound = true;
                            lbl_address.Text = myField.Value;
    can u anyone help me. It's very urgent for my project.
    Thanks for ur replay,
    Regards
    Ganesaselvam.I

    First off - the code you wrote won't work with Reader, it will only work with Adobe Acrobat.
    Second, LiveCycle Designer-based forms are a special type of PDF and don't use AcroForms, they use an XML-based forms grammar.  Therefore, the AcroForms API calls aren't designed to work with them.  You should be using the JSObject bridge code along with JavaScript to access the values of the fields.

  • How to read a Value from Excel Cell into Oracle Forms 10g with Java

    Did any one Implamented a Java PJC to integrate Excel on Oracle Forms 10g?
    I Open Excel Applikation.
    Open a File like c:\import_test.xls
    read a number 05 from A:1 (i get it as return value).
    Save a number in a variable in Forms 10g
    Can any one help my please?
    Thanks

    why don't you use webutil.
    it has package client_ole2 which allows you to have programmatic interface with excel application.
    this is especially useful if the excel to be read is available in the client.

  • How to read the value from other cubes ??

    Dear All,
    I have requirement to do some calculation where part of number there must be got from other info-cube.
    e.g.
    Cube 1
    Has: Ch1, Ch2, Kf1, Kf2, Kf3
    Cube 2
    Has: Ch3, Ch4, Kf4, Kf5
    Then the requirement need to compute:
    KF1 =  KF4 * KF3
    Let say that our planning area use Cube 1.
    Means, to get the value for KF1 we need to read data from cube 2.
    I've tried to use this function: RSDRI_INFOPROV_READ
    But it can't fetch the data. It caused when we go "manage" to
    cube 1, the status for the corresponding request is yellow.
    If we change the status into green, then we can get the record by that function.
    My Questions is
    Is there other way that can fetch data from other cube ??
    Do you have any suggestions ??
    Or ..
    In my explanation above, is there some thing missing ?
    Regards,
    Niel.

    Hi Olivier,
    Really thanks for your response... 
    But i still have distraction regarding your preceding posting ..
    in a query, yellow requests from a trans cube can be read with the variable 0S_RQTRA (most current data) on 0REQUID.
    I had a look into the corresponding exit ( FM = RSVAREXIT_0S_RQTRA ) and can see that SAP is filling 0REQUID with VALUE 'REQ_TRANS'
    You mean, that we can check what status happening in corresponding info-provider by using this function: RSVAREXIT_0S_RQTRA . Am i right ?
    Could you clear me up what the objective is for ?
    I've tried your suggested function:
    RSSEM_INFOPROV_READ
    And yes it can take it .. But why it couldn't fetch all data ?
    And also in RSSEM FG, i saw this function:
    RSSEM_INFOPROV_READ_RFC
    Do you know what the objective is for ??
    Still need your guidance.
    Regards,
    Niel.

  • How to read classification value from batch class

    Hi Gurus,
    In our material master we maintain Batch class (023) from all RM where 2 characteristics value is very important one is std.moisture and another is actual moisture.Now Std moisture value is fixed and we maintain this value in material master.Actual moisture is variable batchwise and thats why we maintain it by using MSC2N.Here the problem is the std moisture is not coming in classification data autometically from Material Master but we already maintain it.It shows in Material Data tab.But I need that it will come in Classification data tab autometically as we use this in report.I use VB_BATCH_VALUES_FOR_OUTPUT Function for classification value fetching from material and batch.Now as this value is not coming automatically coming user again put this data.I want to know how can it come autometically?If it is not possible please tell me how I can get this data from material and batch as the above function is not working.
    Please help me out.
    Regards
    Nirmal

    check your customizing in IMG > Logistics general > Batch Management > Batch Valuation > Valuation for Goods Movement in Inventory Management > Activate Batch Classification for Goods Movements in IM

  • How do read/write records from a SQL server hosted on the Web?

    If I have a MS SQL  Server hosted on the internet, how can I use Labview to access it? Examples appreciated.
    TIA,
    Les 
    Solved!
    Go to Solution.

    I have a web-hosted MySQL database.  I set up an ODBC data source (Windows) and use a UDL file and am able to connect just as easily as I can an Access database on my PC.
    Message Edited by jcarmody on 04-23-2009 09:12 AM
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
    Attachments:
    datasource.PNG ‏26 KB

  • How to read all values of a queue

    Hi All,
    In Message mapping I am checking condition for field value based on incoming value.
    In test cases i can see the second or third  occurence is getting supressed and first value fails the condition and mapping node not created.
    I would like to know how to read multiple values from queue and check condition for each value and if correct value present condition should pass.
    I tried all possible context changes but no luck.
    Any ideas how to read all values coming .
    Thanks.

    <?xml version="1.0" encoding="UTF-8"?>
    <msg version="" dbName="">
       <rowOp isLast="" cmitLSN="" cmitTime="" authID="" correlationID="" planName="">
          <updateRow subName="" srcOwner="" srcName="" intentSEQ="" rowNum="" hasLOBCols="">
             <col name="END_RSN_CDE" isKey="852369" invalidData="" rawData="">
                <smallint>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </smallint>
                <date>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </date>
                <char>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </char>
             </col>
             <col name="SVC_USER_SDT" isKey="789654" invalidData="" rawData="">
                <smallint>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </smallint>
                <date>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </date>
                <char>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </char>
             </col>
          </updateRow>
       </rowOp>
    </msg>

  • How to get return value from java and read by other application?

    i want to read return value from java and the other application read it.
    for example:
    public class test_return {
        test_return(){
        public int check(){
            return 1;
        public static void main(String args[]){
           new test_return().check();
    }from that class i make as jar file. How to read the return value (1) by other application?
    thx..

    If your installer is requiring some process it invokes to return a particular value on failure, then the installer is seriously broken. There are a bazillion commands your installer could invoke, and any of them could fail, which in turn could invalidate the entire install process, and any of them could return any value on failure. The only value that's consistent (in my experience) is that zero means success and non-zero means failure, with specific non-zero values being different in different programs.
    About the only control you have over the JVM's exit code is that if your main method completes without throwing an exception, the JVM will have an exit code of 0, and if main throws an exception (either explicitly or by not catching one thrown from below), it will be non-zero. I'm not even sure if that's guaranteed, but I would guess that's the case.
    EDIT: I'm kind of full of crap here. If you're writing the Java code, you can call System.exit(whatever). But nonetheless, if your installer requires certain exit codes from any app--java or otherwise--you have a problem.
    Edited by: jverd on Oct 29, 2009 1:27 AM

  • How to read Group ID from Value Mapping Context in Cache Monitoring ?

    Hi friends,
        In RWB --> Cache Monitoring --> Integration Server (Java) -> (Search for Value Mapping Groups) in this each item is identified by Value Mapping Group (GroupID, Context, Identifier/Agency, Identifier/Scheme). Either we create Value Mapping Table in ID or replicate value mapping data directly from text file/SAP table etc., in run time cache, data will be identified in this manner.
        Now, our requirement is to delete a record the Cache for a particular context. Two operations provided by XI one is 'Delete' and another one is 'DeleteGroup'. When we use either of this, we should know GroupID. Suppose, I replicated some large amount of data from my text file in Runtime Cache. Value Mapping Table is like that IN --> India, US --> USA, AU --> Australia, EG --> Egypt. Now, I am required to write a program to get the input country code from user which is going to delete in the value mapping table like IN/AU....  For this, what logic we should follow in the program is, First we scan the value mapping table and find the record (country code)  which is match with the input. Then find the GUID value for this record. Now we use the DeleteGroup Operation and pass this GUID and then delete the record.
        So, in essence, how to read the GUID from value mapping context.
        Friends, Kindly help me to do this.
    Thanks in advance.
    Jegatheeswaran P.

    Did you get the way to read group id?

  • How to get the values from popup window to mainwindow

    HI all,
       I want to get the details from popup window.
          i have three input fields and one search button in my main window. when i click search button it should display popup window.whenever i click on selected row of the popup window table ,values should be visible in my main window input fields.(normal tables)
       now i am able to display popup window with values.How to get the values from popup window now.
       I can anybody explain me clearly.
    Thanks&Regards
    kranthi

    Hi Kranthi,
    Every webdynpro component has a global controller called the component controller which is visible to all other controllers within the component.So whenever you want to share some data in between 2 different views you can just make it a point to use the component controller's context for the same. For your requirement (within your popups view context) you will have have to copy the component controllers context to your view. You then will have to (programmatically) fill this context with your desired data in this popup view. You can then be able to read this context from whichever view you want. I hope that this would have made it clear for you. Am also giving you an [example|http://****************/Tutorials/WebDynproABAP/Modalbox/page1.htm] which you can go through which would give you a perfect understanding of all this. In this example the user has an input field in the main view. The user enters a customer number & presses on a pushbutton. The corresponding sales orders are then displayed in a popup window for the user. The user can then select any sales order & press on a button in the popup. These values would then get copied to the table in the main view.
    Regards,
    Uday

  • How to get each value from a parameter passed like this '(25,23,35,1)'

    Hi
    One of the parameter passed to the function is
    FUNCTION f_main_facility(pi_flag_codes VARCHAR2) return gc_result_set AS
    pi_flag_codes will be passed a value in this way '(25,23,35,1)'
    How to get each value from the string
    like 25 first time
    23 second time
    35 third time
    1 fourth time
    I need to build a select query with each value as shown below:-
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3, code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 25 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q1,
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3,code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 23 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q2,
    (SELECT t2.org_id, RTRIM(xmlagg(xmlelement(e, t4.description || ';')
    ORDER BY t4.description).EXTRACT('//text()'), ';') AS DESCRIPTION
    from org_name t2, ref_org_name t3,code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 35 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date
    group by t2.org_id) q3,
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3, code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 1 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q4
    Please help me with extracting each alue from the parm '(25,23,35,1)' for the above purpose. Thank You.

    chris227 wrote:
    I would propose the usage of regexp for readibiliy purposes and only in the case if this doesnt perform well, look at solutions using substr etc.
    select
    regexp_substr( '(25,23,35,1)', '\d+', 1, 1) s1
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 2) s2
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 3) s3
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 4) s4
    from dual 
    S1     S2     S3     S4
    "25"     "23"     "35"     "1"In pl/sql you do something like l_val:= regexp_substr( '(25,23,35,1)', '\d+', 1, 1);
    If t2.att_type is type of number you will do:
    t2.att_type= to_number(regexp_substr( '(25,23,35,1)', '\d+', 1, 1))Edited by: chris227 on 01.03.2013 08:00Sir,
    I am using oracle 10g.
    In the process of getting each number from the parm '(25,23,35,1)' , I also need the position of the number
    say 25 is at 1 position.
    23 is at 2
    35 is at 3
    1 is at 4.
    the reason I need that is when I build seperate select for each value, I need to add the query number at the end of the select query.
    Please see the code I wrote for it, But the select query is having error:-
    BEGIN
    IF(pi_flag_codes IS NOT NULL) THEN
    SELECT length(V_CNT) - length(replace(V_CNT,',','')) FROM+ ----> the compiler gives an error for this select query : PLS-00428:
    *(SELECT '(25,23,35,1)' V_CNT  FROM dual);*
    DBMS_OUTPUT.PUT_LINE(V_CNT);
    -- V_CNT := 3;
    FOR L_CNT IN 0..V_CNT LOOP
    if L_CNT=0 then
    V_S_POS:=1;
    V_E_POS:=instr(pi_flag_codes, ',', 1, 1)-1;
    else
    V_S_POS:=instr(pi_flag_codes,',',1,L_CNT)+1;
    V_E_POS:=instr(pi_flag_codes, ',', 1, L_CNT+1)-V_S_POS;
    end if;
    if L_CNT=V_CNT then
    V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS));
    else
    V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS,V_E_POS));
    end if;
    VN_ATYPE := ' t2.att_type = ' || V_ID;
    rec_count := rec_count +1;
    query_no := 'Q' || rec_count;
    Pls help me with fetching each value to build the where cond of the select query along with the query number.
    Thank You.

  • How to get selected value from selectOneRadio ???

    Hi...i want to how to get selected value from selectOneRadio and use it in another page and in backing bean.
    Note i have about 10 selectOneRadio group in one page i want to know value of each one of them.
    Plzzzzzzzz i need help

    You have a datatable in which each row is a question, correct?
    Also in each row you have 5 possible answers that are in a radio, correct?
    So,
    You need to put in your datatable model, a question, and a list of answers (5 in yor case) and the selected one.
    So you will have a get to the question, an SelectItem[] list to populate the radios and another get/set to the selected question.
    ex:
    <h:selectOneRadio value="#{notas.selectedString}" id="rb">
    <f:selectItem itemValue="#{notas.valuesList}"/>
    </h:selectOneRadio>
    Search the web for examples like yours.

  • How to get actual value from LOV list

    Like Subject says: How to get actual value from LOV list. Any help will be appreciated.
    Thanks.

    Thanks Shay, I did it with bind variable because I'm not using JSF. Is there any chance to post solution using standard JSTL or HTML expression. I have something like this: LOV displays some Companies names:
    <html:select property="UserJobCompanyId"
                             disabled="${!bindings[\'UserJobCompanyId\'].updateable}"
                             onchange="submitform();">
                  <html:optionsCollection label="prompt" value="index" property="UserJobCompanyId.displayData"/>                                                     
                </html:select>and I want to get CompanyID of selected Company.
    Thanks, again.

  • How to get string value from xml in JSF??

    In JSF How to get string value from xml, .ini and properties file. I want to get string value from xml or text to JSF

    Just use the appropriate API's for that. There are enough API's out which can read/parse/write XML, ini and properties files. E.g. JAXP or DOM4J for xml files, INI4J for ini files and Sun's own java.util.Properties for propertiesfiles.
    JSF supports properties files as message bundle and resource bundle so that you can use them for error messages and/or localization.

Maybe you are looking for