CODESYS V3 基础编程指南2.pdf
- 格式:pdf
- 大小:2.35 MB
- 文档页数:90
PLC综合开发利器——CoDeSys基础编程及应用指南目录第0章前言 (7)第1章概述 (8)1.1IEC61131-3标准 (8)1.1.1IEC 61131简介 (8)1.1.2PLCopen组织概况 (9)1.1.3IEC 61131-3编程语言 (9)1.1.4IEC 61131-3标准语言的特点 (10)1.2软PLC-C O D E S YS (11)1.2.1软PLC控制方案 (12)1.2.2软PLC的发展方向 (13)1.3C O D E S YS概述 (14)1.3.1CoDeSys自动化解决方案 (14)1.3.2CoDeSys实时核 (16)1.4软件的安装 (17)1.4.1安装所需的软硬件要求 (18)1.4.2安装 (18)1.4.3启动编程软件 (18)1.4.4帮助 (18)1.4.5CoDeSys开发系统 (19)1.5获取资料、插件和技术论坛 (22)第2章CODESYS结构 (23)2.1软件模型 (23)2.1.1软件模型概述 (23)2.1.2软件模型的特点 (24)2.2设备 (24)2.2.1设备 (24)2.2.2设备编辑器 (27)2.3应用 (28)2.3.1任务 (28)2.3.2库文件 (38)2.3.3全局变量和局部变量 (48)2.3.4访问路径 (50)2.4程序组织单元 (51)2.4.1程序组织单元结构 (51)2.4.2函数 (53)2.4.3功能块 (56)2.4.4程序 (60)2.4.5创建的原则 (62)2.5应用对象 (62)2.5.1采样跟踪 (62)2.5.2持续变量 (68)2.5.3数据单元类型 (69)2.5.4全局网络变量 (70)2.5.5配方管理器 (71)第3章公共元素及变量 (73)3.1公用元素 (73)3.1.1字符集 (73)3.1.2分界符 (73)3.1.3关键字 (75)3.1.6空格和注释 (78)3.2变量的表示和声明 (82)3.2.1变量 (82)3.2.2标识符 (82)3.2.3变量声明 (82)3.3数据类型 (84)3.3.1标准数据类型 (84)3.3.2标准的扩展数据类型 (89)3.3.3自定义数据类型 (96)3.4变量的类型和初始化 (107)3.4.1变量的类型 (107)3.4.2变量的初始化 (109)3.5变量声明及字段指令 (110)3.5.1变量匈牙利命名法 (110)3.5.2字段Pragma指令 (111)第4章编程语言 (113)4.1指令表(IL) (114)4.1.1指令表编程语言简介 (114)4.1.2连接元素 (115)4.1.3操作指令 (118)4.1.4函数及功能块 (123)4.1.5应用举例 (124)4.2梯形图(LD)/功能块(FBD) (126)4.2.1梯形图/功能块图编程语言简介 (126)4.2.2连接元素 (128)4.2.3应用举例 (137)4.3结构化文本(ST) (141)4.3.1结构化文本编程语言简介 (141)4.3.2指令语句 (143)4.3.3应用举例 (153)4.4顺序流程图(SFC) (157)4.4.1顺序流程图编程语言简介 (158)4.4.2SFC的结构 (160)4.4.3应用举例 (172)4.5连续功能图(CFC) (173)4.5.1连续功能图编程语言结构 (173)4.5.2连接元素 (175)4.5.3CFC的组态 (182)4.5.4应用举例 (183)第5章指令系统 (184)5.1位逻辑指令 (184)5.1.1基本逻辑指令 (184)5.1.2置位优先与复位优先触发器指令 (189)5.1.3边沿检测指令 (192)5.2定时器指令 (194)5.2.1定时器 (194)5.3计数器指令 (198)5.3.1计数器简介 (198)5.3.2计数器指令 (198)5.4数据处理指令 (202)5.4.1选择操作指令 (202)5.5运算指令 (214)5.5.1赋值指令 (214)5.5.2算术运算指令 (214)5.5.3数学运算指令 (217)5.5.4地址运算指令 (221)5.6数据转换指令 (223)5.6.1数据类型转换指令 (223)第6章基础编程 (231)6.1基本编程操作 (231)6.1.1启动CoDeSys (231)6.1.2PLC程序文件的建立 (233)6.2通讯参数设置 (236)6.2.1启动Gateway Server 和PLC (236)6.3程序下载/读取 (239)6.3.1编译 (239)6.3.2登入下载 (239)6.3.3在线监控 (243)6.4程序调试 (246)6.4.1复位功能 (246)6.4.2调试工具 (248)6.5仿真 (251)6.5.1离线仿真 (251)6.6PLC脚本功能 (253)6.7程序隐含检查功能 (254)第7章程序结构 (258)7.1系统程序和用户程序 (258)7.2用户程序结构 (258)7.2.1常用的编程方法 (258)7.3锁存电路 (262)7.3.1创建锁存电路 (262)7.3.2锁存电路的实际应用 (265)第8章可视化界面建立及应用 (267)8.1C O D E S YS可视化界面 (268)8.2基本操作 (269)8.2.1创建可视化界面 (269)8.2.2添加工具 (269)8.2.3对齐工具 (270)8.2.4删除工具 (270)8.3工具 (270)8.3.1基本工具 (270)8.3.2通用控制工具 (275)8.3.3测量控制 (286)8.3.4灯/开关/位图 (292)8.3.5特殊控制 (294)8.3.6报警管理 (301)8.4视图的建立及编辑 (307)8.4.1应用举例 (307)第9章模拟量闭环控制的实现 (319)9.1模拟量闭环控制 (319)9.1.2闭环控制的主要性能指标 (320)9.2C O D E S YS的闭环控制功能 (321)9.2.1CoDeSys控制方法 (321)9.2.2使用CoDeSys实现闭环控制 (321)9.2.3模拟量输入数据整定 (323)9.2.4模拟量输出数据整定 (325)9.2.5输入数据滤波 (326)9.3数字PID控制器 (333)9.3.1PID控制原理 (333)9.3.2标准PID控制器 (335)9.3.3固定采样频率的PID控制器 (337)9.3.4PD控制器 (338)9.4数字PID控制的改进算法 (340)9.4.1积分分离控制器 (340)9.4.2带死区的PID控制器 (341)9.5闭环控制实例 (342)9.5.1PID参数整定 (342)9.5.2简易压紧机的控制实例 (343)第10章控制系统工程实例 (352)10.1.1电动机点动运行 (352)10.1.2控制电动机正、反转运行 (355)10.1.3电动机Y-△启动控制 (361)10.1.4恒压变频供水控制系统 (366)10.1.5气动分度盘正、反转控制 (371)10.1.6液位自动控制 (377)10.1.7火警报警系统 (383)10.1.8抢答器控制系统 (385)10.1.9交通灯信号控制程序 (388)10.1.10停车场管理 (393)第11章通信网络基础 (395)11.1通信技术基础 (395)11.1.1通信系统的结构 (395)11.1.2通讯传输模式 (396)11.1.3数据传送方式 (396)11.1.4数据传送介质 (400)11.2串行通信基础及协议标准 (405)11.2.1基本概述 (405)11.2.2串口通讯接口标准 (407)11.3现场总线系统 (409)11.3.1现场总线技术 (409)11.3.2现场总线的特点 (410)11.3.3IEC 61158标准 (413)11.3.4FCS与DCS的基本要点及区别 (416)11.3.5现场总线的发展历程及发展现状 (417)11.4工业以太网 (419)11.4.1TCP/IP (419)11.4.2TCP/IP的工作方式 (420)11.4.3IEEE 802通信标准 (422)11.4.4工业控制网络的拓扑结构 (424)第12章常用工业现场总线及介绍 (430)12.1CAN通讯 (430)12.1.2CANopen物理层 (439)12.1.3PDO通讯示例 (441)12.1.4SDO通信示例 (447)12.2M ODBUS网络基础 (452)12.2.1数据链路层 (453)12.2.2协议描述 (455)12.2.3Modbus串行的两种传输模式 (458)12.2.4Modbus功能码 (462)12.2.5Modbus 物理层 (465)12.2.6Modbus 串口的通讯组态 (470)12.3E THER CAT网络基础 (475)12.3.1EtherCAT物理层 (475)12.3.2EtherCAT硬件组成 (480)12.3.3EtherCAT运行原理 (480)12.3.4EtherCAT通讯模式 (489)12.3.5EtherCAT状态机 (493)12.3.6EtherCAT伺服驱动器控制应用协议 (495)12.3.7EtherCAT主从站通讯配置示例 (502)12.4PROFINET网络基础 (509)12.4.1PROFINET物理层 (509)12.4.2PROFINET (513)12.4.3PROFINET协议架构 (516)12.4.4同步实时通信 (520)12.4.5PROFINET主从站通讯配置 (523)12.5E THER N ET/IP网络基础 (532)12.5.1EtherNet/IP物理层 (532)12.5.2EtherNet/IP运行原理 (537)12.5.3EtherNet/IP网络性能性能指标 (543)12.5.4EtherNet/IP通讯配置 (544)第13章附录 (550)13.1附录A ST指令快查 (550)13.2附录B标准库FUN及FB快查 (551)13.3附录C常用快捷键 (553)13.3.1快捷输入 (554)13.4附录D参考文献 (556)第0章前言CoDeSys是德国3S公司的PLC编程软件,本书主要以介绍该软件的PLC编程功能。
第一章安装CoDeSys2.1目前只能配置在WINDOWS-9x 或 -2000或-NT操作系统下,以下操作都在这几种系统下进行。
一、EPEC Can-card 卡安装EPEC PC-CAN卡用于CAN总线到PC的通讯转换,装于PC的PCMCIA插槽中。
1、在WINDOWS-9X,WINDOWS2000下的安装:1) 在关机状态下,插入PC-CAN 卡到笔记本电脑的PCMCIA插槽内。
2)开机后,系统自动发现新硬件,插入安装盘,自动搜索安装盘即可自行安装;也可指定安装位置于\CoDeSysSetupEng\Drivers\CANCard\WIN95或WIN2000安装。
2、在WINDOWS NT下的安装:1)关机,插入PC-CAN 卡到 PCMCIA插槽内.2)开机,以管理员模式进入:−操作系统自动发现新硬件,插入安装盘, 自动搜索安装盘即可自行安装;−或指定安装位置于\CoDeSysSetupEng\Drivers\0-01\WINDOWS进行安装。
或运行 \CoDeSysSetupEng\Drivers\0-01\Winnt\Setup.exe,根据提示进行安装。
−当提示出现是否重新启动时选择重新启动。
−重新启动后打开Control Panel (Start / Settings / Control Panel)。
−打开Devices窗口寻找line CAN。
−检查它的status是否started,设置startup为automatic。
如PC-CAN卡未安装成功,查看系统硬件是否有冲突;关机后将其他的卡取出,按上述步骤重装。
二、CANMoon 安装1.在硬盘创建\…\CANMoon\;2.拷贝安装盘\...\CodesysSetupEng\CANMoon_Ver_1_2\*.*到硬盘\...\CANMOON\中;3.拷贝安装盘\...\CodesysSetupEng\drivers\windows\system\*.*到..\CANMOON\中;4.将硬盘\...\CANMOON\中CANMOON.EXE建立快捷方式到桌面。
CodeSys 应用说明文档1.工程创建及编程入门
请参考文件CoDeSys 自动化开发平台基础编程入门.pdf
2.工程组成说明
2.1. 设备说明
设备名: 只是一个设备的名称,可以在其属性中更改
设备类型: 是设备的类型,名称是固定的
可以根据需要更改设备类型,以便于本机调试和目标机调试,
2.2. 程序说明
程序运行单元(PRG): 是一个可以运行的逻辑,能够被添加到任务中运行.
程序功能块(FB): 是一个完成某种功能的程序块,不能单独运行,只能在PRG中被调用时运行(必须先定义). 函数(Function): 是一个完成某种功能的程序块,不能单独运行,只能在PRG中被调用时运行(可以直接调用). 注意:
程序功能块(FB)和函数的区别:
1.程序功能块(FB)必须先定义,才能被使用,(类型于一个变量,必须先定义,才能在程序中使用)
但函数(Function)可以直接被调用,不必定义.
2.程序功能块(FB),可以有多个返回值,但函数(Function)只能有一个返回值;
2.3. 视图说明:
目标视图分辨率设置:
视图分辨率及名称设置:
导入位图
在视图添加背景图片
在视图中显示图片
在视图中添加Image控件,
图片的旋转
在视图中添加多边形控件,然后手动多边形的5个点,形成一写的图形,然后手动图片的中心点,
到要需要旋转的位置
控件的输入响应
2.4. 程序的调试选择程序运行的目标机
●程序单步调试
程序编译正确后,选择登录后,程序会下载到目标机上,并处于停止状态,点击运行后,程序才会跑起来,在调试时,可以监视变量的变化
暂停调试时,选择停止,停止调试时选择登出.
●直接下载程序。
玩转codesys入门篇
展开全文
1.安装
官方网站上或其他渠道下载安装包,一路默认安装即可,安装完成后电脑右下角如下图显示三个图标
2CmContainers已经连接
CODESYS Gateway SysTray(running)
CODESYS Control Win SysTray(stopped)
2.启动及新建项目
点击桌面codesys图标,软件启动动画如图
新建一个 standard project
3.基本操作
新建项目后可以在plc项目里添加Enum,Struct,FunctionBlock,Program,Task,如下图所示
添加操作基本都为右键->添加对象->...不同项的添加对象内容不同
同时,codesys能够配置多个任务,任务调用不同的程序段,每个任务可以手动设置执行优先级及循环周期
4.通讯配置
在device上可以进行通讯配置,这时网关指示绿色,最右侧指示灰色
所以要先start plc,启动成功后,图标由灰色变为彩色,进入running状态
然后进行扫描,选中本地pc,确定后将最右侧指示由灰色变为绿色即为成功
5.程序在线运行
此时可对程序进行编译,然后点击登录到
登录完成后状态如下图所示,登录完成,但程序处于停止状态
点击启动,启动成功后显示运行状态
双击程序段可监控变量在线执行状态,可以看到两段代码由于执行周期不同分别显示不同数值。
Your Global Automation Partner Application Guide2 Turck Inc. | 3000 Campus Drive, Minneapolis, MN 55441 | T +1 763 553-7300 | F +1 763 509-7709 | Create a control system without a panelThe CoDeSys 3 (IEC 61131-3) software provides a powerful control environment supporting multiple common programming languages including ladder, structured text, function block diagram, and sequential function chart. This software can be downloaded for free at .A small button podium may be used to house items that must be enclosed in the panel.Turck programmable controllers provide up to IP68/IP69k protection, ideal for complete control of a system without the need for an enclosed control cabinet. These devices can function as a network master for remote I/O, additionally the flexible BL67 modular system allows for a variety of local I/O modules.3These devices can function as a network master or remoteI/O over multiple industrial fieldbus protocols including:*Indicates length in meters.BL67-PG-EN-V3TBEN-Lx-PLC-01■-40...+70 °C operating temperature ■IP67 Protection■Up to 32 local I/O modules(Discrete, analog, IO-Link, RFID, serial, etc.)■-40...+70 °C operating temperature ■IP68/IP69K Protection ■Onboard serial andconfigurable discrete I/O4 Turck Inc. | 3000 Campus Drive, Minneapolis, MN 55441 | T +1 763 553-7300 | F +1 763 509-7709 | Connect BL Ident RFID to any PLC5BL Ident Tags■Read/write times up to 2000 bytes/sec possiblewith FRAM Technology■Standard tags include 128 byteEEPROM and 2 kbyte FRAM tags■Available in high temperature packages, capable of up to 210 °C■Variety of tags available: bolts, ID-cards, adhesivelabels, autoclave, laundry, FDA approved■Data storage for 10 years at ambient temperatures■Flexible assembly lines: for custom build operations the required BOM could be stored into the tag and read out at each station ■Replace existing barcode system:barcode is reapplied due to paint or heat treatment where RFID can survivePLC6 Turck Inc. | 3000 Campus Drive, Minneapolis, MN 55441 | T +1 763 553-7300 | F +1 763 509-7709 | Connect fieldbus techology products to analog input devicesBL remote is a feature available on some gateway products. This feature allows bridging of device level networks to Ethernet. In this example, BL67 is operating on EtherNet/IP and drops down to the BL compact station using BL remote.Rod Style Series: ■Rugged rod style housing toallow operation in high shock and vibration environments ■Hydraulic cylinder applications where rod can withstand up to 5000 PSI continuously■Various analog output options ■16-bit resolution■Stroke length up to 168 inchesQ-track™ Series:■■ ■ ■ ■ ■Level Probe Series: ■Ideal for continuous level monitoring ■Uses magnetostrictive technologyto monitor float location■Analog output■Programmable monitoring span ■Stroke length up to 288 inches ■FM approved7Analog Sensors:■Pressure, temperature, sensors and transmittersfor use in pneumatic and hydraulic applications■Programmable digital read out flow sensors ■Highly reliable and precise temperature sensors ■Ultrasonic sensors■Linear analog sensors with wide range ofhousing styles and output options8 Turck Inc. | 3000 Campus Drive, Minneapolis, MN 55441 | T +1 763 553-7300 | F +1 763 509-7709 |BL67 I/O System can include digital, analog, IO-Link and RFID.2Parker Valve ManifoldsParker supplies a BL67 valve adapter base to directly connect Isys ISO and Micro valve banks to the Turck BL67 modular I/O system. Standard TurckBL67-16DO-0,1A-P output modules insert into the adapter base to provide direct control of up to 32 valve solenoids.Contact a local Parker distributor to order BL67 valve adapter and Parker valve banks.1Connect BL67 to valve banks with molded cables and discrete outputs, IO-Link, or direct connection9Possible Valve Bank Combinations■Channel-relatedshort-circuit monitoring■Wire-break detection■Configurable current monitoring ■Connection of multiple valve banksfrom different manufacturers■Integration of valve banks with digital output modules with 4, 8 or 16 channelsStandard and custom cordset lengthsThe 16-channel specially developed for switching valve banks. It features:10 Turck Inc. | 3000 Campus Drive, Minneapolis, MN 55441 | T +1 763 553-7300 | F +1 763 509-7709 | Hoist and hoist control systems for stage rigging systems move lights, sets and people using gear motors, brakes and winches.Amusement Machine groups product into case quantities and applies shrink film. Encoder tracks length of product ensuring the bar carrying film does not touch product.Packaging Encoder tracks rotations of a drum used to store cable.Cable ManagementVia SSIVia High Speed CounterConnect BL67 to rotary position sensorsAutomotive A shaft encoder is mounted to the drive rollers of a dynamometer to provide velocity feedback.11Features of QR24Rotary Position Sensors: ■Non-contact position measurement ■SSI communication interface ■Bus interface to CANopen ■Rugged IP68/IP69K rating■Highly resistant to noise interference ■Extremely fast (up to 12,000 RPM) andprecise (up to 29 bit resolution) ■Easy setup: IO-Linkparameterization via Pactware ■Available with analog andincremental outputsFeatures ofIncremental Encoders:■Optical technology■Solid and hollow shaft models ■Differential and single-endedmodes of operation■High noise immunity and precision ■Extremely fast (up to 12,000 RPM) ■Standard M12 and M23 connection12 Turck Inc. | 3000 Campus Drive, Minneapolis, MN 55441 | T +1 763 553-7300 | F +1 763 509-7709 | BL 67 I/O System■Rugged IP 67 construction allowsfor mounting directly on a machine without the use of an enclosure ■Modular design allows for variousI/O connections: up to 32 electronic modules, 256 digital or 64 analog■Support current and voltage I/O, RTDs, thermocouples, CAN Valve interface, RS232, RS422/485 and serial synchronous interfaces■Support of PROFIBUS, DeviceNet,CANopen, EtherNet/IP , Modbus TCP/IP , and PROFINET fieldbus■System diagnostic and per point diagnostic ■Fast and easy connectorization using7/8-16 UN Minifast ®, M12 Eurofast ®, M8 Picofast ® or M23 Multifast ® ■Configuration using free I/O-Assistantsoftware or rotary switchesEncoders BL ident (RFID)Sensors Solenoids Motor StartersTCP/IP13Possible CombinationsColor VisionBar Code VisionMachine Vision■Gray scale pattern and colorspectrum analysis■Two convenient form factors: one-piece PresencePLUS P4or compact PresencePLUS Pro sensor with a separate DIN-mountable controller ■Rugged IP 68-rated models suitablefor washdown applications* Indicates length in meters.Features of PresencePLUS ® Systems:■All PresencePLUS vision sensorsinclude built-in serial, EtherNet/IP and Modbus TCP/IP drivers with 4 (P4) or 6 (PROII) programmable I/O. A PresencePLUS sensor, with the Turck BL67 delivers expanded I/O, DeviceNet, PROFIBUS or PROFINET connectivity ■General-purpose or dedicated-function vision sensors■Discrete I/O on-board ■Wide range of mountingbrackets, lighting and lenses remote TEACH functionality to adjust image without PC ■Simple and intuitive userinterface with three-step, point-and-click operation■Rugged IP67 construction allows for mounting directly on a machine without the use of an enclosure ■Modular design allows for various I/O connections: up to 32 electronic modules, 256 digital or 64 analog ■Support current and voltage I/O, RTDs, thermocouples, CAN Valve interface, RS232, RS422/485 and serial synchronous interfaces ■System diagnostic andper point diagnostic■Fast and easy connectorization using7/8-16 UN Minifast®, M12 Eurofast®,M8 Picofast® or M23 Multifast®■Configuration using free I/O-Assistantsoftware or rotary switches■Support a wide variety offieldbuses including:»EtherNet/IP™»Modbus TCP/IP»PROFINET»DeviceNet™»PROFIBUS®-DP»CANopenBL67 I/O SystemInput/Output DevicesEncoders BL ident (RFID)Sensors SolenoidsConnect BL67 to wireless networkswith DX80 wireless gatewaysTCP/IP214 Turck Inc.|3000 Campus Drive, Minneapolis, MN 55441|T +1 763 553-7300|F +1 763 509-7709|15Possible Wireless Combinations* Indicates length in meters.Factory AutomationAgriculture and WaterTraffic ManagementCommercial andConsumer Monitoring16 Turck Inc. | 3000 Campus Drive, Minneapolis, MN 55441 | T +1 763 553-7300 | F +1 763 509-7709 | Stand alone I/O solutions powered by ARGEEWhen the door is closed the input sensor is on.No ARGEE actions take place in this condition.When the freezer door is open for more than 10seconds a warning light is turned on.With the freezer door open for more than 20seconds an audible alarm is turned on as well.When the door is closed at any time, the light and alarm are turned off and the timers are reset to zero.Door ClosedDoor OpenedDoor Opened for 20 Secs or MoreProgramming with an FLC (field logic controller) powered by ARGEE for a stand alone application could not be simpler. In the ARGEE Flow editor, a ladder like diagram editor, users use a drop down menu to select inputs, operations and outputs. When the program is running, the FLC carries out the program logic. Take the following stand alone freezer door application for example:17• This step in the program will monitor the door.• When the door is closed, our input value is on.• With this condition , we utilize the Boolean NOT operation to prevent Timer 1 and Timer 2 from starting.•With this logic, when the door opens, the action of starting Timer 1 and Timer 2 will begin.•When Timer 1 is expired, turn on Output 3 and illuminate our warning light.•When Timer 2 is expired, turn on Output 7 and sound our audible alarm.Slot 2. Input_value_0Time 1 ExpiredTime 2 ExpiredNOT Pass ThroughPass Through Pass Through Pass ThroughPass ThroughTON Timer 1No ActionSlot 2. Output_value_7TON Timer 2Slot 2. Output_value_3No ActionNo Action28 subsidiaries and over 60 representations worldwide!B3106 B 03/16©2016 by Turck Inc. All rights reserved. No part of the publication may be reproduced without written permission.Printed in USA。
CODESYSV3基础编程使用指南将响应报文中的寄存器数据分成每个寄存器有两字节,在每个字节中直接地调整二进制内容。
对于每个寄存器,第一个字节包括高位字节,并且第二个字节包括低位字节。
【例12.x】将寄存器108的内容表示为十进制数555。
寄存器109和110中的内容分别为十进制0 和100。
当要读取保持寄存器108-110中的内容时,Modbus发送的请求报文和响应报文如下所示。
请求报文如下:响应报文如下:12.4.5电缆和接头在Modbus的通信协议中,对通讯线缆及接头定义有了明确的定义。
1.Modbus 串口通讯线缆Modbus串口通信线缆必须使用屏蔽线,并且至少有一端必须要连接到地线,如果在两端使用了连接器,那连接器必须与通信线缆的屏蔽层相通。
在实际应用中,为了减少接线的错误,基于RS-485的Modbus 通信对通信线缆颜色有所推荐,建议广大读者可以参考表12-x的规范接线。
表12-X 基于RS-485的Modbus通信推荐线缆当使用RS-485AWG24的标准。
如果使用5类线用于RS-485 Modbus通信时,最大的距离为600米。
2.Modbus 串口通讯接头1)2线-Modbus接口定义如果使用RJ45(mini-Din或者D型)作为Modbus的连接头,外壳选择带有屏蔽功能。
以保证通讯的抗干扰性能。
2线 Modbus连接器的输出引脚如图12.x所示。
图12.x 中使用的RJ-45连接器D型9针口的示意图如图12.x所示。
图12.x D型9针口若一台标准的MODBUS设备使用RJ45或9引脚D 型连接器,对每种实际电路必须注意下述输出引脚。
表12-X RJ45与D型9针口连接器输出引脚2)4线Modbus连接器的输出引脚如图12.x所示,该图中使用的是RJ-45的通讯,在实际的应用中,施耐德常采用此通讯接口。
图12.x 4线-Modbus中使用的RJ-45连接器D型9针口的示意图如图12.x所示。
图9.X 路径3D配置在主程序中,声明了VISUStruct3Dcontrol及调用了PathGenerator的功能块,该功能块的作用是用于产生3D路径及跟踪轨迹,该轨迹可以存放2200个点。
这两个变量都与该工具的属性有相应关系。
(2)程序编写FUNCTION_BLOCK VisuStruct3DTrackVAR_INPUTpData: POINTER TO ARRAY[0..0] OF VisuStruct3DPathPoint;udiNumberOfPointsInArray: UDINT;udiFirstPoint: UDINT;udiNumberOfPointsToDraw: UDINT;pProjection: POINTER TO Projection;END_VARpData 指向一个VisuStruct3DPathPoint 元素数组。
这个数字必须至少含有udiNumberOfPointsInArray 个元素。
数组必须包含在应用中并且数据指针必须通过应用进行设置。
一个点的说明TYPE VisuStruct3DPathPoint :STRUCTv: Vector3;udiSourceElementID: UDINT;dwAddInfo: DWORD;END_STRUCTEND_TYPE(3)变量映射如图9.x所示,在属性中的“变量”中可以设置拨码开关的映射变量。
图9.X 变量映射程序最终的运行效果如图9.x所示。
图9.X 路径3D示意图示例程序可以在Sample\第九章\ActiveX\下进行查看。
9.3.6报警管理报警管理工具主要包括报警表格和报警条。
报警管理工具视图如图9.x所示。
图9.X 报警管理工具视图1.报警表格用户可以自定义可视化报警,但必须在CoDesys报警配置中预先进行定义。
在可视化编辑器中,用户可以通过在工具箱中添加“”,将其拖拽至画面编辑区域;故需要完成报警显示需要有两部分的设置,第一,需要在“Application”中设置报警配置,第二,需要在可视化编辑器中进行设置。
图9.X 路径3D配置在主程序中,声明了VISUStruct3Dcontrol及调用了PathGenerator的功能块,该功能块的作用是用于产生3D路径及跟踪轨迹,该轨迹可以存放2200个点。
这两个变量都与该工具的属性有相应关系。
(2)程序编写FUNCTION_BLOCK VisuStruct3DTrackVAR_INPUTpData: POINTER TO ARRAY[0..0] OF VisuStruct3DPathPoint;udiNumberOfPointsInArray: UDINT;udiFirstPoint: UDINT;udiNumberOfPointsToDraw: UDINT;pProjection: POINTER TO Projection;END_VARpData 指向一个VisuStruct3DPathPoint 元素数组。
这个数字必须至少含有udiNumberOfPointsInArray 个元素。
数组必须包含在应用中并且数据指针必须通过应用进行设置。
一个点的说明TYPE VisuStruct3DPathPoint :STRUCTv: Vector3;udiSourceElementID: UDINT;dwAddInfo: DWORD;END_STRUCTEND_TYPE(3)变量映射如图9.x所示,在属性中的“变量”中可以设置拨码开关的映射变量。
图9.X 变量映射程序最终的运行效果如图9.x所示。
图9.X 路径3D示意图示例程序可以在Sample\第九章\ActiveX\下进行查看。
9.3.6报警管理报警管理工具主要包括报警表格和报警条。
报警管理工具视图如图9.x所示。
图9.X 报警管理工具视图1.报警表格用户可以自定义可视化报警,但必须在CoDesys报警配置中预先进行定义。
在可视化编辑器中,用户可以通过在工具箱中添加“”,将其拖拽至画面编辑区域;故需要完成报警显示需要有两部分的设置,第一,需要在“Application”中设置报警配置,第二,需要在可视化编辑器中进行设置。
IEC 61131-3 编程工具WAGO-I/O-PRO 32用户手册(上)技术描述第1-14章759-122/000-002版本 2.0.0i目录目录1 重要说明 (1)1.1 合法性 (1)1.1.1版权声明 (1)1.1.2 人员资质 (1)1.1.3 使用准备 (1)1.2 警示图标 (1)1.3 特殊字体 (2)1.4 数字表示法 (2)1.5 适用范围 (2)1.6 缩写 (2)1.7 交货内容 (2)1.8 系统配置 (3)1.9 安装 (3)1.10 卸载 (3)1.11 运行 (4)1.12 重要提示 (4)2 WAGO-I/O-PRO 32 V2.2 概述 (5)2.1 WAGO-I/O-PRO 32 软件简介.......................................... .. (5)2.2 WAGO-I/O-PRO 32功能概述............... .. (5)2.2.1 项目结构 (5)2.2.2 创建项目 (5)2.2.3 测试项目 (5)2.2.4 调试 (6)2.2.5 其它在线工具 (6)2.2.6 辅助功能 (6)2.2.7 总结 (6)2.3 项目单元 (6)2.3.1 项目 (6)2.3.2 POU(程序组织单元) (6)2.3.3 功能 (7)2.3.4 功能块 (8)2.3.5 功能块实例 (9)2.3.6 功能块调用 (10)2.3.7 程序 (11)2.3.8 PLC_PRG (13)2.3.9 动作(Action) (13)2.3.10 程序资源 (14)2.3.11 库文件 (14)2.3.12 数据类型 (14)2.3.13 可视化工具 (15)2.4 编程语言 (15)2.4.1 语句表 (IL) (15)目录ii2.4.2 结构化文本语言 (ST) (17)2.4.3 顺序功能图 (SFC) (23)2.4.4 功能块图 (FBD) (29)2.4.5 连续功能块图 (CFC) (29)2.4.6 梯形图 (LD) (29)2.5 调试及在线功能 (31)2.5.1 采样轨迹 (31)2.5.2 调试 (31)2.5.3 断点 (31)2.5.4 单步执行 (32)2.5.5 单循环 (32)2.5.6 在线修改数值 (32)2.5.7 监控 (32)2.5.8 仿真 (33)2.5.9 日志 (33)2.6 标准 (34)3 编程实例 (35)3.1 交通信号灯控制实例 (35)3.1.1 创建 POU (35)3.1.2 TRAFFICSIGNAL 的作用是什么? (35)3.1.3 WAIT 的作用是什么? (35)3.1.4 SEQUENCE 的作用是什么? (35)3.1.5 PLC_PRG 的作用是什么? (35)3.1.6 "TRAFFICSIGNAL" 声明 (36)3.1.7 "TRAFFICSIGNAL" 主体 (36)3.1.8 连接标准库(standard.lib) (38)3.1.9 "WAIT" 声明 (38)3.1.10 "WAIT" 主体 (38)3.1.11 "SEQUENCE" 第一扩展级 (39)3.1.12 创建SFC图表 (40)3.1.13 动作及转换条件 (41)3.1.14 "SEQUENCE" 第二扩展级 (43)3.1.15 结果 (45)3.1.16 PLC_PRG (45)3.1.17 TRAFFICSIGNAL 仿真 (47)3.2 图形化交通信号灯 (47)3.2.1 创建新图形 (47)3.2.2 插入图形元件 (48)3.2.3 其它交通灯 (49)3.2.4 TRAFFICSIGNAL 灯箱 (49)3.2.5 第二个交通信号灯 (49)3.2.6 开关ON (50)3.2.7 图形中的字体 (51)iii目录4 WAGO-I/O-PRO 32 的组成 (53)4.1 主画面 (53)4.1.1 主菜单 (53)4.1.2 工具条 (54)4.1.3 对象管理器 (54)4.1.4 屏幕分隔线 (54)4.1.5 工作区 (55)4.1.6 信息窗口 (55)4.1.7 状态栏 (55)4.1.8 上下文菜单 (56)4.2 选项功能 (56)4.2.1 'Project' 'Options' (56)4.2.2 装载及存储选项 (56)4.2.3 用户信息选项 (58)4.2.4 编辑器选项 (58)4.2.5 桌面选项 (61)4.2.6 颜色选项 (62)4.2.7 目录选项 (63)4.2.8 日志选项 (64)4.2.9 编译选项 (65)4.2.10 密码 (67)4.2.11 源代码下载 (68)4.2.12 符号配置选项 (69)4.2.13 ‘宏’选项 (70)4.3 项目管理 (71)4.3.1 'File' 'New' (71)4.3.2 'File' 'Open' (71)4.3.3 'File' 'Close' (72)4.3.4 'File' 'Save' (72)4.3.5 'File' 'Save as' (72)4.3.6 'File' 'Save/Mail Archive' (73)4.3.7 'File' 'Print' (76)4.3.8 'File' 'Printer setup' (77)4.3.9 'File' 'Exit' (78)4.3.10 'Project' 'Build' (79)4.3.11 'Project' 'Rebuild all' (79)4.3.12 'Project' 'Clean all' (79)4.3.13 'Project' 'Load Download-Information' (80)4.3.14 'Project' 'Translate into another language' (80)4.3.15 'Project' 'Document' (84)4.3.16 'Project' 'Export' (85)4.3.17 'Project' 'Import' (86)4.3.18 'Project' 'Merge' (86)4.3.19 'Project' 'Compare' (87)目录iv4.3.20 'Project' 'Project info' (91)4.3.21 'Project' 'Global Search' (92)4.3.22 'Project' 'Global replace' (93)4.3.23 'Project' 'Check' (93)4.3.24 'Project' 'Passwords for user groups' (95)4.4 项目中的对象管理 (95)4.4.1 对象 (95)4.4.2 文件夹 (96)4.4.3 新文件夹 (97)4.4.4 'Expand nodes' 'Collapse nodes' (97)4.4.5 'Project' 'Object Delete' (97)4.4.6 'Project' 'Object Add' (97)4.4.7 'Project' 'Object Rename' (98)4.4.8 'Project' 'Object Convert' (99)4.4.9 'Project' 'Object Copy' (99)4.4.10 'Project' 'Object Open' (99)4.4.11 'Project' 'Object Access rights' (100)4.4.12 'Project' 'Object properties' (101)4.4.13 'Project' 'Add Action' (101)4.4.14 'Project' 'Open Instance' (101)4.4.15 'Project' 'Show Call Tree' (102)4.4.16 'Projekt' 'Show cross reference' (102)4.5 常规编辑功能 (103)4.5.1 'Edit' 'Undo' (103)4.5.2 'Edit' 'Redo' (104)4.5.3 'Edit' 'Cut' (104)4.5.4 'Edit' 'Copy' (104)4.5.5 'Edit' 'Paste' (105)4.5.6 'Edit' 'Delete" (105)4.5.7 'Edit' 'Find' (106)4.5.8 'Edit' 'Find next' (106)4.5.9 'Edit' 'Replace' (106)4.5.10 'Edit' 'Input Assistant' (107)4.5.11 'Edit''Declare Variable' (110)4.5.12 'Edit' 'Next error'" (110)4.5.13 'Edit' 'Previous error'" (110)4.5.14 'Edit' 'Macros' (110)4.6 通用在线功能 (110)4.6.1 'Online-Change' 功能.... . (110)4.6.2 'Online' 'Login' (111)4.6.3 系统报告 (111)4.6.4 'Online' 'Logout' (112)4.6.5 'Online' 'Download' (112)4.6.6 'Online' 'Run' (113)v目录4.6.7 'Online' 'Stop' (113)4.6.8 'Online' 'Reset' (113)4.6.9 'Online' 'Reset (cold)' (113)4.6.10 'Online' 'Reset (original)' (113)4.6.11 'Online' 'Toggle Breakpoint' (113)4.6.12 'Online' 'Breakpoint Dialog Box' (114)4.6.13 'Online' 'Step over' (115)4.6.14 'Online' 'Step in' (115)4.6.15 'Online' 'Single Cycle' (115)4.6.16 'Online' 'Write values' (115)4.6.17 'Online' 'Force values' (116)4.6.18 'Online' 'Release force' (117)4.6.19 'Online' 'Write/Force' Dialog' (118)4.6.20 'Online' 'Show Call Stack' (119)4.6.21 'Online' 'Flow Control'" (120)4.6.22 'Online' 'Simulation' (120)4.6.23 'Online' 'Communication Parameters' (120)4.6.24 网关系统规则 (121)4.6.25 本地PC机上的通讯参数对话框 (121)4.6.26 设定网关服务器和通道 (122)4.6.27 为本地网关服务器设定一个新通道 (123)4.6.28 在通讯参数对话框编辑参数时的技巧 (125)4.6.29 快速检测网关的错误连接 (125)4.6.30 'Online' 'Sourcecode download' (125)4.6.31 'Online' 'Create bootproject' (125)4.6.32 'Online' 'Write file to controller' (125)4.6.33 'Online' 'Load file from controller' (126)4.7 日志 (126)4.7.1 'Window' 'Log' (126)4.7.2 菜单日志 (127)4.7.3 存储项目日志 (128)4.8 窗口设定 ................................................................................. ................................ . (128)4.8.1 'Window' 'Tile Horizontal' ............................... ........... ................................ (128)4.8.2 'Window' 'Tile Vertical' ................................. ........... ................................ .. (128)4.8.3 'Window' 'Cascade' ...................................... ........... ................................ . (128)4.8.4 'Window' 'Arrange Symbols'................... ........... ................................ (129)4.8.5 'Window' 'Close All' ............................... ........... ................................ (129)4.8.6 'Window' 'Messages' ............................ ........... ................................ (129)4.9 帮助 ..................................................... ........... ................................ . (129)4.9.1 'Help' 'Contents and Index'................... ........... ................................ . (129)4.9.2 主帮助窗口................................ ........... ................................ . (130)4.9.3 索引窗口 ............................... ........... ................................ (131)4.9.4 快速帮助 ..................... ........... ................................ (132)目录vi5 编辑器 (133)5.2 声明编辑器............. ........... ................................ . (134)5.2.1 声明部分............. ........... ................................ (134)5.2.2 输入变量............ ........... ................................ .. (135)5.2.3 输出变量 ......... ........... ................................ (135)5.2.4 输入/输出变量.... ........... ................................ . (135)5.2.5 局部变量....................... ........... ................................ (135)5.2.6 其它变量.................... ........... ................................ . (136)5.2.7 常量,直接数值........ ........... ................................ .. (136)5.2.8 外部变量 ................. ........... ................................ (136)5.2.9 关键字........... ........... ................................ .. (137)5.2.10 变量声明..... ........... ................................ .. (137)5.2.11 AT 声明 ........ ........... ................................ . (138)5.2.12 'Insert' 'Declarations keywords'....... ........... ................................ . (138)5.2.13 'Insert' 'Type' .............................. ........... ................................ (138)5.2.14 语法颜色.................................. ........... ................................ . (138)5.2.15 快捷模式 ............................. ........... ................................ .. (139)5.2.16 自动声明............................... ........... ................................ . (139)5.2.17 声明编辑器中的行号.......... ........... ................................ . (141)5.2.18 表格声明 ............................ ........... ................................ . (141)5.2.19 'Insert' 'New Declaration' ........... ........... ................................ (142)5.2.20 附注指令..................................... ........... ................................ (142)5.2.21 在线模式下的声明编辑器......... ........... ................................ . (145)5.3 文本编辑器.............................. ........... ................................ . (145)5.3.2 IL 编辑器............................. ........... ................................ . (150)5.3.3 ST 编辑器 ...................... ........... ...................... ........... ................................ .. (151)5.4 图形编辑器.............................. ........... ................................ (151)5.4.2 FBD 编辑器 ....................... ........... ................................ .. (153)5.4.3 梯形图编辑器..................... ........... ................................ .. (159)5.4.4 SFC 编辑器 ....................... ........... ................................ .. (164)5.4.5 CFC 编辑器 ...................... ........... ...................... ............... ................................ ................... . (173)6 资源概述 (187)6.1 全局变量 .......................................... ..................... ................................ .. (187)6.1.1 编辑全局变量 ............ ........... ................................................... .. (187)6.1.2 变量表 ......................... ........... . (187)6.1.3 全局变量 .................... ........... ................................................. . (188)6.1.4 全局常量..................... ........... ................................................. (190)6.2 变量................................. ........... ................................................ (190)6.2.1 .Insert' 'All Instance Paths'.............. ............ ....................................... . (191)6.2.2 结构文档 ................................................ .......................... ................................ .. (191)6.3 PLC 浏览器.................................................. .............. ................................ .. (193)6.4 PLC 配置....................................................... ........................ ................................ . (193)6.4.1 PLC 选择.................................................... ........... ............................................. (193)vii目录6.5 任务配置 ....................................................... ........... ................................ (193)6.5.1 哪个任务被处理? .............................. ........... ................................ .. (194)6.5.2 任务配置中的工作..................... ........... ................................ (194)6.5.3 'Insert' 'Insert Task' 或'Insert' 'Append Task'..... ........... ................................ . (195)6.5.4 'Insert' 'Insert Program Call' 或'Insert' 'Append Program Call' .. ........... ....................................... .. (195)6.5.5 'Extras' 'Edit Entry'.................................................... ........... ................................ .. (196)6.5.6 'Extras' 'Set Debug Task'......................................... ........... ................................ . (196)6.6 采样轨迹 ................................................................. ........... ................................ (196)6.6.1 'Extras' 'Trace Configuration'................................ ........... ................................ . (197)6.6.2 'Extra' 'Start Trace' ................................................ ........... ................................ . (198)6.6.3 'Extra' 'Read Trace' ............................................... ........... ................................ .. (198)6.6.4 'Extra' 'Auto Read'............................................... ........... ................................ . (198)6.6.5 'Extra' 'Stop Trace' ............................................. ........... ................................ .. (198)6.6.6 显示变量的选择................. ........... ................................ . (199)6.6.7 采样轨迹的显示 ............... ........... ................................ (199)6.6.8 'Extras' 'Cursor Mode' ............. ........... ................................ . (200)6.6.9 'Extras' 'Multi Channel' ............ ........... ................................ (200)6.6.10 'Extras' 'Show grid'................... ........... ................................ . (200)6.6.11 'Extras' 'Y Scaling' ................... ........... ................................ .. (200)6.6.12 'Extras' 'Stretch'......................... ........... ................................ . (201)6.6.13 'Extras' 'Compress' ..................... ........... ................................ .. (201)6.6.14 'Extras' 'Save Trace' ........................ ........... ................................ .......................................................... ..201 6.6.15 'Extras' 'Load Trace'......................... ........... ................................ .. (201)6.6.16 'Extras' 'Trace in ASCII-file'............ ........... ................................ .......................................................... .201 6.7 监视及配方管理器.............................. ........... ................................ ....................................................... ..202 6.7.1监视及配方管理器.............................. ........... ................................ .................................................... ..202 6.7.2 离线模式下的监视及配方管理器.... ........... ................................ ................................................. (202)6.7.3 'Insert' 'New Watch List' ..................... ........... ................................ ........................................................ ..203 6.7.4 'Extras' 'Rename Watch List' ............... ........... ................................ ................................................. . (203)6.7.5 'Extras' 'Save Watch List'..................... ........... ................................ (203)6.7.6 'Extras' 'Load Watch List' ..................... ........... ................................ ................................................. (203)6.7.7 在线模式下的监视及配方管理器......... ........... ................................ ........................................... . (203)6.7.8 'Extra' 'Monitoring Active'........................ ........... ................................ ............................................... .. (204)6.7.9 'Extras' 'Write Receipt'.............................. ........... ................................ ................................................ . (204)6.7.10 'Extras' 'Read Receipt'............................. ........... ................................ ............................................. . (205)6.7.11 强制数值................................................. ........... ................................ .......................................... ... . (205)7 库管理器 .................................................................................................................................. .. (207)7.1 使用库管理器............................................. ........... ................................ ............................................ . (207)7.2 标准库 ....................................................... ........... ................................ ........................................... (208)7.3 用户自定义库 ............................................. ........... ................................ ......................................... . (208)7.4 'Insert' 'Additional Library'.............................. ........... ................................ ................... ......................... .. (208)7.5 删除库 .......................................................... ........... ................................ ..................................... . (208)目录viii8 可视化组件 (209)8.1 可视化组件.................................................. ........... ................................ . (209)8.2 创建可视化组件.................................... ........... ................................ .. (210)8.2.1可视化组件单元,插入....................... ........... ................................ .. (210)8.2.2 作用于可视化单元......................... ........... ................................ . (211)8.2.3 可视化组件单元,配置................ ........... ................................ .. (212)8.2.4 其它可视化组件单元功能........... ........... ................................ . (222)9 DDE接口 (229)9.1通过DDE与WAGO-I/O-PRO 32进行通讯........................................................................... .229 9.2 WAGO-I/O-PRO 32编程系统的DDE接口........................................................................... .229 9.2.1 启动DDE接口 (229)9.2.2 访问数据的途径 (229)9.2.3 哪些变量可被读取? (230)9.2.4 使用WORD软件链接变量……………………………………………………………………………… .230 9.2.5 使用EXCEL软件链接变量……………………………………………………………………………… .230 9.2.6 通过Intouch软件访问变量……………………………………………………………………………… ..23010 键盘命令 (231)10.1 键盘的使用 ............ ........... ................................ .. (231)10.2 组合键 ................................ .. ........... ................................ ....... (231)11 数据类型 (235)11.1 标准数据类型......... .. ........... ................................ .. (235)11.2 定义数据类型........ .. ........... ................................ . (236)12 IEC 运算符 (245)12.1 IEC 操作符 ....... .. ........... ................................ (245)12.2 算术操作符.......... .. ........... ................................ .. (245)12.2.1 ADD....................... .. ........... ................................ .. (245)12.2.2 MUL ...................... .. ........... ................................ .. (245)12.2.3 SUB........................ .. ........... ................................ .. (246)12.2.4 DIV.......................... .. ........... ................................ . (246)12.2.5 MOD......................... .. ........... ................................ .. (247)12.2.6 INDEXOF.................. .. ........... ................................ . (248)12.2.7 SIZEOF......................... .. ........... ................................ . (248)12.3 位字符串操作符............... .. ........... ................................ .. (248)12.3.1 AND...................................................................... ........... ................................ .. (248)12.3.2 OR...................................................... .. ........... ................................ .. (249)12.3.3 XOR................................................... .. ........... ................................ .. (250)12.3.4 NOT...................................................... .. ........... ................................ .. (250)12.4 位移操作符............................................. .. ........... ................................ .. (251)12.4.1 SHL.......................................................... .. ........... ................................ . (251)12.4.2 SHR............................................................ .. ........... ................................ .. (252)ix目录12.4.3 ROL .............................................................. .. ........... ................................ .. (253)12.4.4 ROR (253)12.5 选择操作符........................................................... .. (254)12.5.1 SEL .................................................................... (255)12.5.2 MAX................................................................... (255)12.5.3 MIN................................................................... . (256)12.5.4 LIMIT ............................................................... . (256)12.5.5 MUX.................................................................. (257)12.6 比较操作符 ......................................................... . (257)12.6.1 GT........................................................................ . (257)12.6.2 LT ......................................................................... (258)12.6.3 LE ........................................................................ . (258)12.6.4 GE.......................................................................... .. (259)12.6.5 EQ.......................................................................... .. (259)12.6.6 NE.......................................................................... .. (260)12.7 地址操作符............................................................. (260)12.7.1 ADR........................................................................ . (260)12.7.2 容量操作符 .......................................................... .. (261)12.8 调用操作符................................................................ .. (261)12.8.1 CAL .......................................................................... .. (261)12.9 类型转换功能 (261)12.9.1 BOOL_TO转换 (262)12.9.2 TO_BOOL转换 (263)12.9.3 整数类形之间的转换 (264)12.9.4 REAL_TO转换 (264)12.9.5 TIME_TO/TIME_OF_DAY转换 (265)12.9.6 DATE_TO/DT_TO转换 (266)12.9.7 STRING_TO转换..................... (266)12.9.8 TRUNC........................................... . (266)12.10 数字功能.......................................... (267)12.10.1 ABS................................................. (267)12.10.2 SQRT.................................................... (267)12.10.3 LN........................................................... . (268)12.10.4 LOG......................................................... (268)12.10.5 EXP............................................................ . (269)12.10.6 SIN.................................................................... (269)12.10.7 COS................................................................ (270)12.10.8 TAN............................................................... (270)12.10.9 ASIN.............................................................. (270)12.10.10 ACOS.......................................................... (271)12.10.11 ATAN ........................................................ . (271)12.10.12 EXPT .. (272)目录x13.标准库中的元素 (273)13.1字符串功能 (273)13.1.1L E N (273)13.1.2L E F T (273)13.1.3R I G H T (274)13.1.4M I D (274)13.1.5C O N C A T (275)13.1.6I N S E R T (276)13.1.7D E L E T E (276)13.1.8R E P L A C E (277)13.1.9F I N D (278)13.2双稳态功能块 (278)13.2.1S R (278)13.2.2R S (279)13.2.3S E M A (280)13.3触发器 (281)13.3.1R_T R I G (281)13.3.2F_T R I G (281)13.4计数器 (282)13.4.1C T U (283)13.4.2C T D (283)13.4.3C T U D (284)13.5定时器 (285)13.5.1T P (285)13.5.2T O N (286)13.5.3T O F (287)14U T I L.L I B库 (289)14.1U T I L.L I B库 (289)14.2B C D转换 (289)14.2.1B C D_T O_I N T (289)14.2.2I N T_T O_B C D_ (289)14.3位/字节功能 (290)14.3.1E X T R A C T (290)14.3.2P A C K (290)14.3.3P U T B I T (290)14.3.4U N P A C K (290)14.4数学运算 (291)14.4.1D E R I V A T I V E (291)14.4.2I N T E G R A L (291)14.4.3S T A T I S T I C S_I N T (292)14.4.4S T A T I S T I C S_R E A L (292)14.4.5V A R I A N C E (292)14.5调节器 (292)xi目录14.5.1P (292)14.5.2P D (293)14.5.3P I D (293)14.6信号发生器 (294)14.6.1B L I N K (294)14.6.2G E N (294)14.7功能处理器 (296)14.7.1C H A R C U R V E (296)14.7.2R A M P_I N T (297)14.7.3R A M P_R E A L (297)14.8模拟数值处理 (297)14.8.1H Y S T E R E S I S (298)14.8.2L I M I T A L A R M (298)索引 (299)15章节及附录的内容请参看第二部分。