软件介绍:PC与西门子PLC通讯免费软件Libnodave

Introduction:

Libnodave is a free communication library for Siemens S7 300/400. It is free softwar, and provides a way to exchange data with Siemens PLCs of S7-200, 300 and 400 families. It has alse been successfully tested with a VIPA Speed7 CPU. Data exchange comprised all memory areas and variables you can access in your PLC programs, e.g. flags, data blocks, input and output image memory, timers and counters. Additionally, LIBNODAVE provides access to functions that are in the scope of programming software, e.g. reading diagnostic information, read program blocks from a PLC and write them to a PLC, start and stop a PLC.

LIBNODAVE is currently available for UNIX and Win32. It comes with precomiled libraries for LINUX and Windows. You may port it yourself on any system providing a C compiler.

Using the test programs

Libnodave comes with a set of test programs. They shall serve the follwing purposes:

Provide the user with a demostration of what Libnodave can do.

Provide a quick test for compatibility with user’s hardware and configuration.

Provide a source code example as a template for your own applications.

The debug output, obtained with debug (-d), provides valuable informationn in case Libnodave fails with some hardware.

The benchmark options let you measure the time needed for transfers of shor and long data blocks.

Just invoke the test programs without arguments. They will print a list of possible argumens and optons.

If invoked with the connection as the only argument, all test programs will read some data from the memory area of Flags (also known as Merkers). They try to read FD0,FD4,and FD8 as DWORDS and FD12 as real.

Depending on the contents of this memory, the results may or may no seem reasonalbe. The obtained values are just the same as if you would observe these variables in Step7 using the display formats signed, signed, signed and floating point.

The main purpose of this library is to read and write data from and to Siemens PLCs. To do so, you need to establish a connection to the PLC. First, you need to configure a serial port of your computer or establish a TCP connection. This connection is represented by the type _daveOSserialType, which contains file descriptors in case of Unix-like systems, handlers in case of windows and what other system supported in the future might use for this purpose. Use setport to initialize the members of a _daveOSserialType to something representing a configured serial connection:

Fds.rfd=openSocket(102, Ipaddress_of_CP);

Then do:

Fds.wfd=fds.rfd;

With the initialized _daveOSserialType, you will initialize a structure of type daveInterface, representing the physical connection to a PLC or a network of PLCs (e.g. like MPI).

di=daveNewInterface(fds,”IF1”,localMPI,daveProtoXXX, daveSpeedYYY);

With the resulting daveInterface structure, you can initialize an adapter, if one is used:

Res=daveInitAdapter(di);

While currently only MPI-adapters and IBH-NetLinks really need this initialization procedure, it is save to use daveInitAdapter() with any protocol type. If it has no meaning for the protocol used, it is mapped to a dummy procedure that returns allways successfully initializing your adapter,you can retrieve a list of reachable parters on an MPI network. The function takes the daveInterface structure and a pointer to a buffer of sufficient length as arguments. It returns the real length of the list. If the partners cannot be listed with the protocol used, it just return a length of .

listLength = daveListReachableParters(di, buf1);

After successfully initializing your adapter, you can establish a connection to a certain PLC on the network. To do so, you will first initialize a structure of type daveConnection, representing the logical connectiong to a single PLC .

dc = daveNewConnection(di,MPI_address, Rack, Slot);

With the resulting daveConnection structure, you need to really connect the PLC:

Res=daveConnectPLC(dc);

Once you have established a connection to your PLC, you can read and write values:

Res=daveReadBytes(dc,AREA, area_Number,start_address, length, buffer);

Res=daveWriteBytes(dc,AREA, area_Number,start_address, length,buffer);

