Connecting a Siemens S7-300 PLC to NI OPC Server

As a part of the final year Bachelor Thesis project I and two others are involved with, I have been tasked with setting up an HMI/SCADA system to control level and flow in several water storage tanks. This is to be done locally via a "Operator Panel" and also remotely over the Internet via webbrowser. These storage tanks and control system is placed on a wheeled demonstration model so it can be used in classrooms and auditoriums. As such, I have a Siemens S7-300 PLC and the latest edition of LabVIEW (2009 Professional Ed.) available to me. In order to create a HMI system, we will also acquire the NI DSC module as it should have everything we need (NI OCP is included?).
Since this is a bachelor project and the school is basically paying for everything, we are on a rather strict budget. This means that we currently haven't settled on a solution for the "Operator Panel" since this would be dependent on how the PLC and panel interfaces. What we would like to do for simplicity sake is to use commercial laptop computer with touchscreen capability thus having a low cost "all-in-one" solution, both for local input & control and web publishing capability. Now, most computers today doesn't have serial comports anymore, but rather USB ports.
On the OPC server webpage under the OPC Device Connectivity heading, it is specifically stated "Siemens HMI Adapter for S7-300/400 via Serial with HMI adapter". I assume this refers to the following Siemens product: https://support.automation.siemens.com/WW/llisapi.​dll/csfetch/8774263/hmi_adapter_x.pdf?func=cslib.c​... (6ES7 972-0CA1X-0XA0).
Does this mean that the OCP server can only use a Serial connection via the HMI adapter for the S7-300 directly? Would it be possible to use a driverless Serial to USB adapter with the HMI adapter, or for example the Siemens CP5711 MPI to USB adapter? If it is not possible to use a USB based solution, We would have to use an older desktop PC with an serial comport or an additional PCI card and that is something we would like to avoid.
Any help on this matter would be highly appreciated.
-- DanJack, NUC Norway
Solved!
Go to Solution.

now this is a problem the PLC S7300 does not support some functions of communication when you want to make a simulation may not be accessible from OPC Server, this by PROFIBUS Siemens USB / MPI + PLC S7300/400 protocol adapter cord
Atom
Certified LabVIEW Associate Developer

