实例介绍
本文是倍福控制器的开发软件TwinCat3的入门教材,对于初次使用倍福控制器的技术人员可以有很好的指导作用
第十三章介绍了当今流行的 OPC UA标准在 Twin Cat3中的应用,分别介绍 PLC中的变量,0task中的变量以及C++中的变量作为 OPC UA server的案例,以 及如何在 TwinCat3配置 client的方法,通过几个案例学习不同1PC之间利用oPC UA如何进行通信。 第十四章介绍了高速实时以太网一- Ethercat,对 Ethercat基础性能和网络 错误信息诊断进行了介绍,同时也讲解了如何在工控机上手动安装 EthercaT驱 动的步骤 本书所有的内容都会不间断更新,如果想获取更新的教材可以通过访问FTP 获取到,当然木书所有配套的案例程序也会在此FTP中供所有读者免费获取 FTP ttl ftp: //ftp beckhoff. com. cn/Twin CAT3/TC3 training/ 欢迎对本书的结构、内容提出意见和建议,请发邮件至: y.yang@beckhoff.com.cn 最后感谢李诗语对第四章部分内容的编写,吴静雯对第六章的编辑,张立文 对第七章的编写,江星睿对第八章的编辑,梁霄对第十二章的编写,以及周耀纲 对全书内容的审核。 杨煜敏 2015年12月1日 目录 Twincat3安装 曹看翻 5 1. Twincat3软件概述及安装. 二、 TwinCAt3的授权激活… 1.试用版授权激活… 2.|PcC/EPC中的完整版授权激活 12 3. Dongle的使用与授杖的激活… 16 4.申请授权报错汇总 21 TwinCAt3扫描|o变量连接 丰非着·。着看非 ∴23 1.连接目标控制器 23 2.扫描|0以及变量连接∴… 27 四、 Twincat3编程语言的EC61131-3标准 9 1.|EC611313的发展和优势. 2.|EC611313的内容 39 五、 TwinCAT3PLC简单程序编写与调试 1.PLC简单程序编写… ∴49 2.PLC程序调试…156 六、 TwinCAt3 PLC HM可视化编程 60 1.可视化项目简介. 60 2 TwinCAt3 PLC HM在XP和WN7系统中的全屏显示方法… 87 3在CE操作系统上的全屏显示方法 4 Twincat3 Recipe功能的实现 98 TwinCat3HM用户管理. 105 6 TwinCAt3 HMI-Web使用方法 ..:.:::::::: 109 七、运动控制介绍. 115 1. TwinCAT NC PTP系统介绍… 115 2. TwinCAT NC PTP硬件配置…… 117 3. PLC Control编程控制电机.…. 129 4.电子凸轮衣功能. 146 八、 TwinCAt3 Scope view的使用. 1. TwinCAt3- scope view的加载和简单使用 157 TwinCAT3 Scope view的 reporting功能 .191 Twincat3 cope view的 cursors功能… :.a::::::: 196 4. TwinCat3- scope view的 trigger功能 .198 TwinCAT 3-Scope View H Saving and Exporting data........207 九、 TwinCat3库管理…… 21 1. TwinCAt3中的库管理 211 2. Twincat3中新建和安装自己创建的库… 215 十、 TwincAt3源代码管理 220 1. TwincAt3源代码管理…… 220 2. TwinCAt3源代码保存… ..223 TwinCat3多版木切换 233 TwinCAT3 Project Compare 235 TwinCat2项目到 Twincat3转换… 240 1.库文件转换 240 2.项目转换…… aa:::::::::::.aaaa:a::::::::aa.aaa: 40000:::::.:aaa:aa.::::::::::: 243 3.单独转换程序文件 248 十二、 Twin SaFE安仝模块使用.. ∴…250 实验设备介绍 250 2.软件设置 250 软件调试 268 实验现象 269 5.常见问题解答……… 270 十 OPC UA使用 .272 1. Function的安装 272 2. PLC runtime如何作为 OPC UA server…..73 3.对于|0task中变量进行 OPC UA通信… 279 4.如何在C++变量进行 OPC UA通信 281 十四、 Ethercat性能介绍及诊断… 284 1. Ethercat性能介绍及诊断…284 Ethercat驱动安装步骤 ·““ 294 4 Twin CAT3安装 1. Twincat3软件概述及安装 Twin cat3F山版本分XAR和XAE两部分 XAE: eXtended Automation Engineering ⅩAR: eXtended automation runtime。 ⅩAE是毕于 isual studio作为开发环境,进行多种语言的编程和硬件组态 ⅩAR是实时运行环境,对π winCat模块加载、执行、管理、实时运行与调用。 此例程是基于WN7系统进行 TwinCat3的安装。4020版本的 Twin cat3自带 VS2013 Shello twincat34020版本可以支持Ws2015并且支持WN10系统 这里我们就介绍如何安装 TwinCat34020F版本和 infosys。 11 Twin Cat3F|版安装步骤(本例以WES732位系统为例) (1)首先安装 Twin Cat3F叫版本,安装包可以从 beckhoff官方网站进行下载。 登录以下链接 http://www.beckhoff.com 登录之后在 Download/ Software/ Twin Cat3/ TElxxx Engineering目录下找到 Twin Cat31- eXtended Automation Engineering(XAE)文件夹中的安装包 TC3. 1-Full-Setup. 3.1.4020.0 6 TC31-Full-Setup. 3.1.4020.0 2016/7/510:48应用程序 550447KB (2)双击打开 Twincat3F文件安装包进行安装。 TTwinCAT3-Versicn:-40200-Se: Lp Welcome to the installshield wizard for Beckhoff TwinCAT 3.1(Build 4020) Dlo wiro license agreement carefully BECKHOFF The Ins: allsHield(R; Weard wll install Bedhcff TwinCAT 3.1 u4020 Scope nf this software set out in he Lcense Certiticate ("Licensed sofware" sunec to the and conditions of this Software Licanse Agreement AGreement"). Software (Censer Dociimentaton') The Licensed Sottware and the Licensed WARNING: This progam is probcctod by copyright law and Dccumertotion are joint y referred te as"Licensed Material". Any dota (e. g filas, data base materials) which s provided by Lienor in cornection won the ucensec Scftygre or the Licensec Dccunentatin s glao part o1 the Licensed Materisl Prnt BECKHOFF oId not accept the terms ir te icense agreenent <Dock Next>Carcel <EN>□cana (3)这里可以选 complete即可。 5 Please eter your s BECKHOFF User None aroanzabon: Beckhoff Automation installshield <BN>□cnd AT:. Version 3. 1 4020, 0-Setup (4)点击 natal|进行安装,安装好后 dooe Ue setup type dnd, best suits your necs BEKH0FF选 择Yes重启 Please selec: a setup typ CUstom fealu ts yuu wail i sldleu c u were Lhe mmendec for advanced users Installshield <EakN:>□ Cancel TwinCAT3- ver 1,4020.0- Setup E回 he veatd is reany to baoh installa BECKHOFF Beckhoff TwinCAT 3.1(Build 4020) o progr am features you selected are being inst BECKHOFF the Instalsheld Wizard instal Eeckof TwinCAT 3.1 If you want to review or change any of your installa ion settings, cick Eack, Click Cance to 得微被 may take seyeral minutes exit the vizard Irstalinu Microsoft NET Framework 4.5.1 F Installshield Installshield L <Back Install Can:el <BecK L Nex.> Cancel W TwinCAT 3-Versinn 31.4020.0-Set Installshield wizard completed The IrstallshisH Wizard has successf uly installed Be TwinCAT 3, Buld 4020), Clok, Irish bo exit the wizar 15 Beckhoff Twin CAT 3.1(Build 4020)Installer Information 83 You must restart your system for the configuration changes made to Beckhoff Twin CAT 3. 1(Build 4020) to take effect. Click Yes to restart now or No if you plan a show the Window BECKHOFF Yes c Back Chih 1 TwinCAT 3 Information System-Instalt Shield Wizard (5)最后安装帮助文档,点击 Welcome to the Installshield wizard for TwinCAT 3 Information System e TC3-InfoSysexe The Installshield) Wizard will instal TwinCAT 3 Informaton System on your computer. To continue, dick Next WARNING: The program is protected by copyright law and nternatonal treate Twin CAT 3 Information System- InstallShield Wizard Select the language for the instalation from the choices below eNgish (united states) Cancel Twin CAT 3 Information System. InstallShield Wizard y TwinCAT 3 Infornation System-InstalShield Wizard Customer Information Setup Type Please enter your information choose the setup type that best suits your needs User Name: Pease select a setup type. feaures will be stalled. (Requires the most dsk Choose which program features you want instaled and where they Insta Shield Installshield <Bac Next>Cancel <Bas Next>Cance (6)到了这一步我们可以直接选 complete并且下一步 (7)也可以选择 custom,这样你就可以只选择你所需要的帮助文档的语言,并 且把 isual studio2013和 Enable automatic updates打勾 y TwinCAT 3 Information System.InstallShield wizard Ex-1TwinCAT3Information System-InstasShieldWitard Custom Setup Ready to Install the Program Select the program features you want installed The wizard is ready to bean installatio Ook on an icon n the ist below to change how a feature is staled Clc Instal to becin te instalation. Feature Descrption If you want to review or change any of your nsta ladon setings, dok Back. dick Cancel to □ Vaus Studio2010 □ Vera sirio2012 J Sua studo 2013 This feature requres 432KB on your rard More Options: ENable automaticupdates Tnstallshel Space <Bad 0 Next>Cance <Back Insta Cancel (8)选择Yes 1y TwinCAT 3 Information System-Install Shield Weard y TwinCAT 3 Information System-InstallShield Wizard Installing TwinCAT 3 Information System Installshield Wizard Completed The program features you selected are being staled 崢 Please wait whle the Installshield wizard instal Twin CAT 3 Information System, This may take several minute The Insta shied wizard has successfuly instaled TwinCAT 3 Informaton System. Click Finish to exit the wizard If the Help Library Manager or the Help Library Agent is running, the Setup will stop these Applications. Proceed? a show the Windows Installer log cede Next Caneel 4580 h (9)这样就完成了 Twin Cat3的安装,并且可以离线査看帮助文档(帮助文档如 果链接网终可以在线更新),完成安装后打开TC3,点击HELP→> View Help,就可 7 以看到 Beckhoff Information Systen。 e Mrrocntt Heln Viawar 3.1-Vclal St din Documentation Add and Remove Content Adding contert will automatica ly refresh all loca documen a ion with available updates Betshuff kier aiur Syler d TwinCAT ntes on tre dccimantaton Installation scurce Loca store path: TEcx TC3 Enginccring Q) Onin Disk GLOcK rcgramDoto'Microsoft\Hc pL ibror Filter docunertaton(Ctrl+At+D TFoxx TC3 Functons Acion 上 stir ated download size 1819 NB 9 Upd 如果希望于动更新帮助文档,可以在开始菜单中找到 Update tC3- nfoSys(de-us) 点击进行更新 Beckhoff 0 TE130X Scope View 1 TF3300 Scope Server TF6100 OPC UA Twin CAT3 1 Twin CAT3 Information System 3 Information System English-VS. Information System German -VS L Update TC3-Info Sys(de-de)(VS2 注意:集成在 Visual Studio she中的 TwinCAt3不能进行C++和 matlab/ Simulink 的开发工作,但可以执行其他PC开发好的C++和 matlab/ Simulink的模块。 12 Twin cat3XAR版安装。 通常在嵌入式PC中只需要安装XAR版本的 TWinCAt3即可,因为嵌入式PC中硬 盘通常比较小,而且只需要负责模块的执行,不需要在本机中对模块进行丌发 Beckho仟f官方恻站下载 Twincat3XAR版,下载完成后,打开软件安装包。随后的 步骤和f训版本安装(1)-4)一样。 121安装提小 首先让我们来看下这2个安装包分别有什么内容 FULL: XAR: 5 TwinCAT 3- Version 3.1)18.- Setup 9 IwinCAI 3-Versicn 31.4018.- Setu Select the pruurasn Fectures yu welL installed BECKHOFF seest the pegram features you want stalled BECKHOFF lick on an icon in the list below o change how a teature is instaled. Cloc on an icon in the list below to dange how a feature is installed. Feature Descrption 曰- TwnCAT XAR3b 回 TwinCAT XAR6+bt TwnCAT 3 ADS ↓TACA3ADs(x6号 白回wmAT3 O- TwinCAT 3 IO (x64) O- TwinCAT 3 PLC TwinCAT 3PLC (x64) 会+ TwnCAT 3C++ This feature requres 3076KB on TwnCAT 3C++(x64) This feature requires 51MB or 回+ TwnCAT3Mc WwnCAT 3 MC (64 G+ITwinCAT 3 ADS API a- TwnCAT 3 ADS Ap: Instal to: (1)通过用户自定义安装可以发现:其实你只需要F碰安装包即可,F妄装包 也可以只安装XAR (2)上图中32bit是软件自动识别系统是32位系统还是64位,因此31版以后 都可以支持32位和64位。 (3)安装路径建议安装在全英文路径下,如果不是用户自定义安装默认在C:盘 二、 Twin CAT3的授权激活 1.试用版授权激活 在 Twin cat3中可以很方便激活试用版7天授权。在不连接网络的情况下,可以 根据实际需求重复激活使用。 为此 TwinCat3开发环境可以自动检测项目中所需要的授权,并且在运行项目的 时候进行提示,比如当项目在本地或者目标控制器中被激活的时侯,亼提示那些 试用版授权应该被激活 Microsoft visual Studio Some required runtime licenses missing. Generate trial licenses (1)在 TwinCat3开发环境中也可以手动激活7天试用授权,具体步骤如下: 点击 system下的 license 【实例截图】
【核心代码】
标签:
相关软件
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论