Connecting to a data socket

If a machine opens a socket connection to me, how to I get data from it. I have the IP of the machine and the socket number. Do I just give the IP number to Data Socket Read and the listen for data?
Thanks

Hi Exo,
"You can only use DataSocket as a client on Linux, Solaris and Macintosh.  This
means that from a non-Windows machine you can publish to and read from a
DataSocket Server, but the server itself must be running on a Windows machine.  The DataSocket Server application is built on Windows-based ActiveX
technology and so is only available for Windows environments."  This is from KnowledgeBase 29A9RA8V.
In the LabVIEW Example Finder >> Communicating with External Applications >> OLE for Process Control (OPC) >> open the Browse to OPC Item example.  The example will build the URL to the OPC server item if it is available on the network.  You can also see How Do I Use OPC in LabVIEW?  I hope this helps.

Similar Messages

  • Why can't I read what I have written to the data socket server?

    Hi,
    I have a problem with DataSocket: I open a socket and in a cycle I read from the socket and write a boolean "TRUE" to the socket. But reading from the socket I always get a "FALSE" value back.
    Monitoring the socket from a second VI where a boolean control is connected to the data socket shows that the "TRUE" value that I write is accepted on the DS-Server.
    Is this a bug or do I miss something?
    Regards
    Tobias
    Attachments:
    readwriteDS.zip ‏17 KB

    hi there
    i'd recommend to use two connections for read and write access (see attachment). The ReadWrite mode does not work properly with DS. you can establish the connections at startup of your app and use them until you are done. when using the URL as a input the server must check for a open connection or create one in each cycle.
    best regards
    chris
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"
    Attachments:
    set_flag_v2_LV7.1.vi ‏43 KB

  • What is the purpose of open/close connection data socket?

    Hello everyone,
    I am writing and reading values in OPC Server through data socket. What is the purpose of open/close connection data socket when writing /reading a value?  Without the open/close connection element, it still work correctly. I am writing values in the server thru event stucture.I do not need any buffered reading or writing. What will happen if I didnt not use the open/close connection? Maybe it may cause some problems in my program which i didnt realise? 
    And I have attached an example of my program. Thanks
    Yehchia
    Attachments:
    Test Event.vi ‏11 KB

    Hi YehChia,
    I was talking about something like that:
    1. Not good. since with every iteration the DS connection needs to be opened and closed.
    2. Good. Since you open the connection only once then do the reads and close it afterwords.
    Christian

  • Data Socket Connections Dropped

    I am using Data Socket to pass information from a control computer to two
    remote computers. At various times throughout the day the connections, between
    the control computer and the remote computers, are being dropped (the number
    of connections drops from 3 to 1). The remote computers still believe that
    they are connected to Data Socket, however they are no longer receiving updated
    data. Has anyone else experienced this? Does this seem like a "network
    traffic" issue?
    Any help is appreciated.
    Thanks,
    Ari

    Hey Rick, 
    This is a bit of a labor-intensive answer, but it will help you with any future DataSocket programming you want to do. Read through this DataSocket Tutorial to get started. You will probably also need some information on configuring a DataSocket server after you read through the tutorial. Hope this helps! 
    Cheers,
    kgarrett

  • Problems with data socket connection

    I have two computers on a network both running labview. I would like to
    exchange the value of a variable in both directions. For example
    computer A sets the variable to a certain value, computer B reacts and
    changes this variable. Computer A now reads the new value.
    So I tried this using (front panel) data sockets but I could not
    establish a connection the way I want it. Also I couldn't find answers
    here or in the labview help file, so I hope you can give me a short
    hint on how to do that (do I need to run socket server on both
    machines? What IP address do I need to enter in the front panel dialog?)
    Thank you very much,
    Michael

    Thanks for the Port number, I got it to work now.
    I will summarise what was necessary to establish a connetion in case other people are interested:
    If you need a bidirectional communication between computer A (IP:192.168.0.1)
    and B (IP: 192.168.0.2) the following steps may be necessary:
    - Run DataSocket Server on *both* computers before you start LabView
    For communication A to B:
    - Select a variable on computer A, and enter the following in the connect to field:
       "dstp://192.168.0.1/var1", click on "publish"
    - Create a variable of the same type on machine B and enter in the connect to field:
       "dstp://192.168.0.1/var1", click on "subscribe"
    For communication from B to A do the following:
    - Select a variable on computer B, and enter the following in the connect to field:
       "dstp://192.168.0.2/var2", click on "publish"
    - Create a variable of the same type on machine A and enter in the connect to field:
       "dstp://192.168.0.2/var2", click on "subscribe"
    Maybe this is not the most elegant way because I don't know how to use the "Publish and subscribe" field
    but at least it works this way.
    Michael

  • How to establish data socket connection with remote computer

    hi am new to data socket subject, cau u guys guide me on this...
    i want to establish connection between system with lv and datasocket modem.... so i need to create vi to receive
    the data and insert into sql from modem(its having data socket option).
     Pls help me.........

    duplicate post -- continue here

  • How to establish data socket connection with remote unit

    hi am new to data socket subject, cau u guys guide me on this...
    i want to establish connection between system with lv and datasocket modem.... so i need to create vi to receive
    the data and insert into sql from modem(its having data socket option).
     Pls help me.........

    duplicate post -- continue here

  • How can I read realtime data from a data socket using DIAdem

    I am currently routing data from an instrument using LabView 7.1 to a data socket. I was trying to figure out how to access that data in real time in DIAdem through the data socket. Another option would be to use the downloaded LabView/DIAdem VI package, but I haven't figured out how to get that to work either, despite the forums here. I would prefer to access it through the data socket, if possible, as the amount of information being transferred is negligable (a string and a double).
    Thank you,
    Sinan Sutcu

    You have to use one of the ScriptDAC blocks. In your case, as you would like to fetch data from a LabVIEW vi, choose the out of the driver input palette. Inside the configuration dialog you can generate a sample script, which is then copied to the windows clipboard. It contains a lot of function prototypes which will be automatically called later during the measurement.
    Basically, the init functions are called during the start of the measurement - here you should connect to the activeX server, the deinit functions are called when stopping the measurement - disconnect from the server here.
    Then there is the function SFD_Readchannel, which is called once for eych tact and each channel you configured. Here, you should exchange the data with your VI.
    I am attatching an example I wrote to control a LabVIEW vi (doing a counter output operation)- that is why the data exchange works the other way around, but I hope it explains the principle.
    Additionally I am adding documentation about the ScriptDAC driver interface.
    Regards
    Ingo Schumacher
    Systems Engineer Sound&VibrationNational Instruments Germany
    Attachments:
    MultiCounterOut.zip ‏995 KB
    Script DAC Driver.zip ‏734 KB

  • Create OPC I/O server and front panel data socket problem

    Hi all!
    I installed the NI OPC server. When I try to create a new server I/O in a LabVIEW project I don't see the "OPC client" possibility.
    Is something software missing? 
    Other question: I tryed to connect to OPC server using front panel data socket but my problem is same. When I click the numeric control and I go to the "data operation" menu there is no possibility to make data socket connection. 
    I don't know what is the problem.
    I attached two pictures about my problem. 
    Solved!
    Go to Solution.

    Dear vajasgeri1,
    do you have LabVIEW DSC module installed? Without it you will not have the OPC client funtionality.
    And to configure DataSocket binding you need to go to the Data Binding tab in the Properties of a control.
    BR,
    Mateusz Stokłosa
    Applications Engineer
    National Instruments

  • Data Socket

    I am reposting this message and hope someone can help me....
    I have been using Data Socket to pass information from a control computer
    to two
    remote computers. At various times throughout the day the connections, between
    the control computer and the remote computers, are being dropped (the number
    of connections drops from 3 to 1). The remote computers still believe that
    they are connected to Data Socket, however they are no longer receiving updated
    data. Has anyone else experienced this? Does this seem like a "network
    traffic" issue?
    Any help is appreciated.
    Thanks,
    Ari

    I got this answer from another question posted on the NI website. I don't know if it will help but it seems like this may be the same problem.
    Jeff M. on 8/8/2001 answered:
    "There isn't a limit to the number of packets that the datasocket server can handle. What I surmise is happening (had this happen to me) is that the power savings features on your system are turning on (system goes to standby) and this basically disables the ability for the server to function and kills datasockets."

  • Data Socket Documentation

    Could someone please help me find detail Data Socket documentation regarding allowed urls and Timouts..  For example what expressions are not allowed for making connections(.html)?  And what is the maximum Timeout (seems to be limited to ~20secs)?  -SS

    Unfortunately, there isn't a single source that I would call the "definitive" data connection resource for LC Designer. I would suggest using information from the following resources at your disposal:
    These forums. There are lots of examples here on data connections and some Adobe personnel along with many other very knowledgeable customers providing answers.
    The
    Working with Data Sources help topic in LC Designer Help.
    Data Connection samples found on the
    Adobe LiveCycle Designer Samples page.
    My personal favorite: Looking at the JavaScript code in the Initialize event of the Data List Box object found in the Library palette's Custom tab (drag one on to a form and look through it's Initialize event code using the Script Editor).
    If you have a specific question about a problem you're trying to solve using Data Connections in LC Designer, please post to a thread in this forum. We'll be happy to help you solve it.
    Stefan
    Adobe Systems

  • Data socket open?

    I have one computer with a data socket that I write some waveforms to
    at ~ 1Hz.  I have another computer that reads out that data, and
    logs it.  My problem is that sometimes, I have to stop the vi on
    the data socket server machine, at which point, the second machine
    running the "data socket read vi" stops and gives an error, since the
    datasocket no longer exists.  Is there some way for the reader
    machine to test to see if the datasocket exists, and if not, I'll just
    write zeros or keep testing until it's open again?  I don't want
    to have to go over to the other machine and restart the vi every time
    this happens.
    thanks.
    Jesse Wodin

    Hello,
    One way to do it would be to simply check for that error in your loop.  If it occurs, you know the connection was lost, otherwise you're receiving data!
    Will this work for your application?
    Thank you,
    JLS
    Best,
    JLS
    Sixclear

  • Data Socket fails if built in DLL and called by Labview

    I've placed a Data Socket Connection Open in a SubVi and tested this by running the VI. -> No Problems.
    Then i've compiled a DLL from this Vi and started it from Visual C. -> No problems
    Now, i've included this DLL in another VI and started this.  Now i receive an Error.
    All Information is hardcoded in the DLL so there are no possiblities with parametrization.
    Does anyone have an Idea regarding this?
    Best regards
    Hacky

    Hello Carsten_S.....
    my collegue, who found this behaviour made a little package to
    show the environment. Since he uses a camera system there is no
    possibility to get it running. But it should be easy to create a LV based
    server.
    Our Environment is:
    LV 7.1
    Windows XPSR2
    Regards, Hacky
    Attachments:
    DLL.zip ‏76 KB

  • Data Socket Publish and Subscribe option

    I'm writing a server/ client application in wish the client needs to be updated by the server with information when its first started and then also be able to write back to the same controls thru data socket. The applications are on two different computers connected with ethernet. I try to use the "publish and subscribe" option on the datasocket set up but the client can not connect to write to the server when i do this. It says that a host is already connected to write so therefore the client can not write to the server.
    I've also tried creating a control and an indicator with separate publish and subscribe data socket features but this does not permit for automatic updating in my server. It must wait for the server's application to finish thru a loop that has a timer that varies around 30 seconds.
    Is there any other way to have a client update a server in real time with both read and write functions?
    Thanks in advance!

    One thing you can try to do is to enable the "Allow Multiple Writers" option on the DataSocket Server.
    In the DataSocket Server Manager, under Predefined Data Item, create the item that your server/client need to write on, and enable the "Allow Multiple Writers". This will allow both server and client to write to the same address line.
    Hope this helps,
    Dan

  • Using Data Socket with LabView 7 Image Display

    I want to to connect the Image Display over the Data Socket, but its not working?

    Please be more specific. How are you trying to connect to the datasocket. is it over a network. same PC.
    Joe.
    "NOTHING IS EVER EASY"

Maybe you are looking for

  • ITunes forgets media folder is on external hard drive

    Hi I have recently started using a Time Capsule with an external hard drive attached. I have moved my music and video to the external hard drive to free up space on my MacBook Pro hard drive. I have set up iTunes to play from the external hard drive

  • Processing WS-Security headers within a web service

    Hello, I have created a service with WS-Security (from a WSDL using jdeveloper) and deployed it on OC4J. Within the service implementation, I need to get some information from soap security header, that is, my service needs to process some security h

  • E-mail send limit can't be right

    So I keep getting this message when I try to send e-mail today: Cannot send message using the server iCloud (iCloud) The sender address [email protected] was rejected by the server p01-smtp.mail.me.com. The server response was: [email protected]: You

  • What Happens IF...[Time Machine ?s]

    I have acquired a new Mac [Migration from the old worked seamlessly]. The old TM external drive is sitting beside it, not plugged in. The new TM external drive is beside the old, also not yet plugged in. Can I use both TMs? The new one from "now, for

  • JDBC Connecttion to 16 bit MSAccess DB

    Is it possible to connect from java to a 16 bit secured Microsoft Access database? What drivers and connection parameters do I need? Do I absolutely need a Data source?