Similar Messages

  • Connection of Siemens S7-300 PLC to NI OPC Server 2012

    Hi,
    My name is Gevorg.
    I am going to create a communication between S7-300 (CP 343-1 Lean) and NI OPC Server 2012.
    As per my investigations, NI OPC server does not have appropriate drivers for S7-300 PLCs. At the other hand I could find any documentation, that prooves that S7-300 supports OPC protocol.
    Does anyone have any experience of using S7-300 PLCs?
    What protocol does it support?
    Could you please help me..
    Attached you can find the datasheet of S7-300 PLC.
    Thank you in advance,
    Attachments:
    OPC server.png ‏64 KB
    GH_CP343-1-Lean-CX10_76.pdf ‏1563 KB

    https://decibel.ni.com/content/docs/DOC-38858
    Atom
    Certified LabVIEW Associate Developer

  • How can I write to a Siemens S7-300 PLC tag from OPC Server.vbai page by using a Knob object ?

    I am using NI OPC Server and I can read Siemens S7-300 PLC tags such as thermocouple values from the PLC. Additonally I can write manually a constant value to that tag by selecting it in the NI Distributed System Manager. And I can read the written value from NI Distributed System Manager or from NI OPC Server. But I can not write any value to the S7300 PLC tags such as by using a knob object at the NI Vision Builder AI Inpection (.vbai) page.
    Any help is welcomed. Thanks in advance.
    Attachments:
    manual_writing_to_plc.png ‏298 KB

    The tutorial at the following location explains how to use Vision Builder AI as a OPC server.
    https://decibel.ni.com/content/docs/DOC-18647
    http://www.ni.com/white-paper/13574/en
    To allow VBAI to connect to an OPC Server (i.e. act as an OPC client), you need to purchase and install the DSC Run-time System.
    Once installed, you can create an OPC I/O client using the Distributed System Manager, create variables bound to OPC tags, then create VBAI network variables that are bound to these variables.
    Another possible technical solution to connect to OPC Servers supporting Data Access 2.0 is to use the datasocket API in a Run LabVIEW step.
    http://forums.ni.com/t5/Machine-Vision/Read-and-Write-with-OPC-through-NI-Vision/m-p/2048278/highlig...
    Hope this helps.
    -Christophe

  • How to connect siemens S7-300 PLC

    Dear Sir,
    I am using labview 8.2 and i want to connect siemens S7-300 PLC. Please suggest me how can i connect it with labview 8.2?

    Ran across this similar message which points to this KB article which you may want to look at.

  • Can i connect Labview 8.5 with Siemens S7-300 PLC with Rs-232 protocols

    Hi....I want to interface Siemens S7-300 PLC with Labview 8.5.....The PLC has MPI to RS-232 PC Adapter (6ES7 972-OCA23-OXAO).....i have made a GUI on Labview 8.5 and want to bring Voltage and Current data in realtime in Labview and Display that......Please help me.....
    Thanx

    You should open the Example Finder (Help -> Find Examples) and take a look at the serial communication examples. They should be able to do what you want.
    However, I do have to point out this: "want to bring Voltage and Current data in realtime". Define "realtime". Do you mean you're working on a Real-Time OS? 

  • Siemens S7 300 PLC Communicationnd with Labview

    hi;
    I'm trying to connect my PLC s300 with labview in my PC .
    How can I proceed ?
    what is the easiest way to do the communication knowing that I did the simulation using TCP/IP protocol with OPC server.
    I have SIMATIC net station and CPU 315 2-DP
    any suggestion?
    I want to use OPC server with MPI  can I do so ? amI supposed to add materials and what are those materials ?
    Thanking in anticipation.

    sivaramkumar wrote:
    Hi.I am using a CP-343 communications processor
    to connect the S7 300 to industrial ethernet. Now can I commnicate
    directly from Labview to the PLC?We are plan to use ethernet communication (our TCP VI's). 
    Which type of command we need to ues. whether we need to form a MODBUS protocol command.
    Siemens S7 supports all kinds of protocols. Some are built in from start and are usually Siemens specific protocols whose specs are not always easy to come by, others can be purchased and installed on the communication processor seperately such as Modbus. Once you have the Modbus library installed on your S7 you can simply use the Modbus VIs downloadable from the NI site to communicate with your S7 datablocks.
    It is a strict IO access meaning you can read and write IO registers and memory datablocks, but not interfere with the actual programm on the S7 in other ways.
    Using Modbus is simply and hard at the same time, since Modbus uses various datatypes with different address ranges that are mapped in some way to the items in the target hardware. This mapping can be tedious to work out correctly since the documentation of devices is sometimes quite a bit unclear about how exactly that has been done by the manufacturer.
    There are many other Ethernet protocols that are available or can be installed on a S7 such as Profibus Ethernet, EtherCat, Industrial Ethernet, etc. Most of these while technically possible to be implemented on top of the native TCP LabVIEW nodes are rather complicated and therefore anything but trivial to create a VI library for.
    Your best bet really is to either use Modbus or an OPC Server that implements the native access to the PLC.
    Rolf  Kalbermatter
    Message Edited by rolfk on 03-12-2009 09:07 AM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Siemens S7 300 PLC and Labview Communicat​ion

    Hi,
    I am attempting to communicate between Labview 7 and a Siemens S7 300 (CPU 314) PLC. I would prefer the communication to be over Ethernet or RS 232. Could you help me out with this implementation and let me know what additional hardware/software I may require for doing this.
    Thanks,
    Shameek

    Shameek wrote:
    I am using a CP-343 communications processor to connect the S7 300 to industrial ethernet.
    Now can I commnicate directly from Labview to the PLC?
    I still havent figured out where the OPC server comes in and whether it is an option or a necessity.
    Using OPC is an option.
    Siemens has an the add-on ($$) library/FB  that includes code for enabling Modbus communication with S7 300 CPUs. I've never used it, but info is here.
    <snip>
    Our solution
    With its MODBUS function block (FB) and the CP343-1 and CP443-1 SIMATIC S7 communications processors, Siemens can supply a proven solution for the integration of SIMATIC automation systems into other system landscapes. This function block enables data to be exchanged easily between MODBUS-compatible devices from different manufacturers and SIMATIC S7 stations from S7-300 and S7-400 systems.
    </snip>
    =====================================================
    Fading out. " ... J. Arthur Rank on gong."

  • Siemens S7 300 PLC Labview Communication

    Hi.I am using a CP-343 communications processor
    to connect the S7 300 to industrial ethernet. Now can I commnicate
    directly from Labview to the PLC?We are plan to use ethernet communication (our TCP VI's). 
    Which type of command we need to ues. whether we need to form a MODBUS protocol command.
    Thanks
    Siva

    sivaramkumar wrote:
    Hi.I am using a CP-343 communications processor
    to connect the S7 300 to industrial ethernet. Now can I commnicate
    directly from Labview to the PLC?We are plan to use ethernet communication (our TCP VI's). 
    Which type of command we need to ues. whether we need to form a MODBUS protocol command.
    Siemens S7 supports all kinds of protocols. Some are built in from start and are usually Siemens specific protocols whose specs are not always easy to come by, others can be purchased and installed on the communication processor seperately such as Modbus. Once you have the Modbus library installed on your S7 you can simply use the Modbus VIs downloadable from the NI site to communicate with your S7 datablocks.
    It is a strict IO access meaning you can read and write IO registers and memory datablocks, but not interfere with the actual programm on the S7 in other ways.
    Using Modbus is simply and hard at the same time, since Modbus uses various datatypes with different address ranges that are mapped in some way to the items in the target hardware. This mapping can be tedious to work out correctly since the documentation of devices is sometimes quite a bit unclear about how exactly that has been done by the manufacturer.
    There are many other Ethernet protocols that are available or can be installed on a S7 such as Profibus Ethernet, EtherCat, Industrial Ethernet, etc. Most of these while technically possible to be implemented on top of the native TCP LabVIEW nodes are rather complicated and therefore anything but trivial to create a VI library for.
    Your best bet really is to either use Modbus or an OPC Server that implements the native access to the PLC.
    Rolf  Kalbermatter
    Message Edited by rolfk on 03-12-2009 09:07 AM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • CRIO communicating as PLC with NI-OPC-Server

    Hi there,
    i have the task to implement a communication between multiple cRIO's and the NI-OPC-Server. The NI-OPC-Server has to act as data handler for a complex frontend.
    I tried out the NI-OPC-Server and i was successful in communicating with the NI-OPC-Server as OPC-Client in Windows using an IO-Server and Shared Variables. But the task is to do this on a cRIO. I tried to open a data socket connection from a cRIO to the NI-OPC-Server using a specific URL using "DataSocket Select URL.vi". But as long i do not activate simulation in the NI-OPC-Server i get errors on opening the data socket connection. If i do activate the simulation, which is not the solution, i can write some data without error but the Quick Client of the NI-OPC-Server sees no changes for that data tag.
    I have the feeling i am not at a good way to get this working. Is there anybody having experiences with this? Is data socket a possible way at all? Is it possible at all? Do i need to implement a cRIO-OPC-driver?
    Thank you.
    Solved!
    Go to Solution.

    Hi,
    There's one pretty good tutorials and one webcast. Have you already study them?
    Connect LabVIEW to Any PLC Using OPC (Tutorial)
    http://www.ni.com/white-paper/7450/en
    Connect LabVIEW to Any PLC Using OPC (Webcast)
    http://zone.ni.com/wv/app/doc/p/id/wv-263
    Chers,
    Philip

  • Interfacing LabVIEW with SIEMENS s7-300 PLC

    Hi all,
    Im using LabVIEW 8.6 and DSC module I want to interface S7-300 SIEMENS PLC with LabVIEW. I've gone through the turorial on the NI site " Connect LabVIEW to any PLC". By following the tutorial when I am trying to create I/O server in the registred OPC servers window there is nothing what would be the reason. Also there is no specific information available about the hardware connection etc. Kindly help me through this or suggest some tutorial links. What about the PROFIBUS and MPI. I know the information i am giving is not specific and focused but I've tried to tell all of you to atleast understand what I want to do. Hope you people help. THANKS.
    Naqqash

    Hi,
    Lookout is our legacy OPC software that was phased out by the DSC module. You can read about both here: What is NI Lookout? and What is DSC?
    You can find a great introductory DSC tutorial here: Getting Started with the LabVIEW Datalogging and Supervisory Control Module. A couple other places to get started: NI Module Training (look for DSC)  and Connect LabVIEW to Any PLC Using OPC Webcast
    As for simulating your hardware, if you have a 3rd party simulator that will imitate your hardware, you might be able to fool DSC into thinking that there is actual hardware connected, but DSC does not include simulating capabilities itself. 
    Cheers, 
    Misha

  • Connecting cRIO with Siemens S7-300 using OPC UA

    Dear all,
    I am looking for an example program (labview and siemens S7) to create a connection between a cRIO and a Siemens S7-300 PLC.
    If an example program is not possible, some tips and tricks to set this up are also helpfull.
    thanks

    Hello Poema,
    I am aware of the different OPC Standards that exist and have worked both with OPC DA and OPC UA.
    The previous month I was even working on a demo that implements an OPC UA Server that appropriately taht automatically links the Shared Variable Engine variables to published items with appropriate quality statuses (eg. Open thermocouple detection.
    I would suggest you first create an OPC UA server that doesn't require certificates and that we first focus on making that use case work.
    This will be easier and afterwards you'll only have to add the certificates.
    Can you tell me how you are at this moment seeing/determining that the connection has been made?
    Do you have some more details on the "internal siemens driver" you are using?
    Personally I'm not so familiar with Siemens OPCs (have only used them via OPC DA).
    Therefore, I would like to ask you if you can refer me to a reference document concerning the "internal siemens driver" or configuration manager you are using (or can use) at your side.
    I'm actually looking for a document similar to this one for another manufacturer: 
    http://www.kepware.com/Support_Center/SupportDocuments/Help/opcuacm.pdf
    Kind Regards,
    Thierry C - Applications Engineering Specialist Northern European Region - National Instruments
    CLD, CTA
    If someone helped you, let them know. Mark as solved and/or give a kudo.

  • Which protocol is recommende​d to communicat​e between LabVIEW an the S7-300 PLC?

    Hello,
    I'd like to communicate between LabVIEW (CompactRIO) and the S7-300 PLC.
    Which is the protocol NI recommend to use?
    I read, that TCP/IP over OPC and profibus work fine. Maybe MPI or Modbus, too.
    But I would favor a cheaper solution like the communication directly over TCP/IP. The problem is in my opinion, that Siemens modified the TCP/IP protocol and the protocol itself is not public. I found an example library at ni.com but this was build by using reverse engineering. And I'm not sure, if such a library would work reliable.
    I know this topic is interesting for many people, but I could not find a general recommendation here in the forums.
    Regards

    I have direct experience using the NI OPC servers to talk to Siemens S7-300 PLCs, and it's by far the easiest way I've found to communicate.  There may be 'less expensive' options out of the box, but from purely a development standpoint, it's very fast and easy to get working.

  • Interfacing S7-300 PLC with OPC variable not having any value

    Hi, i am trying to interface a Seimens S7-300 PLC with LabVIEW with the MPI protocol. I followed the webcast "Connect to any PLC using LabVIEW". There are 2 problems that i face,
    1. There is a Timeout Dialog Box which ofcourse times out the connection to the PLC. This allows a max time of 30seconds. Can i increase the Time out in any way?
    2. When i create a variable as shown in the webcast, it does not have any value nor does it have a time stamp value as the variable in the webcast. I am uploading a picture here to make it clear. I wanted to know why does this happen? It does display the system variable values as being valid and also updates them.
    Thanks.
    LabVIEW 8.2,8.6,2009...still learning
    Attachments:
    bolen input error.JPG ‏106 KB

    Hi David,
    This is the webcast i am talking about
    http://zone.ni.com/wv/app/doc/p/id/wv-263
    I am using LabVIEW 8.6, NI OPC Servers to connect with an S7-300 PLC using the MPI protocol. Following the procedure outlined in the webcast:
    Opened OPC servers:
    1.Created a Channel.
    2.Cose the device driver.
    3. Set the serial communcations settings(Baudrate etc) according the configuration settings of the PLC.
     After doing step 3 i get a dialog box asking me to set the time out period of the PLC (which i set to 30 seconds i-e the max that was allowable). I also set the write attemps before failure(which i set to 8).
    4. Added a Device and gave it an arbitrary name.
    5. Chose the device model.
    6. Set the Device ID to 1.
    Than i added a tag. Gave the name Input, the address of the input and all(which was accepted by the OPCServer).
    After creating a tag when i open the OPC Client, all system variables are displayed as being valid and also get updated but the tag i created has no value and there is not updating taking place as indicated by the time stamp. I will change the tag and also see if i can upload a video of exactly what i am doing.
    Thanks for your reply.
    LabVIEW 8.2,8.6,2009...still learning

  • NI OPC server communication with B&R plc

    hi,
    I have a NI OPC server in my lab . I want to send the data from B&R plc to the OPC server. I have tried to search for a solution but could not find any.
    Kindly help me in establisihng a communication between the B&R plc and the OPC server.
    Regards

    Did you try installing the B&R PLC OPC server on a computer and then see if the NI OPC server can connect to it?  It might not be the most elegant soloution, but it might work.
    We were having problems with some siemens wincc software that would not connect to the Think&Do OPC server.  So I had to bring the Think&Do OPC tags into LabVIEW and then have LabVIEW broadcast the data so the Semens OPC software could see it.  I did not like doing it, but it worked.
    Other than that, maybe someone else will have more to offer.

  • Unable to access only Read Write addresses of AB Micrologix 1400 PLC using NI DSC and NI OPC server

    Hi,
    I have been using NI DSC and OPC servers (NI and Kepware) to communicate with Allen Bradley Micrologix 1400 PLC (1766-L32BXB). Recently at one  site I found that I could access Process values from the PLC correctly (Read Only tags) but could not access the Read Write Tags at all. The latter are addresses to which it should be possible to write Set (i.e., references) values from MMI or PC software. I am able to do so from the MMI not from the PC software. I get communication error message on the MMI and PC, mentioning the PLC address being accessed (e.g. N7:0).
    Support from the supplier is not available. Hence can anyone let me know if ladder logic could have been written to prevent PC software based access of Read/write addresses (N7:0 to 9 in this case), while permitting access to Read only addresses? Is the problem at the PLC end or OPC server end? Is there a way to get around this?
    Thanks in advance.

    The OPC Server cannot force Outputs so if th registers in question are the outputs of ladder rungs you cannot write to them via the server. The controller will accept the write from the server but will not execute the write. In some cases the server event log will post an error if it is the PLC. Do you get errors when you try to write and if so what are the posted error messages.
    Fred Loveless
    Kepware Technologies
    http://www.kepware.com

Maybe you are looking for

  • Error downloading the Application/Framework files: DMZ issues

    We have the sync servlet outside the DMZ. Users can do a sync of the data using this but when they want to download the WAR file (The Framework or Application) it doesnt let them do it. The workaround that our basis guy has come up with is to go the

  • Messages get lost between IE and AE (IDoc to SOAP - Async)

    Dear Experts, in a IDoc to SOAP (Async) scenario a message was not transferred. I could not see any error message in RWB or ABAP Monitoring. When I enter RWB, the column engine is "Integration Engine" and the status is "Successful". At the same time

  • RRI for Query

    Hi All, How can we see the underlying functionality for RRI queries. Here I am using an existing query in my company,after execution i can have the option of going to another report. I am not able to find how the two reports are conncted. My work is

  • New JavaDoc lookup tool

    There is an interesting "master index" to many JavaDoc projects - it lets you drill down to individual packages and classes, so you can get to virtually JavaDoc page, anywhere really quickly. The page says it is "a comprehensive index to the JavaDoc

  • How to reduce image size on account of disk space shortage?

    I import images from my camera to iPhoto on my MacBook. I want to reduce their size on import because hard disk space on MacBook is limited. Is there any smart way how to perform it? I have not found any presets on Import dialog to reduce size.