DataSocket & OPC

We have a Flywheel which sends data via an RS-232 connection to a serial port
on a PC, where LabWindows/CVI resides. This PC is connected to the corporate
intranet.
My question is: how can other OPC clients on the intranet access the data
that resides in the LabWindows/CVI PC that acquires data from the Flywheel?
I have heard that DataSocket will allow this, but is it OPC compliant? Are
there any tutorials that I could be pointed to for finding out how to share
this data w/ OPC clients?
Thanks!
Dennis.

Hello Dennis,
DataSocket does allow you to connect to OPC servers. You may find the information at http://www.ni.com/opc of interest, specifically the link to "ComponentWorks DataSocket".
For extensive information on OPC compliance and programming with DataSocket, try the following URL: http://zone.ni.com/
Then click on RESOURCE LIBRARY >> LABWINDOWS/CVI >> CONNECTIVITY >> DATASOCKET >> GENERAL
I hope this online information fully answers your questions.
Jeremiah Cox
Applications Engineer
National Instruments
http://www.ni.com/ask

Similar Messages

  • Why are my Datasocket OPC reads and writes so slow?

    I am creating an application (in LabView 6.1) that has to interface with 15-30 OPC tags (about half and half read and write) on a KepWare OPC server. It seems like the DSC Module would be overkill, but the datasocket write VIs seem to slow the system to a halt at about 6 tags. I saw something about using the legacy datasocket connect VIs, but would I really see a large performance boost from switching?
    In the existing code we have, I have seen that even the legacy VIs (our old code uses the older VIs) sometimes grind the system to a halt or lock it up completely if it loses sight of the OPC server. Has anyone else had problems with this?

    Hi IYUS,
    What OPC Server are you using?  What methods are you using to communicate?  If you are using IAOPC, have you installed the latest patch?
    Also, this post is nearly 2 years old.  You will probably get more visibility (and more help) if you post your questions in a new thread.
    Cheers,
    Spex
    National Instruments
    To the pessimist, the glass is half empty; to the optimist, the glass is half full; to the engineer, the glass is twice as big as it needs to be...

  • Datasocket - OPC Problem

    Hello
    I have a problem with Datasocket, when I try to read from the "NI OPC Servers", I can't. But, if I execute the program with the option "Highlight Execution", there are not problems. I've already tried to put a "Wait" between readings, but the problem doesn't disappear.
    Thanks for your comments
    Solved!
    Go to Solution.

    Thanks NitinD and billko for your answers.
    I've already solve the problem, i'll try to explain it (excuse my English please).
    Before, I put "DataSocket Open", "DataSocket Read" and "DataSocket Close" in the same loop iteration, without time between open the connection and read from the OPC Server. This made than the result of the reading was '0' all the time. Here we can see a screenshot:
    To solve this, I've separated the "DataSocket Open", the "DataSocket Read" and the "DataSocket Close" in three diferents loops, and I've added a wait in the first loop:
    No problems now, I think there wasn't enough time between open the connection and read from the OPC Server. 
    Regards

  • DataSocket+OPC+Siemens=can't add item.

    I'm working on different OPC servers and
    I'm able to connect to most of them without a problem (using DataSockets
    as well as OPC Data Access Automation
    Interface v.2.02). So, my DataSocket example works fine for National Instruments
    OPC servers,and ICONICS servers,and others but only for Siemen's
    "Softing OPC Sample Server" and "OPC.SimanticNET" I get a "can't create item
    error" or "cant
    add group error" when I OPEN connection.
    The connection works fine if I use other
    methods then DataSockets or If I use
    other server.
    Does anybody know why is that?

    Adam,
    You didn't mention what version of DataSocket you are using. Upgrading to
    DataSocket version 3.0 should fix this problem. (If you are a ComponentWorks
    user, check out www.ni.com/mstudio for upgrade information or to download
    eval software)
    Denise
    "Adam Blazowski" wrote:
    >>I'm working on different OPC servers and>I'm able to connect to most of
    them without a problem (using DataSockets>as well as OPC Data Access Automation>Interface
    v.2.02). So, my DataSocket example works fine for National Instruments>OPC
    servers,and ICONICS servers,and others but only for Siemen's>"Softing OPC
    Sample Server" and "OPC.SimanticNET" I get a "can't create item>error" or
    "cant>add group error" when I OPEN connection.>>The connection works f
    ine
    if I use other>methods then DataSockets or If I use>other server.>>Does anybody
    know why is that?>

  • Connect Labwindows to third party OPC client by datasocket

    Hi
    I have a computer that collect RTUs data through GPRS with Labwindows (simple TCP socket) and aving them. I want to use this data in a third party SCADA application by using third party OPC client. Actually I want to use datasocket to send data to datasocket OPC server (publisher is labwindows) and third party OPC client read it by connecting to datasocket OPC server.
    1. The question is is it possible at all?
    2. Which OPC server in Datasocket I should choose? ( DaqOPC, OPCDemo, OPCFieldPoint,...)
    Sorry if they were basic questions.

    Naderus,
    While I dont know all of the caveats that may come with a few of the acronyms in there, in general, you absolutely can use datasockets via an OPC server. Probably the easiest to use are network shared variables (which are an OPC server). I did notice you had another thread going here. Did you have any luck with the examples and help files they forwarded you to there?
    Regards,
    Kyle Mozdzyn
    Applications Engineering
    National Instruments
    Regards,
    Kyle M.
    Applications Engineering
    National Instruments

  • DataSocket memory leak problem (2VO0SF00) -- more info?

    When upgrading to LabVIEW 8.5 recently, I noticed the following known issue in the readme file:
    "ID: 2VO0SF00
    DataSocket/OPC Leaks Memory using ActiveX VIs to perform open-write-close repeatedly
    If you call the DataSocket Open, DataSocket Write, and DataSocket Close functions in succession repeatedly, LabVIEW leaks memory. Workaround — To correct this problem, call the DataSocket Open function once, use the DataSocket Write function to write multiple times, and then use the DataSocket Close function."
    Looking back, I think this problem may have been present in previous LabVIEW releases as well, and might be giving rise to a problem that's been dogging me for quite some time (see my thread, "Error 66 with DataSockets", http://forums.ni.com/ni/board/message?board.id=170&thread.id=187206), in addition to general slow/glitchy behaviour when my VI's have been running continuously for a long time. But in order to determine whether or not this issue affects me, and how I should go about fixing it in the context of my own programs, I need a bit more information about the nature of the issue itself and the inner workings of the DataSocket VI's. Any help or insight the community can provide into this would be greatly appreciated!
    Here are my questions:
    It is my understanding from the "known issue" description above that the memory leak happens when you have a DS Open wired to a DS Write wired to a DS Close, all inside a loop (example 1), and that the suggested workaround would be to move the DS Open and DS Close functions out of the loop on opposite sides, wired to the DS Write which remains inside the loop (example 2). Is this correct?
    Does this leak also happen when performing DS open-read-close's repeatedly (example 3)?
    What happens when a DS Write (or DS Read) is called without a corresponding DS Open and DS Close (examples 4a and 4b)? Does it implicitly do a DS open before doing the write operation and a DS close afterwards? What I'm getting at is this: would having an isolated DS Write (or DS Read) inside a loop, not connected to any DS Open or DS Close functions at all, cause this same memory leak?
    If one computer is running the DS server and a second computer is running the VI with the repeated open-write-close's, on which computer does the memory leak occur?
    In my question #1 workaround (example 2), the DS Open and DS Close outside the loop are routed through a shift register and in to and out of the DS Write inside the loop. If the DS connection id goes into the DS Write "connection in" and then splits and goes around the DS Write and out to the DS Close, without coming out of the DS Write "connection out" (example 5), will the memory leak still be avoided? I.e. if the DS Write function doesn't have anything connected to its "connection out", will it try to do an implicit DS Close?
    If the VI causing the memory leak is stopped, but LabVIEW stays running, will the leaked memory be reclaimed? What if the VI is closed? What if all of LabVIEW is closed?
    FYI, in the examples above "x1a" is a statically-defined DataSocket on the DS server running on the computer Max, to which the computer running the example VI's has read/write access. My actual application has numerous VI's and hundreds of DataSocket items, many of which are written to / read from every 50-100 ms in the style of examples 4a and 4b.
    Does anyone have any idea about this stuff?
    Thanks in advance,
    Patrick
    Attachments:
    examples_jpg1.zip ‏63 KB
    examples_vi1.zip ‏40 KB

    Hi Meghan,
    Yes, some of the larger VIs in my application do write to / read from several hundred DataSockets, so it's not feasible to use shift registers for each one individually, and hence why I'm passing the references into an array, etc.
    Your Alternate Solution 2 is more along the lines of something that would work for me. However, my actual code has a lot of nested loops, sequences and DataSocket items which are not all written to in the same frame, so this solution would still be difficult to implement: it would be cumbersome to unpack the entire 500-element reference id array and build a new one (maintaining the positions and values of the unaffected elements) every time I write to some small subset of the DataSockets.
    I think I have a solution which solves the problem and is also scalable to the size of my application -- I've attached it as Example 7. Do you think this will avoid the memory leak? It's the same as your Alternate Solution 2, except that instead of building a new array out of the DS Write reference outs, each reference out replaces the appropriate element of the original array.
    If I understand you correctly, in order to avoid implicit reference opens and closes, a DS Write needs to have both it's reference in and reference out wired to something. Thus, even though my Example 7 replaces an element of the array with an identical value, and therefore doesn't actually change the array (which would be a silly thing to do normally), the DS Writes have their reference outs wired to something, and eventually in a convoluted way to a DS Close, so it should avoid the memory leak.
    Just out of curiosity (I don't think anything like this would apply to my application or any fixes I implement), when would the implicit reference close happen in the attached Example 8? The DS Write has its reference in and reference out both connected to temporally "adjacent" DS Writes via the shift register, so perhaps it wouldn't try to close the reference on each loop iteration? Or would it look into the future and see that there is no DS Close and decide to implicitly do that itself? Or maybe only the DS Write on the last loop iteration does this?
    Thanks for bearing with me through this,
    Patrick
    Attachments:
    example73.JPG ‏40 KB
    example83.JPG ‏14 KB

  • Alternative OPC Client?

    Hello,
    I’m searching for an alternative OPC-Client.
    Is there someone out there who has developed a LabVIEW Interface for an OPC-Client (OPC-DA) from Softing, OPC Labs or another company? I did not found an OPC Client witch supports LabVIEW.
    Maybe you would sell your code or spend your code or give Information or help for the implementation?
    If you do not want to make your answer public you could send me a private message. Maybe I could return the favor with some code you would be interested in?
     I know that LabVIEW supports OPC with 2 different Clients (http://www.ni.com/white-paper/7451/en/).
    OPC via DataSocket
    OPC via LabVIEW Datalogging and Supervisory Control (DSC) Toolkit
    But the free OPC via Datasocket has limitations, and it does not work with the OPC-Server from IFM where other OPC-Clients work well (I think, the IFM OPC-Server Version 2 is not that well implemented).
    And the DSC Toolkit is too expensive because we need only the OPC-Client component and we are using it at some customers (a Runtime Licence is 800 €).
    Please help
    Sletrab

    I haven't worked too much with OPC, and I haven't tried this myself, but you could try looking for .NET or C implementations of an OPC client and call that.
    Try to take over the world!

  • Communication lost between labview 6.0 opc to rslinx

    I am reading i/o tags from an allen bradley 5/05 through rslinx using ethernet settings. Everything works fine, I read and write to the tags all day. However, If I go online through the ethernet it seems like all the bandwidth is used up and labview displays an error. maybe opc times-out. When labview is retrieving just i/o through opc, it works fine. But if it is retrieving i/o and gathering analog data from a MIO card and you try to get on the plc it faults out. Anything would help. I have attached i/o read/write vi
    Attachments:
    NEW_OPC_Digital_Functions.vi ‏134 KB

    You could try accessing the i/o on the plc using the 'Server Explorer' program. If you do not have that program you can download it at: :Server Explorer. Server Explorer is a utility that allows you to view and interact with available OPC servers. You might also try accessing the PLC from two different computers at the same time to see if it is a problem on the PLC side. There are not any known issues with DataSocket OPC like this so you might also contact Allen Bradley about the issue.
    Regards,
    JR A.
    Application Engineer
    National Instruments

  • Profibus and OPC questions

    Hi,
    I need to communicate from Labview to a Siemens S7 PLC via Profibus and I have a few questions.
    1. Does anyone have any recommendation on using the Siemens Prifibus PCI card/OPC server or Applicom PCI card/OPC server or other make?
    2. What is the best way to communicate from Labview? To an OPC server by datasocket(I seem to see a lot of comments about Labview not being a very good OPC Client when using datasocket!), or to an OPC server by ActiveX automation, or by ActiveX controls?
    Any help is appreciated!!
    Sal

    Hi,
    1. I have had customers using Applicom cards and OPC Servers without much problem.. overall, they're pretty good.
    2. For OPC in LabVIEW, LabVIEW Datalogging & Supervisory Control (LVDSC) module is the way to go! LVDSC is an add-on module which you can install on top of your LabVIEW. It provides native (non-datasocket) OPC support. In addition, it also provides features typically required by a datlogging and supervisory control application, like historical logging and trending, alarming, security, etc. Check it out:
    http://sine.ni.com/apps/we/nioc.vp?cid=10418〈=US
    Hope this helps.
    Rgds,
    Khalid

  • Labview/induscreen via une liaison OPC

    Bonjour,
    Je souhaite faire communiquer labview 6i et induscreen 4.1 via une liaison
    OPC mais je n'arrive pas a trouver la syntaxe...
    La liaison s'effectue avec le serveur OPC d'induscreen
    (Induscreen.OPCServer).
    Esc-ce que quelqu'un connais cette syntaxe et peut me la faire parvenir?
    Merci.
    CMH AUTOMATION
    Bureau d'Etudes
    ZA du Tuboeuf
    Rue gloriette
    77170 BRIE COMTE ROBERT

    Hello, CMH....I apologize for not answering this question in frech but je ne parle pas frances...
    Anyway, If you have labview 6i, you can access the OPC server either using the DataSocketopen.VI or using Frontpanel Datasocket.
    Frontpanel Datasocket, in my opinion is the easiest. The only thing that you need to do is to create a control on the front panel, right click on the control, and then go to data operations/data socket connection and then browse(browse measurement data)and select the OPC Server/item that you are using....this is pretty straight forward.
    Now, if you want to use the datasocketopen.VI, you will need to have the right sintax at the URL connector in the Datasocketopen.VI in order to be able to communicate with the OPC Server.
    The generic sintax for
    the URL connector at the datasocketopen.VI to select an OPC Server/Item is shown below:
    opc://
    or
    opc://?updaterate=xxxx
    where xxxx is the update rate.
    Below, you can see the URL sintax for a datasocketopen.VI used to get data from channel 0 of a FP-AI-100 module, using the National Instruments OPC Server.
    opc:/National Instruments.OPCFieldPoint/FP Res\FP-AI-100 @1\Channel 0?updaterate=1000
    where
    is the OPC Server.
    is the OPC Item
    and
    updaterate=1000 is the parameter for the update rate.
    There are very good examples that come with LabVIEW 6i, just go to:
    search examples/communication/datasocket OPC.
    Check out the OPC to URL VI used for most of the examples. This VI helps you with getting the right sintax on the URL connector in the datasocketopen.vi.
    Also, please contact the distributor of the OPC Server (Induscreen)and ask them the specific details on defi
    ning item names with their OPC Server.
    I hope this helps.
    Arevoir.

  • Writing to a profibus network using labview datasocket

    Hello
    Can anybody help me?
    I'm trying to control a moeller inverter using labview datasocket on a profibus network. the problems i am having is how to structure my Vi to write the message. so far i have used loops to write the first message to notify the inverter of status change then to write the new frequency setpoint. but i am having awful trouble doing this consistently without the inverter sending a fault message and denying me further control. i have also used an update button to pass the next value on but this requires furious mouse clicking to eventually get the message to the inverter. i have tried modifying some of the labview examples for CAN write and some others but often with less success. i'm sure this must be a standard thing with any Profibus writing to any other equipment. Can anyone give me any pointers or example code to help.

    Hi,
    I'm assuming that since you're going over datasocket, then you're linking to a profibus opc server.
    For OPC in LabVIEW, LabVIEW Datalogging & Supervisory Control (LVDSC) module is the way to go. LVDSC is an add-on module which you can install on top of your LabVIEW. It provides native (non-datasocket) OPC support. In addition, it also provides features typically required by a datlogging and supervisory control application, like historical logging and trending, alarming, security, etc. Check it out:
    http://sine.ni.com/apps/we/nioc.vp?cid=10418&lang=​US
    With either datasocket, or LVDSC, you're looking at a polling setup, and the actual communications is done with the Profibus OPC server. In this way, if you're writing to quickly, or the poll rate isn't correct at the server side, then that could lead to problems.
    I would recommend contacting both the OPC provider, and the device manufacturer to see if there's any quirks in the system you need to be aware of, and create your code appropriately.
    Another option might be to take on already developed drivers and hardware. There is a company in Germany offering VISA drivers for Profibus communications (www.comsoft.de), however, they're linked to specific profibus interface cards. This is not a personal or a National Instruments recommendation however, but something another user has posted on a similar discussion forum so we can't be held responsible if you decided to go down that route.
    http://forums.ni.com/ni/board/message?board.id=120​&message.id=224&requireLogin=False
    Thanks
    Sacha Emery
    National Instruments (UK)
    Message Edited by SachaE on 01-31-2006 01:35 PM
    // it takes almost no time to rate an answer

  • Labview communicate with ABB robot through dll Dot Net

     
    Hi all,
    Currently  I need to use labview to do the communicate with dot net, for example to read and write RAPID data, Get execute status from robot. I'm able to read from RAPID but can't manage to write. Does anyone have an idea how to do? Please advice. Thanks

    Hi,
         The NI OPC Server supporting device and drivers are here. Labview and third party device communication through OPC Server web cast avalable on here.
         Datasocket/OPC Server Example avalable on following link. \Program Files\National Instruments\LabVIEW 2009\examples\comm\datasktx.llb
    Siva
    Sivaraj M.S
    CLD

  • How to map one modbus register to another modbus register in labview?

    How to map one modbus register to another modbus register in labview? For example, let 40001 equal to 30001. Thank you.
    Steven

    Hello Steven,
    Sorry, I was under the impression that you were using the complete Lookout development software (as opposed to just the Lookout Protocol Drivers). You cannot do any development (connections, mapping, etc.) with the Lookout Protocol Drivers (LPD). So, you were right. We have to do this in LabVIEW.
    I ain't sure how exactly the Modicon floats work, but assuming what you're saying is correct, in your LabVIEW VI(s) you would read the DataSocket item corresponding to 40yyy+1 first, and then write this value back to the DataSocket item corresponding to 40xxx. Similarly, you would read the DataSocket item corresponding to 40yyy and then write the value read back to the DataSocket item corresponding to 40xxx+1.
    A tip: I wou
    ld at first make sure I have the OPC communication between LabVIEW and LPD working. Make sure you can read and write to the LPD registers via their DataSocket/OPC equivalents in LabVIEW. You can then implement the mapping as described above.
    Hope this helps,
    Khalid

  • Variable partagée

    Bonjour,
    J'ai une variable que je voudrai lier avec une variable d'un serveur OPC. Voici la copie d'écran une variable qui fonctionne très bien mais il y a un message qui me dit "National Instruments vous conseille d'utiliser le moteur de variables partagées pour la liaison de données...." Pas de souci, alors je crée une variable partagée mais comment faire un équivalent avec l'ancienne de type DataSocket "opc:/OPC.SimaticNET/S7:[Liaison_S7_1]Humidite_relative". Voici une copie d'écran de la variable partagée mais je ne sais pas si c'est bien configurée. Merci d'avance de votre participation.
    Pièces jointes :
    DataSocket.JPG ‏65 KB
    Variable partagée.JPG ‏68 KB

    Bonjour,
    SI j'ai bien compris, vous souhaitez lire une variable qui a toujours le même nom depuis un ou plusieurs endroits, et cette variable peut changer d'emplacement. J'entend par emplacement l'adresse IP du PC qui publie la variable et celle de celui qui vient lire la variable.
    Si c'est bien ça, on doit pouvoir le faire en indiquant le nom du PC dans le chemin de la variable à la place de l'adresse IP. Du coup, au moment de lire la variable, il va chercher le nom du PC et non son adresse IP.
    Le chemin devriendrait alors quelque chose comme : ni.var.psp://NomDuPC/NomDeLaBibliothèque/NomDeLaVariable
     A voir si ca fonctionne. Sinon, on peut toujours rendre le tout plus facilement modifiable en construisant la châine en indiquant la nouvelle valeur d'adresse IP pour la variable.
    Cordialement
    .mesLeft{float:left} .mesInfo{border-left:solid 1px #989898;font-size:x-small;color:#989898} .mesLogo{float:right;opacity:0.18} .mesLogo:hover{opacity:0.9}
    Maxime R.  
      CLD - Certified LabVIEW Developer / Développeur LabVIEW Certifié  
      CLAD - Certified LabVIEW Associate Developer   

  • How can I connect LabView with a PLC S7-300?

    I want to use LabView with a PLC S7-300. I think I can use a PC card or RS 232 with a HMI interface.What is the difference? I think I need an OPC server (I don´t know who sell it, National Instruments or Siemens) and I don´t know if I need anything else than LabView6i.
    Thank you.

    Alicia,
    Ben's answer is absolutely correct. "Profibus" is the key word here, and a search of "profibus" from ni.com will provide quite a bit of information. I went ahead and pulled out the main items below. Follow the link below for product catalog info on the plug-in cards and interface software (the OPC Server) required.
    http://sine.ni.com/apps/we/nioc.vp?lang=US&pc=bymn&cid=1315
    For a step-by-step configuration tutorial, please follow this link:
    http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&BA7CB7B0FFBEA12286256A32005B2BEA&cat=103057DD6D5AE678862568630016C98C
    And finally, for examples on how to communicate with this OPC Server, or any other OPC Server for that matter, LabVIEW has some shipping examples. From LabVIEW, goto "Help >
    > Communication >> Datasocket OPC". A good one here is the "Demo OPC Client" program, which uses a software OPC Demo Server that installs with LabVIEW. You could pull that open and work with the LabVIEW programming now before you even have the hardware.
    Regards,
    Greg Caesar
    National Instruments,
    Applications Engineer

Maybe you are looking for