S7-PLC SIM使用入门手册
- 格式:pdf
- 大小:275.69 KB
- 文档页数:12
一、引言PLC的用户程序设计好后,要用实际的PLC硬件来调试。
但以下情况则需要对程序进行仿真调试:①控制设备不在本地,设计者需对程序进行修改和调试;②程序设计好后,PLC硬件尚未购回;③在实际系统中进行某些调试有一定风险。
为了解决这些问题,一些PLC生产厂家提供了可代替PLC硬件调试的仿真软件,本文主要介绍西门子公司的S7一PLCSIM仿真软件。
二、S7-PLCSIM概述1、S7-PLCSIM的主要功能(1)仿真软件还可模拟对位存储器、外围输入变量区和外围输出变量区的操作,以及对存储在数据块中的数据(如DBl.DBX0.0或DBl.DBW0等)的读写。
(2)可实现定时器和计数器的监视和修改,通过程序使定时器自动运行或手动复位。
(3)可对S7-300和S7-400 PLC的用户程序进行离线仿真与调试,可访问模拟PLC的I/O存储器、累加器和寄存器。
通过在仿真运行窗口中改变输入变量的ON/OFF状态来控制程序的运行,并观察有关输出变量的状态来监视程序运行的结果。
(4)可在仿真PLC中使用中断组织块测试程序的特性,并记录一系列操作事件及回放记录,从而自动测试程序。
2、S7-PLCSIM的主要组成部分(1)仿真PLCS7-PLCSIM用仿真PLC来模拟实际PLC的运行,用户可通过视图对象来调试程序。
它提供的多种视图对象可实现对仿真PLC内的各种变量、计数器和定时器的监视与修改。
(2)视图对象①CPU视图对象开始新仿真时,将自动出现CPU视图对象,用户可用单选框来选择运行、停止和暂停工作方式;MRES按钮用来复位存储器、删除块和删除仿真PLC中的硬件设置。
LED指示灯“SF'’表示软硬件错误;“RUN”与“STOP”表示运行与停止状态;“DP”(分布式外设或远程I/O)指示PLC与分布式外设或远程I/O的通信状态;“DC”(直流电源)指示电源的通断情况。
②插入视图对象输入变量(I)、输出变量(Q)和位存储器(M)视图对象分别用于访问和监视相应的数据区,可以以位、二进制、十进制、十六进制、字符及字符串的形式访问。
SIMATIC工程工具S7-PLCSIM V16 在线帮助编程和操作手册Siemens AG Digital Industries Postfach 48 4890026 NÜRNBERG 文档订购号: A5E46238796-AA Ⓟ 11/2019 本公司保留更改的权利Copyright © Siemens AG 2019. 保留所有权利法律资讯警告提示系统为了您的人身安全以及避免财产损失,必须注意本手册中的提示。
人身安全的提示用一个警告三角表示,仅与财产损失有关的提示不带警告三角。
警告提示根据危险等级由高到低如下表示。
危险表示如果不采取相应的小心措施,将会导致死亡或者严重的人身伤害。
警告表示如果不采取相应的小心措施,可能导致死亡或者严重的人身伤害。
小心表示如果不采取相应的小心措施,可能导致轻微的人身伤害。
注意表示如果不采取相应的小心措施,可能导致财产损失。
当出现多个危险等级的情况下,每次总是使用最高等级的警告提示。
如果在某个警告提示中带有警告可能导致人身伤害的警告三角,则可能在该警告提示中另外还附带有可能导致财产损失的警告。
合格的专业人员本文件所属的产品/系统只允许由符合各项工作要求的合格人员进行操作。
其操作必须遵照各自附带的文件说明,特别是其中的安全及警告提示。
由于具备相关培训及经验,合格人员可以察觉本产品/系统的风险,并避免可能的危险。
按规定使用 Siemens 产品请注意下列说明:警告Siemens 产品只允许用于目录和相关技术文件中规定的使用情况。
如果要使用其他公司的产品和组件,必须得到 Siemens 推荐和允许。
正确的运输、储存、组装、装配、安装、调试、操作和维护是产品安全、正常运行的前提。
必须保证允许的环境条件。
必须注意相关文件中的提示。
商标所有带有标记符号 ® 的都是 Siemens AG 的注册商标。
本印刷品中的其他符号可能是一些其他商标。
SIMATICProcess Control System PCS 7 Configuration Symantec Endpoint Protection V14Commissioning Manual03/2018A5E44395521-AALegal informationWarning notice systemThis manual contains notices you have to observe in order to ensure your personal safety, as well as to preventdamage to property. The notices referring to your personal safety are highlighted in the manual by a safety alertsymbol, notices referring only to property damage have no safety alert symbol. These notices shown below aregraded according to the degree of danger.DANGERindicates that death or severe personal injuryWARNINGindicates that death or severe personal injury may result if proper precautions are not taken.CAUTIONindicates that minor personal injury can result if proper precautions are not taken.NOTICEindicates that property damage can result if proper precautions are not taken.If more than one degree of danger is present, the warning notice representing the highest degree of danger will beused. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to propertydamage.Qualified PersonnelThe product/system described in this documentation may be operated only by personnel qualified for the specifictask in accordance with the relevant documentation, in particular its warning notices and safety instructions. Qualifiedpersonnel are those who, based on their training and experience, are capable of identifying risks and avoidingpotential hazards when working with these products/systems.Proper use of Siemens productsNote the following:WARNINGSiemens products may only be used for the applications described in the catalog and in the relevant technicaldocumentation. If products and components from other manufacturers are used, these must be recommended orapproved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation andmaintenance are required to ensure that the products operate safely and without any problems. The permissibleambient conditions must be complied with. The information in the relevant documentation must be observed. TrademarksAll names identified by ® are registered trademarks of Siemens AG. The remaining trademarks in this publicationmay be trademarks whose use by third parties for their own purposes could violate the rights of the owner. Disclaimer of LiabilityWe have reviewed the contents of this publication to ensure consistency with the hardware and software described.Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the information inthis publication is reviewed regularly and any necessary corrections are included in subsequent editions.Siemens AGDivision Process Industries and DrivesPostfach 48 4890026 NÜRNBERGGERMANYA5E44395521-AAⓅ 05/2018 Subject to changeCopyright © Siemens AG 2018.All rights reservedTable of contents1Security information (5)2Preface (7)3Configuration (9)3.1Introduction (9)3.2Notice (9)3.3Overview of SEP modules and functions (10)3.4SEP modules and functions (11)3.4.1General information (11)3.4.2Virus and Spyware Protection (11)3.4.3Intrusion Prevention (13)3.4.4Host Integrity (13)3.4.5Application and Device Control (13)3.4.6LiveUpdate (13)3.4.7Network Application Monitoring (14)Configuration Symantec Endpoint Protection V14Commissioning Manual, 03/2018, A5E44395521-AA3Table of contentsConfiguration Symantec Endpoint Protection V14 4Commissioning Manual, 03/2018, A5E44395521-AASecurity information1 Siemens provides products and solutions with industrial security functions that support thesecure operation of plants, systems, machines, and networks.In order to protect plants, systems, machines and networks against cyber threats, it isnecessary to implement – and continuously maintain – a holistic, state-of-the-art industrialsecurity concept. Siemens’ products and solutions constitute one element of such a concept.Customers are responsible for preventing unauthorized access to their plants, systems,machines and networks. Such systems, machines and components should only be connectedto an enterprise network or the internet if and to the extent such a connection is necessaryand only when appropriate security measures (e.g. firewalls and/or network segmentation) arein place.For additional information on industrial security measures that may be implemented, pleasevisit:https:///industrialsecuritySiemens’ products and solutions undergo continuous development to make them more secure.Siemens strongly recommends that product updates are applied as soon as they are availableand that the latest product versions are used. Use of product versions that are no longersupported, and failure to apply the latest updates may increase customer’s exposure to cyberthreats.To stay informed about product updates, subscribe to the Siemens Industrial Security RSSFeed underhttps:///industrialsecurity.Configuration Symantec Endpoint Protection V14Commissioning Manual, 03/2018, A5E44395521-AA5Security informationConfiguration Symantec Endpoint Protection V14 6Commissioning Manual, 03/2018, A5E44395521-AAPreface2 This documentation describes the settings of Symantec Endpoint Protection (SEP) that needto be changed for use in an industrial plant.The configuration represents an extract of the settings from SEP which were used in thecompatibility test with PCS 7 and WinCC.Important information about this whitepaperNoteThe recommended settings for these virus scanners have been chosen to ensure that thereliable real-time operation of PCS 7 is not adversely affected by the virus scanner software.These recommendations describe the currently known, best-possible compromise betweenthe objective of maximizing the detection and neutralization of virus software and malware andguaranteeing a highly deterministic time behavior of the PCS 7 process control system in alloperating phases.If you choose different settings for the virus scanner, this could have negative effects on thereal-time behavior.Purpose of the documentationThis documentation describes the recommended settings for virus scanner software incombination with PCS 7 and WinCC following the virus scanner installation.Required knowledgeThis documentation is aimed at persons involved in the engineering, commissioning, andoperation of automated systems based on SIMATIC PCS 7 or WinCC. Knowledge ofadministration and IT techniques for Microsoft Windows operating systems is assumed.In addition, readers should be familiar with the PCS 7 & WinCC security concept.Additional information is available on the Internet at the following address:Security concept (https:///WW/view/en/60119725) Configuration Symantec Endpoint Protection V14Commissioning Manual, 03/2018, A5E44395521-AA7PrefaceScope of the documentationThis documentation applies to process control systems that are realized with the correspondingPCS 7 or WinCC product version.NoteNote that certain virus scanners are only approved for certain product versions. Additionalinformation is available on the Internet at the following address:Compatibility tool (https:///kompatool)Configuration Symantec Endpoint Protection V14 8Commissioning Manual, 03/2018, A5E44395521-AAConfiguration3 3.1IntroductionSymantec Endpoint Protection (SEP) activates additional functions going beyond thetraditional virus scanner. The following configurations refer to the centrally managed SEPvariant, which is configured using the SEP Manager. The use of a local, non-managedinstallation is allowed, but is not described. In addition, only an English installation is referredto. All the configurations described are deviations from the default configurations, i.e. anysettings not described are not changed.3.2NoticeThe following setting is essential for stable operation of PCS 7.Under "Clients->My Company->Policies->External Communication Settings:UncheckClient Submission Send anonymous data to Sy‐mantecUncheckClient Queries Allow Insight lookups for threaddetectionWhen this option is active, the virus scanner attempts to contact Symantec Server directly onthe Internet during each file scan. There is a significant delay if the virus scanner cannot reachthe server. This makes the stable operation of PCS 7 impossible.All other check boxes under Submission Settings should also be cleared so that no internalinformation, even if it is anonymous, is sent to Symantec. The other options do not have anegative effect on PCS 7, however.Client RestartClients should never be restarted automatically. You should disable an automatic restart intwo places.Under "Clients->My Company->Policies->General:Restart Settings Restart method No restartGenerate a new policy under Install Packages->Client Install Settings:Restart Settings Restart method No restartConfiguration Symantec Endpoint Protection V14Commissioning Manual, 03/2018, A5E44395521-AA93.3Overview of SEP modules and functions SEP has the following configurable modules that can be configured with policies (available in the SEP under "Policies"):●Virus and Spyware Protection ●Firewall ●Intrusion Prevention ●Application and Device Control ●Host Integrity ●LiveUpdate ●Exceptions Additional settings (available in the SEP Manager under Clients > Policies > Location- independent Policies and Settings):●Custom Intrusion Prevention ●System Lockdown ●Network Application Monitoring The following modules and settings are recommended and are tested for compatibility for use in a PCS 7 and WinCC environment:●Virus and Spyware Protection ●Intrusion Prevention ●Device Control ●Host Integrity (provisional)●LiveUpdate ●Network Application Monitoring The following modules and settings are not recommended and are not checked in the compatibility test:●Firewall – Only the Windows Firewall is released for use with PCS 7 and WinCC as this is configured automatically depending on the product installed.●Application Control – This involves computer-specific settings that cannot be checked.●Exceptions – This involves system-specific settings that cannot be checked.●Custom Intrusion Prevention – This involves plant-specific settings that cannot be checked.●System Lockdown – This involves computer-specific settings that cannot be checked.For this reason, no policies should be assigned for these modules and the settings should not be switched "On". Any use of modules and settings which are not recommended is the user's own responsibility.Configuration3.3 Overview of SEP modules and functionsConfiguration Symantec Endpoint Protection V1410Commissioning Manual, 03/2018, A5E44395521-AA3.4SEP modules and functions3.4.1General informationThe options for the policies which have to be configured have no locks next to them. Werecommend that you "close" all locks (by clicking on them). This guarantees that theconfiguration of the virus scan client cannot be changed locally.For the same reason we recommend that you, under Clients-> Policies-> Location-specificSettings-> Client User Interface Control Settings: Click Server Control and Customize andclear all the check boxes except for "Display the client" and "Display the notification area icon".3.4.2Virus and Spyware ProtectionThe following configurations relate to a newly created Default Policy.Windows Settings-> ScheduledScans-> Scans->Administrator-De‐fined ScansDaily Scheduled Scan DeleteWindows Settings-> ProtectionTechnology-> Auto-Protect-> Ac‐tions-> Actions (for "Malicious" and"Security Risks")First action Leave alone (log only)Windows Settings-> ProtectionTechnology-> Auto-Protect-> Ac‐tions-> RemediationTerminate processes automatically UncheckWindows Settings-> ProtectionTechnology-> Auto-Protect-> Ac‐tions-> RemediationStop services automatically UncheckWindows Settings-> Protection Technology-> Auto-Protect-> Noti‐fications-> Notifications Display the Auto-Protect result dialogon the infected computerUncheckWindows Settings-> Protection Technology-> Download Protec‐tion-> Download Insight Enable Download Insight to detect po‐tential risk in downloaded files basedon file reputationUncheckWindows Settings-> ProtectionTechnology-> Download Protec‐tion-> Actions-> Malicious filesFirst action Leave alone (log only)Windows Settings-> ProtectionTechnology-> Download Protec‐tion-> Actions-> Unproven filesSpecify action for unproven files Leave alone (log only)Windows Settings-> Protection Technology-> Download Protec‐tion-> Notifications-> Notifications Display a notification message on theinfected computerUncheckWindows Settings-> ProtectionTechnology-> SONAR-> SONARSettingsEnable SONAR UncheckWindows Settings-> Email Scans-> Internet Email Auto-Protect->Scan DetailsEnable Internet Email Auto-Protect UncheckWindows Settings-> Email Scans-> Microsoft Outlook Auto-Protect-> Scan Details Enable Microsoft Outlook Email Auto-ProtectUncheckWindows Settings-> Email Scans-> Lotus Notes Email Auto-Protect-> Scan Details Enable Lotus Notes Email Auto-Pro‐tectUncheckWindows Settings-> Advanced Op‐tions-> Global Scan OptionsDisplay notifications about detections UncheckWindows Settings-> Advanced Op‐tions-> Quarantine-> General-> When New Virus Definitions Arrive Specify how client computers handleitems in the QuarantineDo NothingWindows Settings-> Advanced Op‐tions-> Quarantine-> General-> Quarantined Items Allow client computers to manuallysubmit quarantined items…UncheckWindows Settings-> Advanced Op‐tions-> Quarantine-> Cleanup-> Repaired Files Enable automatic deleting of backupfilesUncheckWindows Settings-> Advanced Op‐tions-> Quarantine-> Cleanup-> Backup Files Enable automatic deleting of repairedfilesUncheckWindows Settings-> Advanced Op‐tions-> Quarantine-> Cleanup-> Quarantined Files Enable automatic deleting of quaran‐tined files that could not be repairedUncheckWindows Settings-> Advanced Op‐tions-> Miscellaneous-> Notifica‐tions-> Notifications Display error messages with a URL toa solutionUncheck3.4.3Intrusion PreventionThe following configurations relate to a newly created Default Policy.No changes required.3.4.4Host IntegrityUsing "Host Integrity" you can monitor the configuration and the behavior of computers. Thismonitoring has to be configured specifically for the plant. Care should be taken to ensure thatno dialog boxes or messages appear on the local client.3.4.5Application and Device ControlThe following configurations relate to a newly created Default Policy.The recommendation is only to use Device Control, in order to prevent the use of USB devicesfor example.All check boxes should be cleared under "Application Control".3.4.6LiveUpdateThe following configurations relate to a newly created Default Policy.The settings for reaching the Symantec Update-Server on the internet or a higher-level updateserver must be adapted to the relevant network topology.Windows Settings-> Schedule-> Live‐Update SchedulingEnable LiveUpdate Scheduling UncheckWindows Settings-> Advanced Set‐tings-> User SettingsAllow the user to manually launch LiveUpdate UncheckWindows Settings-> Advanced Set‐tings-> User Settings Allow the user to modify HTTP, HTTPS, or FTPproxy settings for LiveUpdateUncheck3.4.7Network Application MonitoringThis setting should only be used by administrators with sound network and security knowledgeand in systems that have their own security administration.The setting "Network Application Monitoring" is under "Clients-> My Company-> Policies->Location-independent Policies and Settings-> Network Application Monitoring".The inheritance settings have to be changed here, depending on the company and networktopology.Network Application Monitoring Enable network application monitoring CheckNetwork Application Monitoring When an application change is detected Allow and Log。
西门子PLC入门基础教程1、PLC基本概念可编程控制器(Programmable Controller)是计算机家族中的一员,是为工业控制而设计制造的。
早期的可编程控制器称作可编程逻辑控制器(Programmable Logic Controller),简称 PLC,它主要用来代替继电器实现逻辑控制。
随着技术的发展,这种装置的功能已经大大超过了逻辑控制的范围,因此,今天这种装置称作可编程控制器,简称PC。
但是为了避免与个人计算机(Personal Computer)的简称混淆,所以将可编程控制器简称PLC。
2、PLC的基本结构PLC实质是一种专用于工业控制的计算机,其硬件结构基本上与微型计算机相同。
A、中央处理器(CPU)中央处理器(CPU)是PLC的控制中枢。
他按照PLC系统成程序赋予的功能接收并存储从编程器键入的用户程序和数据;检查电源、存储器、I/O以及警戒定时器的状态,并能诊断用户程序中的语法错误。
当PLC投入运行时,首先他以扫描的方式接受现场各输入装置的状态和数据,并分别存入I/O映象区,然后从用户程序存储器中逐条读取用户程序,经过命令解释后,按指令的规定执行逻辑或数字运算的结果送入I/O映象区或数字寄存器内。
等所有的用户程序执行完毕之后,最后将I/O映象区的各输出状态或输出寄存器内的数据传送到相应的输出装置,如此循环运行,直到停止运行。
为了进一步提高PLC的可靠性,近年来对大型PLC还采用双CPU构成冗余系统,或采用三CPU的表决式系统。
这样即使某个CPU出现故障,整个系统仍能正常运行。
B、存储器存储系统程序的存储器称为系统存储器。
存储应用软件的存储器称为用户存储器。
{(一) PLC常用的存储器类型1. RAM (Random Assess Memory)这是一种读/写存储器(随机存储器),其存取速度最快,由锂电池支持。
2. EPROM (Erasable Programmable Read Only Memory)这是一种可擦除的只读存储器。
使用入门STEP7--Micro/WIN软件使您能够很容易地对S7--200进行编程。
通过一个简单例子程序的几个简短步骤,您将学会如何在S7--200中连接、编程和运行程序。
为了完成这个例子程序,您需要PPI多主站电缆、S7--200CPU和能运行STEP7--Micro/WIN软件的编程设备。
本章内容:................................................................连接S7--200CPU8................................................................创建一个例子程序10 ...................................................................下载例子程序14...........................................................将S7--200转入运行模式14S7-200可编程控制器系统手册连接S7--200CPU连接S7--200十分容易。
在本例中,您只需要给S7--200CPU供电,然后在编程设备与S7--200CPU 之间连上通讯电缆即可。
给S7--200CPU供电第一个步骤就是要给S7--200的CPU供电。
图2-1给出了直流供电和交流供电两种CPU模块的接线方式。
在安装和拆除任何电气设备之前,必须确认该设备的电源已断开。
在安装或拆除S7--200之前,必须遵守相应的安全防护规范,并务必将其电源断开。
警告在带电情况下对S7--200及相关设备进行安装或接线有可能造成电击或者操作设备误动作。
在安装或拆卸过程中,如果没有切断S7--200及相关设备的供电,有可能导致死亡或者严重的人身伤害和设备损坏。
必须遵循适当的安全防护规范,并确认S7--200的电源已断开。
西门子S7-200系列PLC自学手册 陈忠平周少华侯玉宝李锐敏编著人民邮电出版社北京图书在版编目(CIP)数据西门子S7-200系列PLC自学手册/陈忠平等编著.—北京:人民邮电出版社,2008.8ISBN 978-7-115-18141-1Ⅰ.西…Ⅱ.陈…Ⅲ.可编程序控制器—技术手册Ⅳ.TP332.3-62中国版本图书馆CIP数据核字(2008)第071204号内容提要本书从实际工程应用出发,以国内广泛使用的德国西门子S7-200系列PLC为对象,讲解PLC的基础与实际应用等方面的内容。
本书分为基础篇和实践篇。
其中基础篇以西门子公司的S7-200系列为例,介绍了PLC的结构配置、工作原理、指令系统、编程方法等内容;并在此基础上介绍了PLC控制系统的设计原则、设计步骤、硬件设计、软件设计等。
实践篇以工程实践为主线,通过实例和相关源程序介绍了PLC在电动机基本控制电路中的应用、利用PLC改造传统机床、PLC小系统的设计和PLC在工程中的设计与应用等内容。
本书语言通俗易懂,实例的实用性和针对性强。
本书既可作为电气控制领域技术人员的自学教材,也可作为高职高专院校、成人高校、本科院校的电气工程、自动化、机电一体化、计算机应用等专业的参考书。
西门子S7-200系列PLC自学手册♦编著陈忠平周少华侯玉宝李锐敏责任编辑张伟♦人民邮电出版社出版发行北京市崇文区夕照寺街14号邮编 100061 电子函件 315@网址 北京鑫正大印刷有限公司印刷♦开本:787×1092 1/16印张:20.75字数:515千字2008年8月第1版印数:1 – 4 000册2008年8月北京第1次印刷ISBN 978-7-115-18141-1/TN定价:36.00元读者服务热线:(010)67129258 印装质量热线:(010)67129223反盗版热线:(010)67171154前言随着科学技术的发展,电气控制技术在各领域,特别是在自动控制领域取得了长足的发展,有了越来越多的应用。
S7-PLCSIM使用入门Getting Started of S7-PLCSIM摘要本文档主要用于讨论以下相关问题: S7-PLCSIM工具软件的基本信息S7-PLCSIM工具软件的简单使用 关键词Step7;S7-PLCSIMKey WordsStep7;S7-PLCSIM目录S7-PLCSIM使用入门 (1)1.前言 (4)2.软件的基本信息 (4)2.1.S7-PLCSIM简介 (4)2.2.S7-PLCSIM与真实PLC的差别: (4)2.2.1.S7-PLCSIM安装与使用: (5)2.3.S7-PLCSIM软件兼容性 (6)3.S7-PLCSIM的使用 (6)3.1.S7-PLCSIM特性 (6)3.2.S7-PLCSIM调用 (7)3.3.S7-PLCSIM简单示例 (7)3.3.1.S7-PLCSIM界面: (7)3.3.2.S7-PLCSIM菜单 (8)3.4.S7-PLCSIM的常见问题 (10)3.4.1.问题:S7-PLCSIM与在线连接的优先级 (10)3.4.2.问题:S7-PLCSIM与WinLC的区别 (11)3.4.3.问题:无法调用OB40 (11)3.4.4.问题:S7-PLCSIM仿真通信程序 (11)3.4.5.问题:S7-PLCSIM是否可以仿真定时器或定时中断功能 (11)3.4.6.问题:项目下载后,S7-PLCSIM 的SF点亮 (11)4.附录-推荐网址 (12)4.1.西门子自动化与驱动产品的在线技术支持 (12)重要提示:本文为技术交流文档,不能作为订货、选型等重要事宜的唯一依据,建议您参考Siemens的标准产品样本和技术手册进行产品的选型和订货。
1. 前言本章节可以作为 S7-PLCSIM软件的使用参考资料,希望读者通过对本章的阅读,能够更快更好地学习S7-PLCSIM软件的使用。
西门子提供了S7-PLCSIM软件的详尽手册,在安装S7-PLCSIM 软件包后,通过点击Windows菜单 开始->Simatic->Documentation->English可以阅读到名称为“S7-PLCSIM - Testing Your S7-CPU Programs - manual”的PDF手册。
一切关于S7-PLCSIM使用的问题请以此手册为准。
相关手册地址连接:S7-300和S7- 400的梯形图 (LAD) 编程/CN/view/zh/18654395S7-300 和S7-400 的语句表 (STL) 编程/CN/view/zh/18653496S7-300 和S7-400 的功能块图 (FBD) 编程/CN/view/zh/18652644使用STEP 7 V5.3 编程/CN/view/zh/18652056S7-PLCSIM for SIMATIC S7/CN/view/zh/11390712. 软件的基本信息2.1. S7-PLCSIM简介使用S7-PLCSIM具有以下优点:在PG/PC上进行不依赖于硬件的S7程序测试在程序开发早期消除错误降低开发成本,加速开发进程,提高程序质量适用于 LAD, FBD, STL, S7-GRAPH, S7-HiGraph,S7-SCL, CFC, S7-PDIAG, WinCC (本地安装)2.2. S7-PLCSIM与真实PLC的差别:S7-PLCSIM 并不能完全代替真实的PLC, 它与真实的硬件PLC有着如下的差别:当对S7-PLCSIM进行“STOP”操作后,程序再开始时,从中断处开始执行当对S7-PLCSIM进行“STOP”操作时,不影响输出状态当在子窗口修改变量时,其修改立刻有效,而不会等到下个周期你可以手动修改或复位定时器的值可以实现单周期操作模式你可以触发中断OB块对过程映像区的修改立刻生效不支持所有的诊断信息,例如EEPROM错误不支持多CPU模式S7-PLCSIM 提供高档 CPU 才拥有的系统资源(例如定时器范围为 T0-T2047, M 范围为16KB), 所以当使用S7-PLCSIM 模拟通过的程序(假设使用了定时器 T2000),可能会无法下载到低档CPU上运行(例如CPU315-2AG10-0AB0定时器范围为T0-T255,)。
不支持FM功能模块不支持通信功能S7-PLCSIM类似于400有4个累加器,所以不同于仅有2个累加器的300CPU对于调用以下块,S7-PLCSIM 执行空操作:•SFB12, SFB13, SFB14, SFB15, SFB16, SFB19, SFB20, SFB21, SFB22 , SFB23, SFB41, SFB42, SFB43, SFB44, SFB46, SFB47, SFB48, SFB49, SFB60,SFB61,SFB62, SFB63, SFB64, and SFB65•SFC7, SFC11, SFC12, SFC25, SFC35, SFC36, SFC37, SFC38, SFC48, SFC60, SFC61, SFC62, SFC65, SFC66, SFC67, SFC68, SFC69, SFC72, SFC73,SFC74,SFC81, SFC82, SFC83, SFC84, SFC87, SFC102, SFC103, SFC105,SFC106,SFC107, SFC108, SFC126 and SFC127•OB55, OB56,OB57, OB61, OB62, OB63,OB64, OB81, OB84, OB87, OB88 and OB90 关于S7-PLCSIM与真实PLC 的详细差异,请参考以下地址链接:/CN/view/zh/11610958特别提示:此问题是每个S7-PLCSIM使用者都会关心的问题,使用者务必要牢记以上的差别。
2.2.1. S7-PLCSIM安装与使用:STEP7标准版并不包括S7-PLCSIM软件包及授权,需单独购买,STEP7 Professional 版包括了S7-PLCSIIM的软件包及授权,安装即可。
在菜单Options中,可以激活S7-PLCSIM,此时再进行上传/下载/监控等操作就是针对S7-PLCSIM了,而不会对真实PLC进行操作(不论PLC是否联机)。
图2-1S7-PLCSIM 调用2.3. S7-PLCSIM软件兼容性不同S7-PLCSIM 软件版本与STEP7及操作系统之间的兼容性:图中的 X 表示兼容,- 表示不兼容图2-2S7-PLCSIM 软件兼容性3. S7-PLCSIM的使用3.1. S7-PLCSIM特性S7-PLCSIM 可以模拟一个S7控制器,并且具备以下资源:内存区域描述定时器 T0-T2047M 存储器 131,072 BIT(16K BYTE)I/O地址范围 131,072 BIT(16K BYTE)过程映像区(可设置,最大131,072 BIT(16K BYTE)每个扫描周期更新)预设值:8192 BIT(1024 BYTE)最大64K BYTE本地数据区(可设置)预设值:32K BYTE)逻辑块和数据块2048 FB/FC, 4095 DB除SFB12, SFB13, SFB14, SFB15, SFB16, SFB19, SFB20, SFB21, SFB22 ,SFB23, SFB41, SFB42, SFB43, SFB44, SFB46, SFB47, SFB48, SFB49,SFB60,SFB61, SFB62, SFB63, SFB64, SFB65 以外的SFBSFB除SFC7, SFC11, SFC12, SFC25, SFC35, SFC36, SFC37, SFC38, SFC48,SFC60, SFC61, SFC62, SFC65, SFC66, SFC67, SFC68, SFC69, SFC72,SFC73,SFC74, SFC81, SFC82, SFC83, SFC84, SFC87, SFC102, SFC103,SFC105,SFC106, SFC107, SFC108, SFC126, SFC127 以外的SFCSFCOB 除OB55, OB56,OB57, OB61, OB62, OB63,OB64, OB81, OB84, OB87, OB88 and OB90以外的OB另外,S7-PLCSIM 还具备以下特性:•可以插入视图来访问:PLC的输入/ 输出/中间寄存器/定时器/计数器/数据块,支持符号地址访问方式•可以使定时器自动运行或手动控制它们,可以分别或统一复位定时器•可以更改CPU操作模式 (STOP, RUN, RUN-P)。
并且S7-PLCSIM 提供了暂停模式,用户可停止程序的执行,而不影响仿真CPU中的状态•S7-PLCSIM 提供了单周期扫描模式,可以方便调试•可以使用中断 OB 来测试程序逻辑•可以记录一系列事件(操作输入/输出/M存储器/定时器),并且可以回放记录的事件,可以用于自动程序测试•可以使用所有的 STEP 7 工具来监视和调试S7-PLCSIM所仿真的PLC(而不需要实际的硬件) 3.2. S7-PLCSIM调用可以通过STEP7菜单Options-> Simulate Modules,激活S7-PLCSIM;或者通过点击工具栏中的图标,来激活S7-PLCSIM。
3.3. S7-PLCSIM简单示例3.3.1. S7-PLCSIM界面:下图为S7-PLCSIM工作界面,图3-1: S7-PLCSIM 视图3.3.2. S7-PLCSIM菜单1.File菜单:用户可以通过S7-PLCSIM菜单File > Save PLC As, 将当前模拟的PLC存储为一个文件,下次使用时可以通过File > Open PLC,直接打开此文件,而不需要下载过程,方便调试。
对于S7-PLCSIM V5.4版本,可以在此设置多种下载方式,例如,MPI, DP, Ethernet。
2.View菜单:用户可以通过View > Accumulators/Block Registers/Stacks来查看PLC内部的累加器/地址寄存器/状态字/堆栈资源3.Insert菜单:用户可以通过Insert >Input Variable插入变量(输入/ 输出/中间寄存器/定时器/计数器/数据块)方式来模拟各种工况。
4.PLC菜单:用户可以通过PLC 菜单模拟真实PLC的上电/断电,内存复位操作,以及修改PLC的MPI地址(S7-PLCSIM V5.4版本以下)。