• 大小: 45.51MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-17
  • 语言: 其他
  • 标签: labvie  

资源简介

labview与西门子s7通信,直接对西门子db块进行操作

资源截图

代码片段和文件信息

/*=============================================================================|
|  PROJECT SNAP7                                                         1.4.0 |
|==============================================================================|
|  Copyright (C) 2013 2014 Davide Nardella                                    |
|  All rights reserved.                                                        |
|==============================================================================|
|  SNAP7 is free software: you can redistribute it and/or modify               |
|  it under the terms of the Lesser GNU General Public License as published by |
|  the Free Software Foundation either version 3 of the License or           |
|  (at your option) any later version.                                         |
|                                                                              |
|  It means that you can distribute your commercial software linked with       |
|  SNAP7 without the requirement to distribute the source code of your         |
|  application and without the requirement that your application be itself     |
|  distributed under LGPL.                                                     |
|                                                                              |
|  SNAP7 is distributed in the hope that it will be useful                    |
|  but WITHOUT ANY WARRANTY; without even the implied warranty of              |
|  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
|  Lesser GNU General Public License for more details.                         |
|                                                                              |
|  You should have received a copy of the GNU General Public License and a     |
|  copy of Lesser GNU General Public License along with Snap7.                 |
|  If not see  http://www.gnu.org/licenses/                                   |
|=============================================================================*/
#include 
#include 
#include “snap7.h“

#ifdef OS_WINDOWS
# define WIN32_LEAN_AND_MEAN
# include 
#endif

int cnt = 0;
    const int size = 256;
byte Buffer[size]; 
TS7Partner *Partner;

//------------------------------------------------------------------------------
// Usage syntax 
//------------------------------------------------------------------------------
static void Usage()
{
    printf(“Usage\n“);
    printf(“  APartner \n“);
    printf(“Where\n“);
    printf(“   is the address of the passive partner that we want to connect.\n“);
    printf(“Note\n“);
    printf(“- Local Address is meaningless\n“);
    printf(“- Both Local TSAP and Remote TSAP are set to 0x1002\n“);
    printf(“- You can create multiple active partner in the same\n“);
    printf(“  program or across different programs.\n“);
}
//--------------------------------------------------

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       8944  2015-06-14 18:32  snap7-full-1.4.0\snap7-full-1.4.0\build\bin\Legacy\win32\snap7.def

     文件     548211  2015-06-14 18:32  snap7-full-1.4.0\snap7-full-1.4.0\build\bin\Legacy\win32\snap7.dll

     文件     193046  2015-06-14 18:32  snap7-full-1.4.0\snap7-full-1.4.0\build\bin\Legacy\win32\snap7.lib

     文件       3147  2015-06-14 18:33  snap7-full-1.4.0\snap7-full-1.4.0\build\bin\Legacy\win64\snap7.def

     文件    1753707  2015-06-14 18:33  snap7-full-1.4.0\snap7-full-1.4.0\build\bin\Legacy\win64\snap7.dll

     文件      96946  2015-06-14 18:33  snap7-full-1.4.0\snap7-full-1.4.0\build\bin\Legacy\win64\snap7.lib

     文件        486  2014-01-02 16:35  snap7-full-1.4.0\snap7-full-1.4.0\build\bin\README.txt

     文件     222208  2015-06-14 17:28  snap7-full-1.4.0\snap7-full-1.4.0\build\bin\win32\snap7.dll

     文件      29004  2015-06-14 17:28  snap7-full-1.4.0\snap7-full-1.4.0\build\bin\win32\snap7.lib

     文件     264192  2015-06-14 17:29  snap7-full-1.4.0\snap7-full-1.4.0\build\bin\win64\snap7.dll

     文件      26188  2015-06-14 17:28  snap7-full-1.4.0\snap7-full-1.4.0\build\bin\win64\snap7.lib

     文件       4523  2014-04-16 17:04  snap7-full-1.4.0\snap7-full-1.4.0\build\osx\common.mk

     文件        173  2014-04-16 16:21  snap7-full-1.4.0\snap7-full-1.4.0\build\osx\i386_osx.mk

     文件        187  2013-12-29 02:44  snap7-full-1.4.0\snap7-full-1.4.0\build\osx\x86_64_osx.mk

     文件        298  2013-12-29 01:26  snap7-full-1.4.0\snap7-full-1.4.0\build\README.txt

     文件         79  2013-05-22 20:07  snap7-full-1.4.0\snap7-full-1.4.0\build\temp\README.txt

     文件        198  2015-06-14 17:28  snap7-full-1.4.0\snap7-full-1.4.0\build\temp\Win32\VS2013.tlog\VS2013.lastbuildstate

     文件        196  2015-06-14 17:29  snap7-full-1.4.0\snap7-full-1.4.0\build\temp\Win64\VS2013.tlog\VS2013.lastbuildstate

     文件        275  2013-08-19 01:16  snap7-full-1.4.0\snap7-full-1.4.0\build\unix\arm_v6_linux.mk

     文件        357  2013-08-19 01:14  snap7-full-1.4.0\snap7-full-1.4.0\build\unix\arm_v7_linux.mk

     文件       4519  2014-04-16 16:16  snap7-full-1.4.0\snap7-full-1.4.0\build\unix\common.mk

     文件        184  2013-07-17 20:39  snap7-full-1.4.0\snap7-full-1.4.0\build\unix\i386_bsd.mk

     文件        193  2014-04-16 16:16  snap7-full-1.4.0\snap7-full-1.4.0\build\unix\i386_linux.mk

     文件       4797  2014-12-17 16:08  snap7-full-1.4.0\snap7-full-1.4.0\build\unix\i386_solaris_cc.mk

     文件       4664  2014-12-17 16:05  snap7-full-1.4.0\snap7-full-1.4.0\build\unix\i386_solaris_gcc.mk

     文件       5066  2014-12-31 19:50  snap7-full-1.4.0\snap7-full-1.4.0\build\unix\mips_linux.mk

     文件        906  2014-12-31 18:45  snap7-full-1.4.0\snap7-full-1.4.0\build\unix\README.txt

     文件        188  2013-07-17 20:39  snap7-full-1.4.0\snap7-full-1.4.0\build\unix\x86_64_bsd.mk

     文件        198  2014-04-16 16:16  snap7-full-1.4.0\snap7-full-1.4.0\build\unix\x86_64_linux.mk

     文件       4894  2014-12-17 16:09  snap7-full-1.4.0\snap7-full-1.4.0\build\unix\x86_64_solaris_cc.mk

............此处省略1582个文件信息

评论

共有 条评论