11-15-2016 01:15 AM
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
11-15-2016
01:27 AM
- last edited on
04-08-2025
01:56 PM
by
Content Cleaner
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:
https://forums.ni.com/t5/Example-Code/S7-PLC-TCP-IP-Protocol-Reference-Example/ta-p/3492191
Non-free option (you can have a trial period):
https://www.ni.com/en/support/downloads/tools-network/download.sp7-toolkit-for-labview.html
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...
03-20-2017 11:55 PM
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
03-21-2017 06:36 AM
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.
09-18-2018 03:34 AM - edited 09-18-2018 03:35 AM
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
04-18-2025 02:48 PM
Very old post, but I'll add some information here to help the next guy...
I tried out Snap7 and also got the same error "CPU : Function not available" when trying to use the DBGet.vi example. Digging in, this example uses the library function CliDBGet.vi. Maybe this worked on older S7 PLCs, but it doesn't now on the new S7-1200 PLCs. Once I changed the library call to the CliDBRead.vi function, everything started working as expected. CliDBWrite.vi was the other complementary function that worked for me (the DBFill.vi example did not work).