From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SIEMENS PLC S7 1200 to LabVIEW communication

hi all...

 

Im new to this labview and work on some basic projects with labview..

Currently im working on a project with seimens plc.

 

    For that at first i want to communicate between seimens S7-1200 and Labview. So anyone can please help me in moving forward with this project.

Is there any example labview program or any parameters that i have to do in seimens plc side.

 

    Basically i need to get a communication between both S7-1200 and labview software.

 

 

 

 

Thanking You

Sudhin_sudh

Message 1 of 5
(17,449 Views)

Well, it is a long story we went through tis year 🙂

In our case it was even more complicated, because our platform was a real time system, so we could not use dlls made based on some other open source code (non LV). Even worse, in the end we had to totally abandon the Ethernet interface because there was even no company who could provide us a solution (we had a special configuration of a Siemens PLC, where we had a separate Ethernet card, and somehow non of the available apps were able to establish communication...).

 

My long journey is here: http://forums.ni.com/t5/LabVIEW/TCP-IP-access-to-Siemens-S7-from-RT-no-OPC/m-p/3318979

In the end we just started to use Profibus interfaces, and all is very easy now...

 

I imagine in your case you want to use LabVIEW under Windows, so I put here some links where you can get ideas how to establish communication using Ethernet interface (TCP/IP):

Free options:

http://snap7.sourceforge.net/

https://decibel.ni.com/content/docs/DOC-5467#/

 

Non-free option (you can have a trial period):

http://sine.ni.com/nips/cds/view/p/lang/en/nid/212973

 

EDIT: if you go in the "Snap7" way, here you can download the zip: https://sourceforge.net/projects/snap7/files/1.4.1/

Unzip it, and inside you will find a "LabVIEW" folder with LV example VIs...

0 Kudos
Message 2 of 5
(17,444 Views)

hi everyone...

                 I started to work on this project again with labview and s7-1200.I am purely new to this plc and i need to know the basic hardware configuration that are required in this communication.With my basic R&D i wanted to use modbus tcp protocol for this communication.I even tried with building shared variables according with help of this forum. But i was unsuccessful as it was showing some errors.

                  Can anyone help me the process that i should follow for this labview and s7-1200 through modbus tcp.In which i can read and write into plc from my labview software.

                 

 

Hoping for an positive response

sudhin sudh

 

 

0 Kudos
Message 3 of 5
(17,126 Views)

I have not worked with the S7-1200 but from the manual it supports UDP and TCP/IP connections.  I would use a UDP to communicate between your labview vi and the PLC.  Set up a send and receive. Insure to add spare words so you do not have to change data sizes for future.S7-1200 Coms.png

 

 

https://cache.industry.siemens.com/dl/files/465/36932465/att_106119/v1/s71200_system_manual_en-US_en...  

0 Kudos
Message 4 of 5
(17,113 Views)

I need help with reading database with snap7 from my Siemens PLC S7 1200.

 

Using example DBGet.vi, I get Error in DBGet function saying "CPU : Function not available"

I'm using S7 1200 with TIA portal, Labview 2017. 

From my Labview Computer (IP 10.0.2.10) cmd.exe I succesfully ping CPU that is on IP 10.0.2.1.

I also did setup in TIA Portal:

- Protection = Full Access

- DB Property-> disable optimized block access

- Connection Mechanism ->  Permit access with PUT/GET

 

0 Kudos
Message 5 of 5
(14,847 Views)