三菱PLC模拟量PID
用三菱PLC-FX2N与F940的PID控制恒压供水
一.控制的要求:〔1〕有两台水泵,按设计要求一台运行,一台备用,自动运行时泵运行累计100H轮换一次,手动时不切换;〔2〕两台水泵分别由M1、M2电动机拖动,电动机同步转速为3000转/min,由KM1、KM2控制;〔3〕切换后起动和停电后起动须5s报警,运行异常可自动切换到备用泵,并报警;〔4〕采用PLC的PID调节指令〔5〕变频器〔使用三菱FR-A540〕采用PLC的特殊功能单元FX0N-3A的模拟输出,调节电动机的转速;〔6〕水压在0~10kg可调,通过触摸屏〔使用三菱F940〕输入调节;〔7〕触摸屏可以显示设定水压、实际水压、水泵的运行时间、转速、报警信号等;〔8〕变频器的其余参数自行设定。
二.软件的设计:1.I/O分配〔1〕触摸屏输入,M500:自动起动;M100:手动1号泵;M101:手动2号泵;M102:停顿;M103:运行时间复位;M104:去除报警;D300:水压设定。
〔2〕触摸屏输出,Y0:1号泵运行指示;Y1:2号泵运行指示,T20:1号泵故障;T21:2号泵故障;D101:当前水压;D502:泵累计运行的时间;D102:电动机的转速。
〔3〕PLC输入,X1:1号泵水流开关;X2:2号泵水流开关;X3:过压保护。
〔4〕PLC输出,Y1:KM1;Y2:KM2;Y4:报警器;10:变频器STF。
2.触摸屏画面设:根据控制要求及I/O分配,按下列图1-1制作触摸屏画面。
〔三菱F940触摸屏的画面制作图1-1〕3.PLC的程序:(1).根据控制要求,PLC程序如下列图2-1,3-1所示。
〔PLCFX2N-48MR的程序梯形图图2-1〕〔PLCFX2N-48MR的程序梯形图图3-1〕(2).PLC的关键性程序构造简述:PLC得电后,通过程序把模块中的摸拟量压力信号转化成压力数字量(D160),将压力的数据存放器D160的值除以25以校正压力的实际值(由特殊功能模拟模块FX0N-3A的资料可知:因0—10kg对应的是数值是0—250,所以压力与数值的关系是1:25)。
模块七_PLC模拟量及PID控制
MSB
15 0 14 13 12 11 10 9 8 7 6 5 4 3 0 2 0 1 0
LSB
0 0
11 位数据值 电流输出数据格式
MSB
15 14 13 12 11 10 9 8 7 6 5 4 3 0 电压输出数据格式 2 0 1 0
LSB
0 0
பைடு நூலகம்
12 位数据值
任务一: 任务一: PLC模拟量控制及应用 模拟量控制及应用
任务一: 任务一: PLC模拟量控制及应用 模拟量控制及应用
4.模拟量输入/输出举例 .模拟量输入 输出举例
例2 从 模拟 量 输出 通 道AQWO 输出10V 电压, EM232的输出电压范围是-10V~10V,其数据范 围 为 -32000 ~ 32000 , 相 应 的 数 据 值 -2000 ~ 2000。
1.模拟量输入 .
(2)模拟量输入的配置
电流发送器 电压发送器 未用端子
开 关
固定端子块
配置开关 增益
增益
DIP设定开关
没有使用 24VDC电源和公共端
图7-1 EM231模拟量输入模块端子及DIP开关示意图
任务一: 任务一: PLC模拟量控制及应用 模拟量控制及应用
1.模拟量输入 .
(2)模拟量输入的配置
电流发送器 电压发送器 未用端子
开 关
固定端子块
配置开关 增益
增益
DIP设定开关
没有使用 24VDC电源和公共端
图7-1 EM231模拟量输入模块端子及DIP开关示意图
任务一: 任务一: PLC模拟量控制及应用 模拟量控制及应用
1.模拟量输入 .
(2)模拟量输入的配置
电流变送器 电压变送器 空闲端子
3PLC程序的PID参数的设定与调节(精)
PID参数的设置与调节PID控制简介目前工业自动化水平已成为衡量各行各业现代化水平的一个重要标志。
同时,控制理论的发展也经历了古典控制理论、现代控制理论和智能控制理论三个阶段。
智能控制的典型实例是模糊全自动洗衣机等。
自动控制系统可分为开环控制系统和闭环控制系统。
一个控控制系统包括控制器﹑传感器﹑变送器﹑执行机构﹑输入输出接口。
控制器的输出经过输出接口﹑执行机构﹐加到被控系统上﹔控制系统的被控量﹐经过传感器﹐变送器﹐通过输入接口送到控制器。
不同的控制系统﹐其传感器﹑变送器﹑执行机构是不一样的。
比如压力控制系统要采用压力传感器。
电加热控制系统的传感器是温度传感器。
目前,PID控制及其控制器或智能PID控制器(仪表)已经很多,产品已在工程实际中得到了广泛的应用,有各种各样的PID控制器产品,各大公司均开发了具有PID参数自整定功能的智能调节器(intellig ent regulator),其中PID控制器参数的自动调整是通过智能化调整或自校正、自适应算法来实现。
有利用PID控制实现的压力、温度、流量、液位控制器,能实现PID控制功能的可编程控制器(PLC),还有可实现PID控制的PC系统等等。
可编程控制器(PLC)是利用其闭环控制模块来实现PID控制,而可编程控制器(PLC)可以直接与Cont rolNet相连,如Rockwell的PLC-5等。
还有可以实现PID控制功能的控制器,如Rockwell的Logix产品系列,它可以直接与Contro lNet相连,利用网络来实现其远程控制功能。
1、开环控制系统开环控制系统(open-loop control system)是指被控对象的输出(被控制量)对控制器(controller)的输出没有影响。
在这种控制系统中,不依赖将被控量反送回来以形成任何闭环回路。
2、闭环控制系统闭环控制系统(closed-loop control system)的特点是系统被控对象的输出(被控制量)会反送回来影响控制器的输出,形成一个或多个闭环。
三菱PLC(温度PID)实验
三菱PLC(温度PID)实验指导书主讲:雷老师湖北祥辉电气自动化培训中心温度PID控制实验一、实验目的熟悉使用三菱FX系列的PID控制,通过对实例的模拟,熟练地掌握PLC控制的流程和程序调试。
二、实验设备1.THPLC-D型(挂箱式)实验装置一台2.FM-26温度控制挂箱一个(包含Pt100热电偶一个)3.计算机一台(或与FX0N系列PLC相配套的手持编程器一个)4.PC/PLC编程数据线一根5.实验导线若干三、接线“Pt100输入”接电热偶(注意补偿端的连线);“加热指示”和“冷却风扇”接PLC 主机24V电源;“控制输入”接模拟量模块(FXon-3A)的IOUT和COM;“信号输出”接模拟量模块(FXon-3A)的VIN1和COM1。
四、实验原理(1)本实验说明本实验为温度PID控制的演示实验。
其中,系统中的Pt100为热电偶,用来监测受热体的温度,并将采集到的温度信号送入变送器,再由变送器输出单极性模拟电压信号,到模拟量模块,经内部运算处理后,输出模拟量电流信号到调压模块输入端,调压模块根据输入电流的大小,改变输出电压的大小,并送至加热器。
欲使受热体维持一定的温度,则需一风扇不断给其降温。
这就需要同时有一加热器以不同加热量给受热体加热,这样才能保证受热体温度恒定。
本系统的给定值(目标值)是受热体温度为50℃时的值,可以预先设定后直接输入到回路中;过程变量由在受热体中的Pt100测量并经温度变送器给出,为单极性电压模拟量;输出值是送至加热器的电压,其允许变化范围为最大值的0%至100%。
(2)理解FXon系列的PID功能指令FXon系列的PID回路运算指令的功能指令编号为FNC88,源操作数[S1],[S2],[S3]和目标操作数均为D,16位运算占9个程序步,[S1],[S2]分别用来存放给定值SV和当前测量到的反馈值PV,[S3]--[S3]+6用来存放控制参数的值,运算结果MV存放在[D]中。
三菱PLC自学资料PID若何设置参数[整理版]
文档从互联网中收集,已重新修正排版,word格式支持编辑,如有帮助欢迎下载支持。
可编程控制器概况可编程控制器(PROGRAMMABLE CONTROLLER,简称PC)。
与个人计算机的PC相区别,用PLC表示。
PLC是在传统的顺序控制器的基础上引入了微电子技术、计算机技术、自动控制技术和通讯技术而形成的一代新型工业控制装置,目的是用来取代继电器、执行逻辑、记时、计数等顺序控制功能,建立柔性的程控系统。
国际电工委员会(IEC)颁布了对PLC的规定:可编程控制器是一种数字运算操作的电子系统,专为在工业环境下应用而设计。
它采用可编程序的存贮器,用来在其内部存贮执行逻辑运算、顺序控制、定时、计数和算术运算等操作的指令,并通过数字的、模拟的输入和输出,控制各种类型的机械或生产过程。
可编程序控制器及其有关设备,都应按易于与工业控制系统形成一个整体,易于扩充其功能的原则设计。
PLC具有通用性强、使用方便、适应面广、可靠性高、抗干扰能力强、编程简单等特点。
可以预料:在工业控制领域中,PLC控制技术的应用必将形成世界潮流PLC程序既有生产厂家的系统程序,又有用户自己开发的应用程序,系统程序提供运行平台,同时,还为PLC程序可靠运行及信息与信息转换进行必要的公共处理。
用户程序由用户按控制要求设计。
1word格式支持编辑,如有帮助欢迎下载支持。
文档从互联网中收集,已重新修正排版,word格式支持编辑,如有帮助欢迎下载支持。
第二章PLC的结构及基本配置一般讲,PLC分为箱体式和模块式两种。
但它们的组成是相同的,对箱体式PLC,有一块CPU板、I/O板、显示面板、内存块、电源等,当然按CPU性能分成若干型号,并按I/O点数又有若干规格。
对模块式PLC,有CPU模块、I/O模块、内存、电源模块、底板或机架。
无任哪种结构类型的PLC,都属于总线式开放型结构,其I/O能力可按用户需要进行扩展与组合。
PLC的基本结构框图如下:一、CPU的构成PLC中的CPU是PLC的核心,起神经中枢的作用,每台PLC至少有一个CPU,它按PLC的系统程序赋予的功能接收并存贮用户程序和数据,用扫描的方式采集由现场输入装置送来的状态或数据,并存入规定的寄存器中,同时,诊断电源和PLC内部电路的工作状态和编程过程中的语法错误等。
三菱PID讲解
超出
[S3]+ 24 无效
Bit2: 输出变化量(增方) 超出
Bit3: 输出变化量(减方) 超出
PID 指令可以同时多次使用,但是用于运算的[S3]、[D]的数据寄存器元件号 不能重复。
PID 指令可以在定时中断、子程序、步进指令和转移指令内使用,但是应将 [S3]+7 清零(采用脉冲执行的 MOV 指令)之后才能使用。
以上公式中:△MV 是本次和上一次采样时 PID 输出量的差值,MVn 是本次的 PID 输出量;EVn 和 EVn-1 分别是本次和上一次采样时的误差,SV 为设定值;PVn 是本次采样的反馈值,PVnf、PVnf-1 和 PVnf-2 分别是本次、前一次和前两次滤 波后的反馈值,L 是惯性数字滤波的系数;Dn 和 Dn-l 分别是本次和上一次采样 时的微分部分;K p 是比例增益,T S 是采样周期,T I 和 T D 分别是积分时间 和微分时间,αD 是不完全微分的滤波时间常数与微分时间 TD 的比值。
在工业控制中,PID 控制(比例-积分-微分控制)得到了广泛的应用,这是 因为 PID 控制具有以下优点:
1)不需要知道被控对象的数学模型。实际上大多数工业对象准确的数学模 型是无法获得的,对于这一类系统,使用 PID 控制可以得到比较满意的效果。据 日本统计,目前 PID 及变型 PID 约占总控制回路数的 90%左右。
积分作用与当前误差的大小和误差的历史情况都有关系,只要误差不为零, 控制器的输出就会因积分作用而不断变化,一直要到误差消失,系统处于稳定状 态时,积分部分才不再变化。因此,积分部分可以消除稳态误差,提高控制精度, 但是积分作用的动作缓慢,可能给系统的动态稳定性带来不良影响。积分时间常 数 T I 增大时,积分作用减弱,系统的动态性能(稳定性)可能有所改善,但是 消除稳态误差的速度减慢。
三菱PLCPID调节手册
Programming ManualMitsubishi Programmable Logic ControllerQCPU(Q Mode)/QnACPU(PID Control Instructions)• SAFETY CAUTIONS •(You must read these cautions before using the product)In connection with the use of this product, in addition to carefully reading both this manual and the related manuals indicated in this manual, it is also essential to pay due attention to safety and handle the product correctly.The safety cautions given here apply to this product in isolation. For information on the safety of the PC system as a whole, refer to the CPU module User's Manual.Store this manual carefully in a place where it is accessible for reference whenever necessary, and forward a copy of the manual to the end user.REVISIONS* The manual number is given on the bottom left of the back cover.Print Date* Manual Number RevisionDec., 1999SH (NA) 080040-A First editionJun., 2001SH (NA) 080040-B Partial additionAbout Manuals, Chapter 1, Chapter 2, Section 2.1, 3.1, 3.2, 3.3, 3.3.1,4.2.3, 4.3.2, 4.3.5, Chapter 5, Section5.1, 5.2, Chapter 6, Chapter 7,Section 8.1, 8.2Japanese Manual Version SH-080022-BThis manual confers no industrial property rights or any rights of any other kind, nor does it confer any patent licenses. Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights whichmay occur as a result of using the contents noted in this manual.1999 MITSUBISHI ELECTRIC CORPORATIONINTRODUCTIONThank you for choosing the Mitsubishi MELSEC-Q/QnA Series of General Purpose Programmable Controllers. Please read this manual carefully so that the equipment is used to its optimum. A copy of this manual should be forwarded to the end User.CONTENTS1. GENERAL DESCRIPTION 1 – 1 to 1 - 21.1 PID Processing Method...........................................................................................................................1 - 22. SYSTEM CONFIGURATION FOR PID CONTROL 2 - 1 to 2 - 22.1 Applicable PLC CPU................................................................................................................................2 - 13. PID CONTROL SPECIFICATIONS 3 - 1 to 3 - 63.1 Performance Specifications.....................................................................................................................3 - 1 3.2 Operation Expressions.............................................................................................................................3 - 1 3.3 PID Control Instruction List......................................................................................................................3 - 23.3.1 How to read the instruction list..........................................................................................................3 - 33.3.2 PID operation instruction list.............................................................................................................3 - 54. PID CONTROL 4 - 1 to 4 - 124.1 Outline of PID Control..............................................................................................................................4 - 1 4.2 PID Control...............................................................................................................................................4 - 24.2.1 Operation method..............................................................................................................................4 - 24.2.2 Normal operation and reverse operation..........................................................................................4 - 24.2.3 Proportionate operation (P operation)..............................................................................................4 - 44.2.4 Integrating operation (I operation)....................................................................................................4 - 54.2.5 Differentiating operation (D operation).............................................................................................4 - 64.2.6 PID operation.....................................................................................................................................4 - 7 4.3 PID Control Functions..............................................................................................................................4 - 74.3.1 Bumpless changeover function.........................................................................................................4 - 74.3.2 MV higher/lower limit control function...............................................................................................4 - 84.3.3 Monitorning PID control with the AD57(S1) (QnACPU only)...........................................................4 - 94.3.4 Function for transfer to the SV storage device for the PV in manual mode..................................4 - 104.3.5 Changing PID Control Data or input/output Data Setting Range(High Performance model QCPU Only).........................................................................................4 - 11 5. PID CONTROL PROCEDURE 5 - 1 to 5 - 105.1 PID Control Data......................................................................................................................................5 - 35.1.1 Number of loops to be used and the number of loops to be executed in a single scan.................5 - 65.1.2 Sampling cycle..................................................................................................................................5 - 7 5.2 Input/Output Data.....................................................................................................................................5 - 86. PID CONTROL INSTRUCTIONS 6 - 1 to 6 - 27. HOW TO READ EXPLANATIONS FOR INSTRUCTIONS7 - 1 to 7 - 28. PID CONTROL INSTRUCTIONS8 - 1 to 8 - 108.1 PID Control Data Settings.........................................PIDINIT,PIDINITP................................................8 - 2 8.2 PID Control ...............................................................PIDCONT,PIDCONTP.........................................8 - 3 8.3 Monitoring PID Control Status (QnACPU only).......PID57,PID57P......................................................8 - 5 8.4 Operation Stop/Start of Designated Loop No..........PIDSTOP,PIDSTOPP,PIDRUN,PIDRUNP.........8 - 8 8.5 Parameter Change at Designated Loop...................PIDPRMW,PIDPRMWP......................................8 - 99. PID CONTROL PROGRAM EXAMPLES9 - 1 to 9 - 109.1 System Configuration for Program Examples.........................................................................................9 - 1 9.2 Program Example for Automatic Mode PID Control...............................................................................9 - 2 9.3 Program Example for Changing the PID Control Mode between Automatic and Manual....................9 - 6APPENDIX APP - 1APPENDIX 1 PROCESSING TIME LIST................................................................................................APP – 1About ManualsThe following manuals are also related to this product.In necessary, order them by quoting the details in the tables below. Related ManualsManual Name Manual Number (Model Code)High Performance model QCPU (Q mode) User's Manual(Function Explanation/Program Fundamentals)Describes the functions, programming procedures, devices, parameter types and program types necessary in program creation using QCPU (Q mode).(Option)SH-080038 (13JL98)QnACPU Programming Manual (Fundamentals)Describes how to create programs, the names of devices, parameters, and types of program.(Option)IB-66614 (13JF46)QCPU (Q mode) /QnACPU Programming Manual (Common Instructions)Describes how to use sequence instructions, basic instructions, and application instructions.(Option)SH-080039 (13JF58)QnACPU Programming Manual (Special Function)Describes the dedicated instructions for special function modules available when using theQ2ACPU(S1), Q3ACPU, and Q4ACPU.(Option)SH-4013 (13JF56)QnACPU Programming Manual (AD57 Instructions)Describes the dedicated instructions for controlling an AD57(S1) type CRT controller module available when using the Q2ACPU(S1), Q3ACPU, or Q4ACPU.(Option)IB-66617 (13JF49)QCPU (Q mode) / QnACPU Programming Manual (SFC)Describes the system components, performance specifications, and functions, protramming, debugging and error codes of MELSAP-3(Option)SH-080041 (13JF60)Q4ARCPU Programming Manual (Application PID Edition)Describes the programming procedures and device name necessary in program creation to control Applied PID using process control instructions.(Option)IB-66695 (13JF52)Before reading this manual, refer to High Performance model QCPU (Q mode) User'sManual (Function Explanation/Programming Fundamentals) and QnACPUProgramming Manual (Fundamentals) in order to confirm the programs, I/Oprocessing, and devices used with High Performance model QCPU(Q mode)/QnACPU.Describes the instructionsused for Applied PIDcontrol.Generic Names:High Performance model QCPU...Generic names for Q02CPU, Q02HCPU, Q06HCPU, Q12HCPU, Q25HCPU QnACPU ........................................Generic names for Q2ASCPU, Q2ASCPU-S1, Q2ASHCPU, Q2ASHCPU-S1, Q2ACPU, Q3ACPU, Q4ACPU, Q4ARCPUCPU module....................................Generic names for QnACPU, High Performance model QCPU1. GENERAL DESCRIPTION1 This manual describes the sequence program instructions used to execute PID controlwith the High Performance model QCPU/QnACPU.The High Performance model QCPU /QnACPU has the capability to use instructionsfor PID control as a standard feature, so PID control can be executed by loading anA/D conversion module and a D/A conversion module.In addition, the PID control status can be monitored with an AD57(S1).POINTThe Basic model QCPUs (Q00JCPU, Q00CPU, Q01CPU) are not compatible withthe PID control instructions.Use the High Performance model QCPU to use the PID control instructions.REMARKThe High Performance model QCPU is the generic term of the Q02CPU, Q02HCPU,Q06HCPU, Q12HCPU and Q25HCPU.Any of them is abbreviated to the High Performance model QCPU in this manual.1.1 PID Processing MethodThis section describes the processing method for PID control using PID controlinstructions. (For details on PID operations, see Chapter 4.)Execute PID control with PID control instructions by loading an A/D conversion moduleand a D/A conversion module, as shown in Figure 1.1.As shown in Figure 1.1, using the previously set SV (set value) and the digital PV(process value), which is read from the A/D conversion module, PID operation isexecuted to obtain the MV (manipulated value).The calculated MV (manipulated value) is output to the D/A conversion module.The sampling cycle is measured, and the PID operation is performed, when thePIDCONT instruction is executed in the sequence program, as illustrated below.PID operation in accordance with the PIDCONT instruction is executed in presetsampling cycles.MELSEC-Q/QnA2. SYSTEM CONFIGURATION FOR PID CONTROL22. SYSTEM CONFIGURATION FOR PID CONTROLThis section describes the system configuration for PID control using PID control instructions.(For details on the units and modules that can be used when configuring the system, refer to the manual for the CPU module used.)CRTOperation panelD/A conversion moduleA/D conversion moduleMain base unitExtension cableExtension base unitPV (process value) inputFor MV (manipulated value) outputFor PID control monitoring (Only QnACPU)CRT control module AD57 or AD57-S1 onlyQnACPUQCPU High Performance modelPOINT(1) For QnACPU, the reference range for SV, PV, and MV values used in PID operations is 0 to 2000. If the resolution of the A/D conversion module or D/Aconversion module used for input/output in PID control is not 0 to 2000, convert the digital values to 0 to 2000.(2) For High Performance model QCPU, a setting is selectable from fixed values as described in (1) or any appropriate values for the unit used. See Section 4.3.5for details.2.1 Applicable PLC CPUComponent ModuleHigh Performance model QCPU Q02CPU, Q02HCPU, Q06HCPU, Q12HCPU, Q25HCPUQnACPUQ2ASCPU, Q2ASCPU-S1, Q2ASHCPU, Q2ASHCPU-S1Q2ACPU, Q3ACPU, Q4ACPU, Q4ARCPU2. SYSTEM CONFIGURATION FOR PID CONTROLMELSEC-Q/QnA MEMO33. PID CONTROL SPECIFICATIONSThis section gives the specifications PID control using PID control instructions.3.1 Performance SpecificationsThe performance specifications for PID control are tabled below.SpecificationQnACPUItemWith PID Limits for HighPerformance modelQCPU Without PID Limits forHigh Performance modelQCPUNumber of PID control loops—32 loops (maximum)Sampling cycle T S 0.01 to 60.00 sPID operation method—Process value differentiation (normal operation/reverse operation)Proportionate constant K P 0.01 to 100.00Integration constant T I 0.1 to 3000.0 s PID constant setting rangeDifferential constantT D 0.00 to 300.00 sSV (set value) setting range SV 0 to +2000-32768 to +32767PV (process value) setting range PV MV (manipulated value) output range MV-50 to +2050-32768 to +327673.2 Operation ExpressionsThe operation expressions for PID control using PID control instructions are indicated below.NameOperation ExpressionsMeanings of SymbolsNormal operationEV n =PV nf *-SVMV n = MV MV=K p {(EV n -EV n-1)+ EV n - (2PV nf-1-PV nf -PV nf-2)}T S T I T DT SProcess valuedifferentiationReverse operationEV n =SV-PV nf *MV n = MVMV=K p {(EV n -EV n-1)+ EV n + (2PV nf-1-PV nf-PV nf-2)}T ST I T D T S EV n : Deviation in the present sampling cycle EV n-1: Deviation in the preceding sampling cycleSV : Set valuePV nf : Process value of the present sampling cycle (after filtering)PV nf-1: Process value of the preceding samplingcycle (after filtering)PV nf-2: Process value of the sampling cycle two cycles before (after filtering)MV : Output change amount MV n : Present manipulation amount K P : Proportionate constant T S: Sampling cycle T I : Integration constantT D: Differential constant POINT(1) *:PV nf is calculated using the following expression.Therefore, it is the same as the PV (process value) of the input data as long as the filter coefficient is not set for the input data.Process Value after Filtering PV nf = PV n + (PV nf -1-PV n )PV n : Process value of the present sampling: Filter coefficientPV nf-1: Process value of the preceding sampling cycle (after filtering)(2) PV nf is stored in the I/O data area. (See Section 5.2)3.3 PID Control Instruction ListA list of the instructions used to execute PID control is given below.CPU Instruction Name Processing DetailsQ QnAPIDINIT Sets the reference data for PID operation.*1PIDCONT Executes PID operation with the SV (set value) and the PV (process value).*1PID57Used to monitor the results of PID operation at an AD57(S1).×PIDSTOP PIDRUN Stops or starts PID operation for the set loop No.PIDPRMWChanges the operation parameters for the designated loop number to PID control data.*1: For High Performance model QCPU, PID limits can be set to ON or OFF. SeeSections 5.1 and 5.2 for the setting range used in each mode.3.3.1 How to read the instruction listThe instruction list in Section 3.3.2 has the format indicated below:Table 3.1 How to Read the Instruction ListExplanation(1) Classification of instructions according to their application.(2) Instruction names written in a sequence program.(3) Symbols used in the ladder diagram.(4) Processing for each instruction.(5) The execution condition for each instruction. Details are given below.(6) Number of instruction stepsFor details on the number of steps, refer to the QCPU (Q mode) /QnACPU Programming Manual (Common Instructions).(7) A circle indicates that subset processing is possible.For details on subset processing, refer to the QCPU (Q mode) /QnACPU Programming Manual (Common Instructions).(8) Indicates the page number in this manual where a detailed description for theinstruction can be found.3.3.2 PID operation instruction list4.2 PID ControlThe operation methods for PID control with the PID control instructions are the speedmethod and process value differentiation method. The following describes the controlexecuted for both of these methods:4.2.1 Operation method(1) Speed method operationThe speed method operation calculates amounts of changes in the MVs(manipulated values) during PID operation.The actual MV is the accumulatedamount of change of the MV calculated for each sampling cycle.(2) Process value differentiation method operationThe process value differentiation method operation executes PID operations bydifferentiating the PV (process value).Because the deviation is not subject to differentiation, sudden changes in theoutput due to differentiation of the changes in the deviation generated bychanging the set value can be reduced.Either forward operation or reverse operation can be selected to designate thedirection of PID control.4.2.2 Normal operation and reverse operation(1) In normal operation, the MV (manipulated value) increases as the PV (processvalue) increases beyond the SV (set value).(2) In reverse operation, the MV (manipulated value) increases as the PV (processvalue) decreases below the SV (set value).(3) In normal operation and reverse operation, the MV (manipulated value) becomeslarger as the difference between the SV (set value) and the PV (process value)increases.(4) The figure below shows the relationships among normal operation and reverseoperation and the MV (manipulated value), the PV (process value), and the SV(set value):(5) The figure below shows examples of process control with normal operation andreverse operation:4.2.3 Proportionate operation (P operation)The control method for proportionate operation is described below.(1) In proportionate operation, an MV (manipulated value) proportional to thedeviation (the difference between the set value and process value) is obtained.(2) The relationship between E (deviation) and the MV (manipulated value) isexpressed by the following formula:MV=Kp • EKp is a proportional constant and is called the "proportional gain".(3) The proportionate operation in step response with a constant E (deviation) isillustrated in Fig. 4.2.(4) The MV (manipulated value) changes within the range from -50 to 2050 or theuser-defined range (for High Performance model QCPU only).The MV (manipulated value) in response to the same deviation becomes largeras Kp becomes larger, thus the compensating motion is greater.(5) The proportionate operation is always associated with an offset (offset error).4.2.4 Integrating operation (I operation)The control method for integrating operation is described below.(1) In the integrating operation, the MV (manipulated value) changes continuously tozero deviation when it occurs.This operation can eliminate the offset that is unavoidable in proportionateoperation.(2) The time required for the MV in integrating operation to reach the MV forproportionate operation after the generation of deviation is called the integratingtime. Integrating time is expressed as T I.The smaller the setting for T I, the more effective the integrating operation will be.(3) The integrating operation in step response with a constant E (deviation) isillustrated in Fig. 4.3.(4) Integrating operation is always used in combination with proportionate operation(PI operation) or with proportionate and differentiating operations (PID operation).Integrating operation cannot be used independently.4.2.5 Differentiating operation (D operation)The control method for differentiating operation is described below.(1) In differentiating operation, an MV (manipulated value) proportional to thedeviation change rate is added to the system value to zero deviation when itoccurs.This operation prevents significant fluctuation at the control objective due toexternal disturbances.(2) The time required for the MV in the differentiating operation to reach the MV forthe proportionate operation after the generation of deviation is called thedifferentiating time. Differentiating time is expressed as T D.The smaller the setting for T D, the more effective the differentiating operation willbe.(3) The differentiating operation in step response with a constant E (deviation) isillustrated in Fig. 4.4.(4) Differentiating operation is always used in combination with proportionateoperation (PD operation) or with proportionate and integrating operations (PIDoperation).Differentiating operation cannot be used independently.4.2.6 PID operationThe control method when proportionate operation (P operation), integrating operation (Ioperation), and differentiating operation (D operation) are used in combination isdescribed below.(1) During PID operation, the system is controlled by the MV (manipulated value)calculated in the (P + I + D) operation.(2) PID operation in step response with a constant E (deviation) is illustrated in Fig.4.5.4.3 PID Control FunctionsDuring PID control using the PID control instructions, MV upper/lower limit control isautomatically executed by the bumpless changeover function explained below.4.3.1 Bumpless changeover functionThis function controls the MV (manipulated value) continuously when the control modeis changed between manual and automatic.When the control mode is changed between manual and automatic, data is transmittedbetween the MV area for automatic mode and the MV area for manual mode.The control mode is changed in the input/output data area (see Section 5.2).(1) Changing from the manual ...........mode to the automatic mode The MV in the manual mode is transmitted to the MV area for the automatic mode.(2) Changing from the automatic .......mode to the manual mode The MV in the automatic mode is transmitted to the MV area for the manual mode.POINT(1) Manual and automatic modes of PID control:1) Automatic modePID operation is executed with a PID control instruction.The control object is controlled according to the calculated MV.2) Manual modePID operation is not executed. The MV is calculated by the user and thecontrol object is controlled according to the user-calculated MV.(2) The loop set in the manual mode stores the PV (process value) in the set valuearea every sampling cycle.4.3.2 MV higher/lower limit control functionThe MV higher/lower limit control function controls the higher or lower limit of the MVcalculated in the PID operation. This function is only effective in the automatic mode. Itcannot be executed in the manual mode.By setting the MV higher limit (MVHL) and the MV lower limit (MVLL), the MVcalculated in the PID operation can be controlled within the range between the limits.When the MV higher/lower limit control function is used, the MV is controlled asillustrated above.A MVHL (manipulated value higher limit) and MVLL (manipulated value lower limit)takes on a value between -50 and 2050 or a user-defined value (for High Performancemodel QCPU only).The following are the default settings:• Higher limit................2000 (Or user-defined value)• Lower limit................0 (Or user-defined value)The value set for the higher limit must not be smaller than the value set for the lowerlimit.An error will occur if it is.4.3.3 Monitoring PID control with the AD57(S1) (QnACPU only)The PID control operation results can be monitored in a bar graph with an AD57(S1)CRT controller unit.(1) The monitor screen displays the monitored information of eight loops beginningwith the designated loop number.POINTThe SV, PV, and MV present value are displayed as percentages of 2000.1) SV percentage display...............SV2000100 (%)2) PV percentage display...............PV2000100 (%)3) MV percentage display...............MV2000100 (%)(2) Use the PID57 instruction to execute monitoring with an AD57(S1).See Section 8.3 for details on the PID57 instruction.4.3.4 Function for transfer to the SV storage device for the PV in manual modeThe PIDCONT instruction is also executed in manual mode.In the manual mode, it ispossible to select whether or not the PV input from the A/D conversion module onexecution of the PIDCONT instruction is transferred to the SV storage device or not inaccordance with the ON/OFF status of the PID bumpless processing flag (SM774).• When SM774 is OFF : When the PIDCONT instruction is executed, the PV istransferred to the SV storage device.On switching from the manual mode to the automaticmode, the MV output is continued from the value in themanual mode.After switching to the automatic mode, control can beswitched from the MV that was being output to the SV bychanging the SV.• When SM774 is ON : When the PIDCONT instruction is executed, the PV is nottransferred to the SV storage device.On switching from the manual mode to the automaticmode, control can be switched from the MV output in themanual mode to the SV.Before switching to the automatic mode, store a SV in theSV storage device.POINTWhen SM774 is ON or OFF, switching from the manual mode to the automaticmode may cause different control effects as follows.• When SM774 is OFF, the PV is transferred to the SV storage device.When the manual mode is switched to the automatic mode, no difference iscaused between the PV and the SV and the MV does not change rapidly, exceptthat the SV differs from a target value defined in the automatic mode.Use the sequence program to make step-by-step adjustments to the SV so thatthe SV approaches closer to the target value.See sample programs in Section 9.3.• When SM774 is ON, the PV is not transferred to the SV storage device. This maycause a difference between the PV and the SV when the manual mode isswitched to the automatic mode.A greater difference may cause the MV to change rapidly. So this procedure isused for systems in which the manual mode can be switched to the automaticmode only when the PV approaches closer tothe SV.The automatic mode can be effected without using the sequence program tomake step-by-step adjustments to the SV.REMARKThe SV and PV are stored in the devices in the I/O data area designated by thePIDCONT instruction.4.3.5 Changing the PID Control Data or Input/Output Data Setting Range (HighPerformance model QCPU Only)For High Performance model QCPU, setting ranges can be selectable for PID controldata (see Section 5.1) and input/output data (see Section 5.2). To effect the user-defined setting range, designate the loops for which PID limit settings (SD774 and SD775) are defined, and then set these loops' bits to ON before executing the PIDCONTand PIDINT instructions.SD774SD7750 : PID Limit ON (default setting)1 : PID Limit OFF (user-defined setting)A "PID Limit OFF" setting does not effect the limit control over internal data. To effectthe limit control, execute the processing by operating from the user's application side.。
三菱系列变频器PID控制参数设置及校正
三菱系列变频器PID控制参数设置及校正三菱变频器PID控制图三菱FR-F700系列变频器PID控制参数调节及校正对象:FR-F740 + 远程压力表(0-1.6MPa)+控制电机控制方式:从PU板输入目标数值,通过压力表输入实时压力测量值,变频器自动调节输出频率一、硬件设置1 短接RT和SD端子,使X14端子为ON ,。
2 短接AU和SD端子,3 将拨码开关置1,出厂时默认设置为0。
二、接线图三、参数设置·为了进行PID控制,请将X14信号置于ON。
该信号置于OFF 时,不进行PID动作,而为通常的变频器运行。
(但是,通过LONWORKS,CC-Link通讯进行PID控制时,没有必要将X14信号置于ON。
)·在变频器的端子2-5间或者Pr.133 中输入目标值,在变频器的端子4-5间输入测量值信号。
此时,Pr.128 请设定为“20或者21”。
·输入在外部计算的偏差信号时,请在端子1-5间输入。
此时,Pr.128 请设定为“10或者11”。
参数表:Pr.128=20(PID负作用)Pr.183=14(PID控制选择)Pr.267=1或2(4号端子输入电压选择,1时为0-5VDC;2时为0-10VDC)Pr.133=设定目标值(也可以从2号端子输入,详见说明书)四、参数校正将上述参数设置完成以后,保证RT端子和AU端子均和SD端子短接后,再进行参数校正。
将压力表值调节到0MPa,设置参数Pr.c6=0;将压力表值调节到1.6MPa,设置参数Pr.c7=100.这样,0-100将和0-1.6MPa等比例对应,目标值设定Pr.133中设定值(0-100)与0-1.6MPa等比例对应。
1 调整步骤2 详细校正过程(1)按变频器PU板上的MODE键,调至参数选择界面,如图:,然后旋转旋钮使界面到Pr.C参数设置界面,如图:,再按SET键进入参数号选择界面,如图:,此时字母C后的光标闪烁。
三菱系列变频器PID控制参数设置及校正
三菱变频器PID控制图三菱FR-F700系列变频器PID控制参数调节及校正对象:FR-F740 + 远程压力表(0-1.6MPa)+控制电机控制方式:从PU板输入目标数值,通过压力表输入实时压力测量值,变频器自动调节输出频率一、硬件设置1 短接RT和SD端子,使X14端子为ON ,。
2 短接AU和SD端子,3二、三、X14信号置于··11”。
参数表:四、将压力表值调节到0MPa,设置参数Pr.c6=0;将压力表值调节到1.6MPa,设置参数Pr.c7=100.这样,0-100将和0-1.6MPa等比例对应,目标值设定Pr.133中设定值(0-100)与0-1.6MPa等比例对应。
1 调整步骤2 详细校正过程(1)按变频器PU板上的MODE键,调至参数选择界面,如图:,然后旋转旋钮使界面到Pr.C参数设置界面,如图:,再按SET键进入参数号选择界面,如图:,此时字母C后的光标闪烁。
(2)将压力表值调节到0MPa并保持,然后旋转旋钮,当字母C后面数字为6时停止旋值为字母100,1.4.1.2.通过C6 (Pr.904)进行校正。
3.端子4-5间外加检测器设定的100%的输出电流(例﹕20mA)。
4.通过C7 (Pr.905)进行校正。
五、说明1 以上参数设置完成,参数校正成功后,变频器断电再次启动后,无需重新设置和校正参数。
2 校正参数前,须保证AU端子和SD端子短接,拨码开关置1(X14置ON).3 Pr.c6设置值对应4号端子输入的测量值的最小值,Pr.c7设置值对应4号端子输入的测量值的最大值,建议分别设置为0和100.4 Pr.128参数值设定PID为负作用还是正作用,当在(目标值-测量值)为正时增加执行量(输出频率),为负时减小执行量时为负作用,Pr.128设定为20;当(目标值-测量值)为负时增加执行量,为正时减小执行量,选择正作用,Pr.128设置为21.5 Pr.133中设定值为当前测量值占最大测量值的百分数。
三菱系列变频器PID控制参数设置及校正
三菱系列变频器PID控制参数设置及校正三菱变频器PID控制图三菱FR-F700系列变频器PID控制参数调节及校正对象:FR-F740 + 远程压力表(0-1.6MPa)+控制电机控制方式:从PU板输入目标数值,通过压力表输入实时压力测量值,变频器自动调节输出频率一、硬件设置1 短接RT和SD端子,使X14端子为ON ,。
2 短接AU和SD端子,3 将拨码开关置1,出厂时默认设置为0。
二、接线图三、参数设置·为了进行PID控制,请将X14信号置于ON。
该信号置于OFF 时,不进行PID动作,而为通常的变频器运行。
(但是,通过LONWORKS,CC-Link通讯进行PID控制时,没有必要将X14信号置于ON。
)·在变频器的端子2-5间或者Pr.133 中输入目标值,在变频器的端子4-5间输入测量值信号。
此时,Pr.128 请设定为“20或者21”。
·输入在外部计算的偏差信号时,请在端子1-5间输入。
此时,Pr.128 请设定为“10或者11”。
参数表:Pr.128=20(PID负作用)Pr.183=14(PID控制选择)Pr.267=1或2(4号端子输入电压选择,1时为0-5VDC;2时为0-10VDC)Pr.133=设定目标值(也可以从2号端子输入,详见说明书)四、参数校正将上述参数设置完成以后,保证RT端子和AU端子均和SD端子短接后,再进行参数校正。
将压力表值调节到0MPa,设置参数Pr.c6=0;将压力表值调节到1.6MPa,设置参数Pr.c7=100.这样,0-100将和0-1.6MPa等比例对应,目标值设定Pr.133中设定值(0-100)与0-1.6MPa等比例对应。
1 调整步骤2 详细校正过程(1)按变频器PU板上的MODE键,调至参数选择界面,如图:,然后旋转旋钮使界面到Pr.C参数设置界面,如图:,再按SET键进入参数号选择界面,如图:,此时字母C后的光标闪烁。
三菱PLC模拟量输入输出模块的应用浅析
三菱PLC模拟量输入输出模块的应用浅析摘要:本文介绍了可编程控制器(PLC)模拟量输入输出模块的基本应用,通过对FX2N-4AD模拟量输入模块和FX2N-2DA模拟量输出模块功能的简介,以及应用实例的分析,对PLC模拟量输入输出模块的应用作了一个基本的阐述。
关键词:PLC FX2N-4AD FX2N-2DA 模拟量引言:在电气控制中,存在大量的开关量,用PLC的基本单元就可以直接控制,但也常常要对一些模拟量(如压力、温度、速度等)进行控制。
PLC基本单元只能对数字量进行处理,而不能处理模拟量,如果要对模拟量进行处理,就要用特殊功能模拟量转换成数字量。
同样,PLC基本单元只能输出数字量,而大多数电气设备只能接收模拟量,所以还要把PLC输出的数字量转换成模拟量才能对电气设备进行控制,而这些则需要模拟量输出模块来完成。
1、FX2N-4AD模拟量输入模块FX2N-4AD模拟量输入模块是FX系列专用的模拟量输入模块。
该模块有4个输入通道,通道号分别为CH1、CH2、CH3和CH4。
输入通道用于将外部输入的模拟量信号转换成数字量信号,即称为A/D转换,其分辨率为12位。
FX2N-4AD模拟量模块内部有一个数据缓冲寄存器区,它由32个16位的寄存器组成,编号为BFM#0~#30。
数据缓冲寄存器内容,可以通过PLC的FROM 和TO指令来读、写。
2、FX2N-2DA模拟量输出模块FX2N-2DA模拟量输出模块是FX系列专用的模拟量输出模块。
该模块将12位的数字值转换成相应的模拟量输出。
FX2N-2DA有2路输出通道,通过输出端子变换,也可任意选择电压或电流输出状态。
电压输出时,输出信号范围为DC-10V~+10V,可接负载阻抗为1KΩ~1MΩ,分辨率为5mV,综合精度为0.1V;电流输出时,输出信号范围为DC+4mA~20mA,可接负载阻抗不大于250Ω,分辨率为20uA,综合精度为0.2mA。
FX2N-2DA模拟量输出模块有两个输出通道,可以接成电压输出,也可以接成电流输出形式,其数字量和模拟量的比例关系如图1所示。
三菱FX3UPLC和台达VFD-M变频器PID速度控制
三菱FX3UPLC和台达VFD-M变频器PID速度控制我们直接使用三菱FX3U的PID指令进行控制。
下面我们看一下PID指令的用法:S1是目标值:比如目标转速40转/分钟。
S2是测量值:比如当前实时测得的转速38转/分钟。
S3是参数数据的首个寄存器地址:例如D100,那么后面D101-D128都是PID指令相关的参数数据。
D是就是实际的输出值。
这个输出值是有范围的,需要通过参数S3+22(输出上限)和S3+23(输出下限)来限定。
这个范围是跟模拟量输出模块的量程,或者PWM波形周期有关。
比如:4DA模块输出0-10V电压,对应0-32000量程,那么S3+22就设置成32000即可,因为量程最大也就是32000,再大还是输出10V,没有实际意义。
又比如:我们用PWM的占空比控制加热棒输出功率时,周期定为1000(单位:ms),那么S3+22就设置成1000,如果设的大了,PWM 指令反而就不执行了。
所以,根据执行器的量程来设置输出上下限才行。
下面看下S3的参数表:采样时间:在本例中,控制对象是电机转速,它的实时性很强,目标值可以马上到达,因此为了提高准确性,采样时间要小一点。
而如果是控制的温度/压力值等滞后性比较强的对象,那么采样时间可以设的长点,比如温度,加热棒加热得比较慢,反馈回来的温度变化比较滞后,所以没必要设的短,较短的时间内可能测得的实时温度值基本没变化。
动作设定:bit0=0.正动作:它的表现是测量值和目标值越接近,输出值越往上升。
如本例测速,就是要正动作,测量值离目标值远,那么输出值就要慢慢增大。
bit0=1.逆动作:它的表现跟正动作相反。
测量值越接近目标值,输出值越小。
例如加温控制,当温度慢慢变大,输出就要慢慢变小,这样才不会过温。
bit1和bit2.不管它,设为0bit3.不使用,设为0bit4.当执行自整定时,该位设置为1,当自整定结束后,它会自动范围。
因此用它来对动作设定的参数重新赋值。
三菱FX2n 可编程控制器PID参数整定
三菱FX2n 可编程控制器PID参数整定
采用PID 算法的控制系统往往能收到比较好的控制效果,例如在方便米生产线烘干部分,我们采用了整定的PID参数就收到比较好的效果。
采用逼近法的控制效果烘干温度波动在7-8%,用PID经典参数反复调整办法,烘干温度波动也很不理想。
按照三菱PLC编程手册,采用正确的步骤,虽然该方便米生产线烘干部分是一个非线性、大滞后系统,也取得较好的控制效果,采用整定的PID参数,烘干温度波动在1%。
PID参数整定步骤:
1.按照三菱PLC编程手册编程,设置好PID开始整定开关。
2.建立与实际相近最好是相同的运行环境。
3.启动PID整定。
在整定过程中,用编程软件监控相关参数,
在距温度设定值还有一定值时(假如设定值为120℃,应为
100℃)就要确定整定是否完成、是否出错。
完成且未出错,
整定结束,否则调整相关参数,待温度恢复到常温时,重新
开始整定。
4.将整定好的PID参数代入运行程序(一般情况下,整定好的
PID参数控制精度都比较高),建议根据PID参数意义,调整
PID参数,温度精度能满足要求即可(因为精度高,执行器
动作频度、幅度就较大,有机械动作的执行器就容易磨损)。
我保留了方便米生产线控制程序中与PID整定有关部分,
删去无关程序,形成“三菱FX2n 可编程控制器PID参数整定”梯形图文件。
希望能对相关人员有所帮助。
方便米生产线烘干部分分成4个相互关联区,通过电动阀控制热蒸汽量,一个区有一个风机,风机前加散热器,当装有分盘后的方便米车经过该区时,热风烘干方便米。
三菱PID设定说明
1至6000
(单位:10ms)
4
比例常数(Kp)
比例常数
0.01至100.00
1至10000
(单位:0.01)
5
积分常数(Ti)
比例常数
01至3000.0
1至32767
(单位:100ms)
当设定的值小于0时,相应回路的PID不运行
∞设定的Ti超过3000.0s
6
微分常数(Td)
+12
PID的运行方式
回路2
+13
采样周期(Ts)
+14
比例常数(Kp)
+15
积分常数(Ti)
+16
微分常数(Td)
+17
过滤系数
+18
操作值下限(MVLL)
+19
操作值上限(MVHL)
+20
操作值变化率(∆MVL)
+21
过程值变化率(∆PVL)
+22
PID的运行方式
回路3
+23
采样周期(Ts)
至
至
先传一可空的程序进去清除PLC的错误,重新启动PLC。然后传正式的程序
附件里的这段程序是从主程序里剪切出来的,我在D3000~ 和D2502~ 和D449~都设置了初始值。CPU类型是Q01的,我在办公室里试过,没有报错,更改一下PLC类型,可以传到Q00j里试看看。
顺便发一段PID参数设置要求,注意最后一栏,要是超出范围的话会报4100错误
*1
0至2000
0至2000
操作值MV不作限制
*2
-32767至32767
-32767至32767
11
过程值变化率(∆PVL)
限定前一过程值跟当前过程值的变化大小
三菱QCPU(Q系列) QnACPU编程手册(PID控制指令篇)
© 1999 三菱电机
A-3
前言
非常感谢您选购了三菱通用可编程控制器的 MELSEC-Q/QnA 系列。 请在使用之前熟读本书,在充分理解-Q 系列可编程控制器的功能、性能的基础上正确地加以使用。 应确保将本手册交给最终用户。
安全注意事项 ...........................................................................A - 1 修订记录 ...............................................................................A - 3 目录 ...................................................................................A - 4 关于本手册 .............................................................................A - 6
用三菱PLC-FX2N与F940的PID控制恒压供水
之迟辟智美创作一.控制的要求:(1)有两台水泵,按设计要求一台运行,一台备用,自动运行时泵运行累计100H轮换一次,手动时不切换;(2)两台水泵分别由M1、M2电念头拖动,电念头同步转速为3000转/min,由KM1、KM2控制;(3)切换后起动和停电后起动须5s报警,运行异常可自动切换到备用泵,并报警;(4)采纳PLC的PID调节指令(5)变频器(使用三菱FR-A540)采纳PLC的特殊功能单位FX0N-3A的模拟输出,调节电念头的转速;(6)水压在0~10kg可调,通过触摸屏(使用三菱F940)输入调节;(7)触摸屏可以显示设定水压、实际水压、水泵的运行时间、转速、报警信号等;(8)变频器的其余参数自行设定.的设计:1.I/O分配(1)触摸屏输入,M500:自动起动;M100:手动1号泵;M101:手动2号泵;M102:停止;M103:运行时间复位;M104:清除报警;D300:水压设定.(2)触摸屏输出,Y0:1号泵运行指示;Y1:2号泵运行指示,T20:1号泵故障;T21:2号泵故障;D101:以后水压;D502:泵累计运行的时间;D102:电念头的转速. (3)PLC输入,X1:1号泵水流开关;X2:2号泵水流开关;X3:过压呵护.(4)PLC输出,Y1:KM1;Y2:KM2;Y4:报警器;10:变频器STF.2.触摸屏画面设:根据控制要求及I/O分配,按下图1-1制作触摸屏画面.(三菱F940触摸屏的画面制作图1-1)3.PLC的法式:(1).根据控制要求,PLC法式如下图2-1,3-1所示.(PLCFX2N-48MR的法式梯形图图2-1)(PLCFX2N-48MR的法式梯形图图3-1)(2).PLC的关键性法式结构简述:PLC得电后,通过法式把模块中的摸拟量压力信号转化成压力数字量(D160),将压力的数据寄存器D160的值除以25以校正压力的实际值(由特殊功能模拟模块FX0N-3A的资料可知:因0—10kg对应的是数值是0—250,所以压力与数值的关系是1:25).在该系统中我们规定了电念头同步转速为3000转/min,所以同步转速的设定低于3000转/min对机电的呵护是有好处的,这里我们把转速设定为不能超越1250转/min,则数值与通过PID法式运算的MV(输出)值D150(即电念头转速量)的关系为1:5(由特殊功能模拟模块FX0N-3A的资料可知: 因数值是0—250对应的是0—1250转/min,则数值与转速的关系是1:5),所以电念头的转速实际值校正数D102=D150×5÷10(其中除以10是因为所有实数介入PID的SV<设定值>D500,PV<以后值>D160,运算都是以1000%加入的.所以要获得MV<输出值>D150的实际数值需要除以10).因该系统中机电的转速是与压力成正比的,转速加年夜;压力也加年夜!(这里要注意:举措方向【S3】+1,以后值PV,D500<设定值SV,D160;即bit=1,选择逆举措)所以将压力数字量寄存器D160用于PID法式的PV(以后)数字量做为时刻检查管内的以后压力状况.4.变频器设置:(1)上限频率Pr1=50Hz;(2)下限频率Pr2=30Hz;(3)基底频率Pr3=50Hz;(4)加速时间Pr7=3s;(5)减速时间Pr8=3s;(6)电子过电流呵护Pr9=电念头的额定电流;(7)起动频率Pr13=10Hz;(8)DU面板的第三监视功能为变频繁器的输出功率Pr5=14;(9)智能模式选择为节能模式Pr60=4;(10)设定端子2~5间的频率设定为电压信号0~10V Pr73=0;(11)允许所有参数的读/写Pr160=0;(12)把持模式选择(外部运行)Pr79=2;(13)其他设置为默认值.三、系统接线:根据控制要求及I/O分配,其系统接线图如图4-1所示.(PLCFX2N-48MR系统接线图如图4-1)四、系统调试:(1)将触摸屏RS232接口与计算机连接,将触摸屏RS422接口与PLC编程接口连接,编写好FX0N-3A偏移/增益调整法式,连接好FX0N-3A I/O电路,通过GAIN和OFFSET 调整偏移/增益.(2)按图1-1设计好触摸屏画面,并设置好各控件的属性,按图2-1,3-1所示编写好PLC法式,并传送到触摸屏和PLC.(3)将PLC运行开关坚持OFF,法式设定为监视状态,按触摸屏上的按钮,观察法式触点举措情况,如举措不正确,检查触摸屏属性设置和法式是否对应.(4)系统时间应正确显示.(5)改变触摸屏输入寄存器值,观察法式对应寄存器的值变动.(6)按(图4-1)连接好PLC的I/O线路和变频器的控制电路及主电路.(7)将PLC运行开关坚持ON,设定水压调整为3kg.(8)按手动起动,设备应正常起动,观察各设备运行是否正常,变频器输出频率是否相对平稳,实际水压与设定的偏差.(9)如果水压在设定值上下有剧烈的颤动,则应该调节PID指令的微分参数,将值设定小一些,同时适当增加积分参数值.如果调整过于缓慢,水压的上下偏差很年夜,则系统比例常数太年夜,应适当减小.(10)测试其他功能,是否跟控制要求相符.。
用三菱PLC实现PID控制变频器
用三菱PLC-FX2N与F940变频器设计一个带PID控制的恒压供水系统控制要求:(1)有两台水泵,按设计要求一台运行,一台备用,自动运行时泵运行累计100小时轮换一次,手动时不切换。
(2)两台水泵分别由m1、m2电动机拖动,电动机同步转速为3000转/min,由km1、km2控制。
(3)切换后起动和停电后起动须5s报警,运行异常可自动切换到备用泵,并报警.(4)采用plc的pid调节指令。
(5)变频器(使用三菱fr—a540)采用plc的特殊功能单元fx0n-3a的模拟输出,调节电动机的转速。
(6)水压在0~10kg可调,通过触摸屏(使用三菱f940)输入调节.(7)触摸屏可以显示设定水压、实际水压、水泵的运行时间、转速、报警信号等.(8)变频器的其余参数自行设定。
软件设计:1.fx2n-48mrplc 的i/o分配:根据控制要求及i/o分配,其系统接线图如图所示.plc输入,x1:1号泵水流开关;x2:2号泵水流开关;x3:过压保护。
plc输出,y1:km1;y2:km2;y4:报警器;10:变频器stf。
2.触摸屏画面设:根据控制要求及i/o分配,制作触摸屏画面。
触摸屏输入:m500:自动起动。
m100:手动1号泵。
m101:手动2号泵。
m102:停止.m103:运行时间复位。
m104:清除报警.d300:水压设定。
触摸屏输出:y0:1号泵运行指示。
y1:2号泵运行指示。
t20:1号泵故障。
t21:2号泵故障。
d101:当前水压。
d502:泵累计运行的时间。
d102:电动机的转速。
3. plc的程序:根据控制要求,画出fx2n-48mr的程序梯形图、plc程序如下图所示。
此主题相关图片如下,点击图片看大图:plc的程序简述:plc得电后,通过程序把模块中的摸拟量压力信号转化成压力数字量(d160),将压力的数据寄存器d160的值除以25以校正压力的实际值(由特殊功能模拟模块fx0n-3a的资料可知:因0—10kg 对应的是数值是0—250,所以压力与数值的关系是1:25)。