Reading arrays of double from S7 with OPC & Datasocket

Hi friends:
We are developing an application with a S7-315-2DP PLC and a PC with a PCI1500PFB. We use the OPC server from Applicom. We read the data very quickly with the datasocket (arrays of boolean, arrays of doubles ...and so on, and a very big amount of data over 100 ms) but when we try to write arrays datasocket faield and we have to write item on item and the speed decrease. For intance, if we try to write doubles ( 50 items) the refresh period is over 5 seconds ( some times more since we launch the data and we read the same data on the PC). Perhaps we failed configuring the OPC but there isn´t many things to configure, perhaps the problem is the board configuration .. I don´t know.
We
try to find some examples that write an array of doubles on one time but..
Thank you for yours answers.
Javi

Hi Javi,
I'm not aware of any known issues writing to the Applicom OPC server. In LabVIEW there isn't anything special you need to configure to be able to write arrays of doubles through DataSocket. You can test this by using the DataSocket Server Manager, make a new member that is an array of doubles, and try reading and writing to that member. You may also want to check to make sure the data member the OPC server is expecting is an arry of doubles and not an array of singles or integers.

Similar Messages

  • Reading a global variable from tomcat with JNDI. Example not working

    Hi you can help me to make this example work?
    Context initCtx = new InitialContext();
    Context envCtx = (Context)initCtx.lookup("java:comp/env");
    Object o = envCtx.lookup("testvariable");
    <GlobalNamingResources>
    <Environment name="testvariable" type="java.lang.Boolean" value="false"/>
    Nice greetings Christian

    I found out that in addition to having the JNDI lookup code, you have to
    - have the environment variable declared in the app server configuration
    - have a resource-env-ref entry in your webapp module
    - have the application container bind your named variable with the global variable
    I am using tomcat 5.5, and have done the following. with success.
    the following example uses the default sample environment variable in the tomcat server.xml
    in tomcat server.xml:
    <GlobalNamingResources>
    <Environment
    name="simpleValue"
    type="java.lang.Integer"
    value="30"/>
    </GlobalNamingResources>
    in my application's web.xml:
    <resource-env-ref>
    <description>Test read resource environment variable</description>
    <resource-env-ref-name>simpleValue</resource-env-ref-name>
    <resource-env-ref-type>java.lang.Integer</resource-env-ref-type>
    </resource-env-ref>
    in my META-INF/context.xml (or otherwise, in tomcat's context deployment configuration)
    <ResourceLink name="simpleValue" global="simpleValue"
    type="java.lang.Integer"/>
    Note: in theory, the named resource by your web app could be different from the global environment variable, but here they are the same 'simpleValue'
    This is the really important step, that with out it, nothing works.,
    the context.xml is known to work with tomcat when it exists in META-INF/context.xml inside the .war file (i use war files to deploy, but you should be able to create META-INF/context in an unpacked webapp directory too, and tomcat will find it.,
    I can not say what it is like for other app servers, but this mapping step is the critical point that i discovered after A LOT of hair pulling.
    then, make use of it, i created a jndiTest.jsp:
    <%@ page import="javax.naming.Context" %>
    <%@ page import="javax.naming.InitialContext" %>
    <%@ page import="javax.naming.NamingException" %>
    <%
    try {
    Context initCtx = new InitialContext();
    Context ctx = (Context) initCtx.lookup("java:/comp/env");
    Object o = ctx.lookup("simpleValue");
    %>
    <%=o%><br>
    <%
    catch (NamingException ex) {
    System.err.println(ex);
    %>
    since my server.xml defines the value for 'simpleValue' to be 30, this page displays 30

  • Reading file into SAP from foreground with record length 255

    I am trying to read a text file using GUI_UPLOAD. But, some of the records are more than 255 characters in length. When I try to load them to an internal table, the rest of the characters are getting truncated. Is there any possibility of uploading all the remaining characters also? The maximum length of a record might be 400 characters.

    Hi
    try to define the field of your internal as char longer than 255 char, if u want to make sure u can use the type string:
    TYPES TY_LINE TYPE STRING.
    DATA W_LINE TYPE TY_LINE.
    DATA T_FILE TYPE TABLE OF TY_LINE.
    Max

  • Wonderware and OPC; reading arrays ?

    I have a contact on a project that says Wonderware is not able to read
    OPC data (Shared Variables) from LabVIEW in the form of arrays of double, all data must be single values.
    Can anybody confirm this statement, or tell me otherwise ? I find it strange that
    this big software platform in the year of 2015 cannot read arrays of OPC data.
    Martin

    Hi Martin,
    and in which way can LabVIEW help when "Wonderware is not able to read OPC data (Shared Variables) from LabVIEW in the form of arrays of double" as you wrote?
    That sounds like a problem of Wonderware - and you should ask the support for Wonderware…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Read double from file containing 128 Bit formatted C-Floats

    hi all,
    the Problem:
    i need to read double values out of a binary file. the binary was
    created by a program in c and contains 128 bit float values (16 byte).
    in c i can read the floats with the following command:
    fscanf(fin,"%16.7f",&i);
    but in java there is no function that can read this format. for me it
    is not so important that the values are precise like in c. so if
    i could convert or read such a value into a java double this would be
    precise enough. any idea?
    thanx,
    grissi

    You read in the bytes and then create a double from them using binary operations.
    If you search the forums you will find example code which you can modify to your purpose.
    Try using this search string, or some variation.
    C double binary file

  • Creating polygons with an array of doubles instead of ints

    Hi,
    I want to create a polygon using:
    Polygon u = new Polygon(xPoints, yPoints, numTs);
    my problem is that my x & y points are stored in double arrays not ints. Is there a way to create a polygon using double arrays instead of ints?
    cheers,
    elmicko

    or cast them as int. imaginr posX, posY, width and height are doubles.
    Rectangle rect = new Rectangle( (int)posX, (int)posY, (int)width,(int)height );or, with an array of doubles:
    Rectangle rect = new Rectangle( (int)array[0], (int)array[1], (int)array[2],(int)array[3] );

  • LoadVarsdoes not read array from ASP

    Hi,
    my ASP writes out this variables:
    i1_seatno0=EXZ8420&i1_seatno1=FYA9531&i1_seatno2=ZB0642&i1_seatno3=HAB5188&i1_seatno4=IBC6 299&
    now I want these vars pushed into an Array and added to my
    Tno_list.
    I have a button, which onPress sends me to Frame 4.
    On Frame 4
    I have this code:
    //load new pass no in
    var send_lvConfirm:LoadVars = new LoadVars();
    var result_lvConfirm:LoadVars = new LoadVars();
    result_lvConfirm.onLoad = function(success) {
    if (success) {
    if (result_lvConfirm.getBytesLoaded() ==
    result_lvConfirm.getBytesTotal() &&
    result_lvConfirm.getBytesTotal()>0) {
    for(var c:Number = 0;c<5;c++){
    _parent.myno_array.push(result_lvConfirm["i1_seatno"+c]);
    Tno_list.addItem({label:result_lvConfirm["i1_seatno"+c]});
    //end for
    //end bytes
    //end success
    end load
    send_lvConfirm.sendAndLoad("loadSeatno.asp",result_lvConfirm,"POST");
    It always adds only o n e - the first item to the Array, as
    well as to the list - only the first item.
    The other 4 items( in the Array and in the List) are always
    "undefined" .
    What I am doing wrong?
    Please help
    best regards
    Luciewong

    Hi kglad,
    Thank you for your Help, I just want to inform you what the
    problem was.
    In my ASP I had the following code above all:
    If Request("noTotal") = "" Then
    intPage = 1
    Else
    intPage = Request("noTotal")
    End If
    So... after 3 days I found out, that he could'nt just read my
    request coming from Flash.
    So If my request is "nothing" he will write out always only 1
    seat number.
    But when I tested the ASP in the Browser by writing "
    http://retrieve_seatno.asp?noTotal=5"
    he always write me out
    the correct 5 seat numbers.
    The problem was:
    sendlv_Confirm.noTotal = noTotal;<<where
    <noTotal> was a number/ASP request must be a String
    so I changed:
    sendlv_Confirm.noTotal = noTotal.toString(); <<this
    made it working/then my ASP could read the request
    I know, that you don't work with ASP usually, so I just want
    to tell you, that the following code is correct:
    Response.write "i1_seatno" & myno & "="
    &(rs("i1_seatno"))& "&"
    If I replace the ampersand the ASP doesn't work anymore.
    - the ampersand adds 'myno' to the String "i1_seatno" and
    writes out <i1_seatno1=....>, so I could iterate through many
    records by calling their id number.
    Very much appreciate your help.
    Best regards
    Luciewong

  • Issue with reading a xml file from xsl

    Hi,
    When I am trying to read a xml file from xsl, I am getting unwanted output.
    Following is the XSL:
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
      <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
      <mapSources>
        <source type="XSD">
          <schema location="../xsd/B2BMarketProperties.xsd"/>
          <rootElement name="ReceipentIDType" namespace="http://www.example.org"/>
        </source>
      </mapSources>
      <mapTargets>
        <target type="XSD">
          <schema location="../xsd/B2BMarketProperties.xsd"/>
          <rootElement name="ReceipentIDType" namespace="http://www.example.org"/>
        </target>
      </mapTargets>
      <!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.4.0(build 110106.1932.5682) AT [TUE DEC 03 16:06:03 EST 2013]. -->
    ?>
    <xsl:stylesheet version="1.0"
                    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
                    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
                    xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction"
                    xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
                    xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xmlns:ns0="http://www.example.org"
                    xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
                    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:med="http://schemas.oracle.com/mediator/xpath"
                    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
                    xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
                    xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
                    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
                    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                    xmlns:ora="http://schemas.oracle.com/xpath/extension"
                    xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator"
                    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
                    exclude-result-prefixes="xsi xsl ns0 xsd bpws xp20 mhdr bpel oraext dvm hwf med ids bpm xdk xref ora socket ldap">
      <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
      <xsl:variable name="ReceipentID" select="document('../xsd/B2BMarketProperties.xml')"/>
      <xsl:template match="/">
        <ns0:ReceipentIDType>
        <xsl:for-each select="$ReceipentID">
          <ns0:ReceipentID>
            <xsl:value-of select="$ReceipentID"/>
          </ns0:ReceipentID>
          </xsl:for-each>
        </ns0:ReceipentIDType>
      </xsl:template>
    </xsl:stylesheet>
    Following is the XML ( B2BMarketProperties.xml)
    <?xml version="1.0" encoding="UTF-8" ?>
    <ReceipentIDType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:schemaLocation="http://www.example.org B2BMarketProperties.xsd"
                     xmlns="http://www.example.org">
      <ReceipentID>123</ReceipentID>
      <ReceipentID>345</ReceipentID>
    </ReceipentIDType>
    The output i am getting with this code is
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:ReceipentIDType xmlns:ns0="http://www.example.org">
        <ns0:ReceipentID>123345</ns0:ReceipentID>
    </ns0:ReceipentIDType>
    But, I need output in the following format
    <ns0:ReceipentIDType xmlns:ns0="http://www.example.org">
        <ns0:ReceipentID>123</ns0:ReceipentID>
         <ns0:ReceipentID>345</ns0:ReceipentID>
    </ns0:ReceipentIDType>
    Could you guys let me know what i am doing wrong. Any help would be appreciated.
    Thanks,

    This worked for me :
      <xsl:template match="/">
        <ns0:ReceipentIDType>
          <xsl:for-each select="document('B2BMarketProperties.xml')/*:ReceipentIDType/*:ReceipentID">
            <xsl:variable name="count" select="position()"/>
            <ns0:ReceipentID>
              <xsl:value-of select="document('B2BMarketProperties.xml')/*:ReceipentIDType/*:ReceipentID[$count]"/>
            </ns0:ReceipentID>
          </xsl:for-each>
        </ns0:ReceipentIDType>
      </xsl:template>

  • How can I read pdf files from LabVIEW with different versions of Acrobat reader?

    How can I read pdf files from LabVIEW with different versions of Acrobat reader?
    I have made a LabVIEW program where I have possibility to read a PDF document.  When I made this LabVIEW program it was Acrobat Reader 5.0.5 that was installed on the PC. Lather when the Acrobat Reader was upgraded to version 6.0, there was an error when VI tries to launch the LabVIEW program. And Later again when we upgraded to Acrobat Reader 7.0.5 I must again do some changes and rebuild the EXE files again
    It isn't so very big job to do the changes in one single LabVIEW program, but we have built a lot of LabVIEW programs so this take time to due changes every time vi update Acrobat Reader. (We have build EXE files.)
    The job is to right click the ActiveX container and Click "Insert ActiveX Object", then I can brows the computer for the new version of acrobat Reader. After this I must rebuild all the "methods" in the Activex call to make the VI executable again.
    Is there a way to build LabVIEW program so I don't have to do this job every time we update Acrobat Reader?
    This LabVIEW program is written in LabVIEW 6.1, but I se the problem is the same in LabVIEW 8.2.
    Jan Inge Gustavsen
    Attachments:
    Show PDF-file - Adobe Reader 7-0-5 - LV61.vi ‏43 KB
    Read PDF file.jpg ‏201 KB
    Show PDF-file - Adobe Reader 5-0-5 - LV61.vi ‏42 KB

    hi there
    try the vi
    ..vi.lib\platform\browser.llb\Open Acrobat Document.vi
    it uses DDE or the command line to run an external application (e.g. Adobe Acrobat)
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • I have iphoto '08 version with an imac osx 10.5.8. It will not read my RAW files  from my Nikon D800 - a very new model.How can I get it to read my RAW files?

    my somewhat old imac osx 10.5.8 with iphoto '08 will not read my RAW files from my new Nikon D800 camera - a new model on the market( 5 months or so). How can I get iphoto to read my RAW  files?

    iPhoto 08 would not read RAW files from that new a camera. You need to upgrade so you can get more up-to-date version of OS X and iPhoto. Another possiblity is see if iPhoto 11 will run on 10.5.8, if so you should update. You can also attempt to run Software Update and see if it finds a newer release of iPhoto 08 that supports newer RAW formats.

  • On windows 8 and itunes I have importing problems the DVD is only reading the music cd from 1.5x to 4.0x for 95% of the time, it does hit speeds of 30x for the other 5% of the time. Is it a driver issue with the DVD or is it  a windows 8 issue?

    on windows 8 and itunes I have importing problems the DVD is only reading the music cd from 1.5x to 4.0x for 95% of the time, it does hit speeds of 30x for the other 5% of the time. Is it a driver issue with the DVD or is it  a windows 8 issue?

    No. You have no alternative but to plug it into a computer running iTunes and restore it.

  • How did my pdf files get converted from 'open with Adobe Reader' to open with Adobe Acobat'?  And if I have a ''free'' Acrobat account why does it not open?  When I do click on the account it ask me to pay $89.99.  I never wanted Acrobat.  How can I get -

    How did my stored files get converted from 'open with Adobe READER' to 'open with Adobe ACROBAT'? How can I get them re-set to open with 'Adobe Reader'?
    Please reply to my e-mail:   [email protected]

    It sounds as if you downloaded Adobe Acrobat Pro. If you did, uninstall it. Then repair Adobe Reader.
    The free Acrobat account has no connection to any of this.

  • Has anyone noticed how easy it is to read a passcode that lights up with each key you press from across a room? Is there a way to stop keypad from lighting up on iPhone 4S, iOS 7?

    Has anyone noticed how easy it is to read a passcode that lights up with each key you press from across a room? Is there a way to stop keypad from lighting up on iPhone 4S, iOS 7.0.3?

    Has anyone noticed how easy it is to read a passcode that lights up with each key you press from across a room? Is there a way to stop keypad from lighting up on iPhone 4S, iOS 7.0.3?

  • I am using i padmini with retina display. i was curious to know if the pdf files saved on adobe reader app are safe from any hacking

    I am using i padmini with retina display. i was curious to know if the pdf files saved on adobe reader app are safe from any hacking

    If they are saved on your iPad, they are as safe as anything else.
    Barry

  • How to read appended objects from file with ObjectInputStream?

    Hi to everyone. I'm new to Java so my question may look really stupid to most of you but I couldn't fined a solution by myself... I wanted to make an application, something like address book that is storing information about different people. So I decided to make a class that will hold the information for each person (for example: nickname, name, e-mail, web address and so on), then using the ObjectOutputStream the information will be save to a file. If I want to add a new record for a new person I'll simply append it to the already existing file. So far so good but soon I discovered that I can not read the appended objects using ObjectInputStream.
    What I mean is that if I create new file and then in one session save several objects to it using ObjectOutputStream they all will be read with no problem by ObjectInputStream. But after that if in a new session I append new objects they won't be read. The ObjectInputStream will read the objects from the first session after that IOException will be generated and the reading will stop just before the appended objects from the second session.
    The following is just a simple test it's not actual code from the program I was talking about. Instead of objects containing different kind of information I'm using only strings here. To use the program use as arguments in the console "w" to create new file followed by the file name and the strings you want save to the file (as objects). Example: "+w TestFile.obj Thats Just A Test+". Then to read it use "r" (for reading), followed by the file name. Example "+r TestFile.obj+". As a result you'll see that all the strings that are saved in the file can be successfully read back. Then do the same: "+w TestFile.obj Thats Second Test+" and then read again "+r TestFile.obj+". What will happen is that the strings only from the first sessions will be read and the ones from the second session will not.
    I am sorry for making this that long but I couldn't explain it more simple. If someone can give me a solution I'll be happy to hear it! ^.^ I'll also be glad if someone propose different approach of the problem! Here is the code:
    import java.io.*;
    class Fio
         public static void main(String[] args)
              try
                   if (args[0].equals("w"))
                        FileOutputStream fos = new FileOutputStream(args[1], true);
                        ObjectOutputStream oos = new ObjectOutputStream(fos);
                        for (int i = 2; i < args.length ; i++)
                             oos.writeObject(args);
                        fos.close();
                   else if (args[0].equals("r"))
                        FileInputStream fis = new FileInputStream(args[1]);
                        ObjectInputStream ois = new ObjectInputStream(fis);
                        for (int i = 0; i < fis.available(); i++)
                             System.out.println((String)ois.readObject());
                        fis.close();
                   else
                        System.out.println("Wrong args!");
              catch (IndexOutOfBoundsException exc)
                   System.out.println("You must use \"w\" or \"r\" followed by the file name as args!");
              catch (IOException exc)
                   System.out.println("I/O exception appeard!");
              catch (ClassNotFoundException exc)
                   System.out.println("Can not find the needed class");

    How to read appended objects from file with ObjectInputStream? The short answer is you can't.
    The long answer is you can if you put some work into it. The general outline would be to create a file with a format that will allow the storage of multiple streams within it. If you use a RandomAccessFile, you can create a header containing the length. If you use streams, you'll have to use a block protocol. The reason for this is that I don't think ObjectInputStream is guaranteed to read the same number of bytes ObjectOutputStream writes to it (e.g., it could skip ending padding or such).
    Next, you'll need to create an object that can return more InputStream objects, one per stream written to the file.
    Not trivial, but that's how you'd do it.

Maybe you are looking for

  • Why my objects don't align

    When I select 2 groups objects (that have subgroups within each group) and align using the horizontal align center, the objects move the opposite direction instead of centering together. Anyone know what would cause this problem? I checked each layer

  • CC app preferences show as synced but are not synced

    I have CC installed on my work Mac and my home Mac. I sync preferences between the two. But I opened my CC apps on my home Mac today to find that they had all reverted to factory default settings. None of my settings (like keyboard shortcuts or works

  • Excel slows down when network drive is mapped

    Since a couple of months we are experiencing strange behaviour of excel (2011) on Lion 10.7.5 Excel versions from 14.3.1. to 14.3.4 all the same behaviour. Symptom 1) When I connect the Time Capsule drive , Excel slows down by factor 100 when enterin

  • PEAP.

    Hi there. I have setup EAP type authentication using MS-PEAP V2, everything works fine. The issue is when using PEAP, users must authenticate before network connection is established. However, this introduces another issue, I cannot for example, push

  • Difference between 5.0 & 6.0(Interaction center webclient only)

    Hi All, Currently iam working on ICWC kindly anybody tell me the extra features in 6.0(ICWC) Thanks&Regards V.Sekhar