PC与西门子PLC通讯免费软件Libnodave相关推荐

  1. jetson nano上编译与使用西门子PLC通讯库snap7

    文章目录 一.西门子snap7介绍 二.西门子S7通讯介绍 三.jetson nano编译snap7库 四.Qt Cmake导入snap7库 五.snap7主要函数说明 1.与PLC建立连接 2.读写 ...

  2. 上位机与PLC 通讯源码 上位机与三菱PLC,西门子PLC通讯 同时一起通讯,单独控制,三菱采用官方MX 通讯,支持三菱FX系列,

    上位机与PLC 通讯源码 上位机与三菱PLC,西门子PLC通讯 同时一起通讯,单独控制,三菱采用官方MX 通讯,支持三菱FX系列,A系列,Q系列,L系列,R系列,全系系列,各种串口和各种网口通讯,, ...

  3. 上位机与PLC 通讯源码 上位机与三菱PLC,西门子PLC通讯

    上位机与PLC 通讯源码 上位机与三菱PLC,西门子PLC通讯 同时一起通讯,单独控制,三菱采用官方MX 通讯,支持三菱FX系列,A系列,Q系列,L系列,R系列,全系系列,各种串口和各种网口通讯,, ...

  4. 上位机与PLC 通讯源码DEMO 上位机与三菱PLC,西门子PLC通讯 同时一起通讯,单独控制

    上位机与PLC 通讯源码DEMO 上位机与三菱PLC,西门子PLC通讯 同时一起通讯,单独控制,三菱采用官方MX 通讯,支持三菱FX系列,A系列,Q系列,L系列,R系列,全系系列,各种串口和各种网口通 ...

  5. python与西门子PLC通讯

    python与西门子PLC通讯 安装Python-snap7 win+R打开"运行",输入cmd,确定后,进入DOS命令行终端,输入下面的命令: pip install pytho ...

  6. C#与西门子plc通讯上位机 c#软件 工控软件

    C#与西门子plc通讯上位机 c#软件 工控软件 1.该程可以实现CSharp与西门子全系列plc(200,200smart,300,1200,1500)的以太网s7通讯,通讯传输快稳定. 2.该程序 ...

  7. 运用C#编程通过OPC方式实现PC机与西门子PLC通讯-同步通讯篇

    1. OPC服务介绍 西门子提供的最新软件:Simatic Net PC-Software CD 2005为各种组态软件的开发提供了一个统一的平台,它建立的PC站既为一些组态软件,如:WinCC.Pr ...

  8. 威纶和s7200通讯线_PLC通讯,西门子plc通讯知识汇总学习

    (一)西门子 200 plc 使用 MPI 协议与组态王进行通讯时需要哪些设置? 1)在运行组态王的机器上需要安装西门子公司提供的 STEP7 Microwin 3.2 的编程软件,我们的驱动需要调用 ...

  9. c#与汇川机器人通讯_C#与西门子PLC通讯

    S7Net 如下图,ip="192.168.0.5". 如下图,rack为0,slot为1. public Plc(CpuType cpu, string ip, short ra ...

最新文章

  1. 如何一键部署php应用,我们怎样来使用宝塔面板一键部署安装博客程序ZBlogPHP
  2. 【计算理论】计算复杂性 ( 小 O 记号 | 严格渐进上界 | 分析算法的时间复杂度 )
  3. 使用java底层实现邮件的发送(含测试,源码)
  4. 大数据WEB阶段 (十)Response、ServletConfig、ServletContext、资源跳转三种方式
  5. 一步一步写算法(之图的保存)
  6. 一次新生代民工工友切磋经历
  7. 通过Backtrack Linux 来加强你的安全防御
  8. “经历”重于“技术”
  9. (已更新)萤火商城V2.0开源版[uni-app端],轻量级前后端分离的电商系统,支持微信小程序 + H5+ 公众号 + APP
  10. 现代企业管理的12法宝(zt)
  11. 第三章(第一部分) 月夜猫の魅 友谊的决裂
  12. 基于MATLAB中的GUI设计的钢琴界面设计并能发声
  13. 下午又出去……还不是为自己办事儿……电脑最近也开始闹别扭 ◎◎
  14. 【5. Redis的高并发高可用】
  15. 为什么安装step7时要重启计算机,step7安装提示重启怎么解决
  16. 机器学习--银行营销方案
  17. VScode 主题和打字特效配置,让你的VScode活“”起来 [ 二 ]
  18. 石油公路工程都在用的光纤测试仪是什么型号
  19. 5G融合行业专网解决方案分析与研究
  20. 千亿市场赛道“长坡厚雪”,增长超预期的达达集团站稳了

热门文章

  1. 【电源设计】11变压器在开关电源中的应用
  2. R-squared居然是负数
  3. 队列-链表-C语言实现
  4. Android里的相对坐标
  5. 新装的mysql数据库默认密码是多少_数据库的设置及其初始密码
  6. mgo.v2无法连接MongoDB 5.0.x
  7. 阿里云ECS部署L2TP/IPSEC,访问服务器内网
  8. 下载 raywenderlich.com 上的 iOS/android/Unity 视频、源码
  9. CS231n课程笔记翻译9:卷积神经网络笔记
  10. 用python爬取前程无忧网大数据岗位信息并分析