您好,欢迎访问三七文档
1GEFanucPLC指令培训GEFanucAutomationShanghaiOfficeVer2.202002.32编程语言1。指令助记符(IL)2。梯形图(LD)3。顺序功能图(SFC)4。“C”语言,“BASIC”语言5。状态逻辑3编程方式手持式编程器——HHPLM90——DOSCC90——WindowsVersaPro——Windows计算机+编程软件继电器控制电路R9REV_PBFWD_PBSTOP_PBR1390940MTR_FWDR9MTR_REVR13L1L25PLC工作原理I1I2I3I4I5I6Q1Q2Q3Q4Q5Q6000000010000Q1()Q2()I1I1I2Q2CPU输出地址%Q输入地址%I用户程序数据储存(%M,%R,...)I1I2I3I4I5I6I7I8COM输入模块输出模块Q1Q2Q3Q4Q5Q6Q7Q8COM123输入扫描执行程序输出刷新通讯服务1236GEPLC地址表示形式外部地址%I%Q%AI%AQ位地址字地址地址数为自然数——例如“%R0326”内部地址%M%G%T%R%S——系统标志—位地址——寄存器—字地址中间继电器—位地址外部地址%I%Q%AI%AQ位地址字地址%AI00326表示地址地址类型地址号7指令分类——按形式分2.功能块1.继电器触点线圈——()EnableOK输入参数I1I2I3输出参数Q功能数据类型地址%R条件长度8指令分类——按功能分1。继电器功能2。定时器/计数器3。算术运算功能4。关系运算功能5。位操作功能6。数据传送功能7。数据表格功能8。转换功能9。控制功能9继电器和基本编程RelayandBasicProgrammingSeries90-30指令教程RELAYF1Shift11ZCREV_PBFWD_PBSTOP_PBFCMTR_FWDZCMTR_REVL1L2FC继电器控制电路ZCREV_PBFWD_PBSTOP_PBFCMTR_FWDZCMTR_REVL1L2FC|%I0003%I0001%I0002%Q0001+--]/[--+--][--+--]/[-----------------------()--|||||%Q0001||+--][--+||||%I0001%I0002%Q0002|+--]/[--+--][--+-------------------()--|||||%Q0002||+--][--+12继电器指令基本元素--][----]/[-more--()--(RM)--(SM)-vert|Horz-|10|4|9|8|7|6|5|3|2|1RELAYOPNSPTMRCTRMATHRELATBITOPDATAMTABLECONVRTCONTRL---++----(/M)-more--(/)---(M)---(R)---(S)---(^)---(v)-|10|4|9|8|7|6|5|3|2|1RELAYOPNSPTMRCTRMATHRELATBITOPDATAMTABLECONVRTCONTRLRELAYF1ShiftmoreF1013+——()—(/)—(S)—(R)—+—()—()继电器指令基本元素—(M)—(/M)—(SM)—(RM)触点线圈14定时器和计数器TimersandCountersSeries90-30指令教程TMRCTRofdtF2Shift15•Watch-DogTimer•ConstantSweepTimer•Time-of-DayClock•ElapsedTimeClock•TimeTickContactsPLC系统时间16定时器TMRCTRofdtF2ShiftR??????保持型延时接通定时器RPVCVONDTR0.10SF1R??????延时断开定时器OFDTF2PVCV0.10S延时接通定时器TMRF3PVCV0.10SR??????ondtrofdttmrtmbaseupctrdnctr|10|4|9|8|7|6|5|3|2|1RELAYOPNSPTMRCTRMATHRELATBITOPDATAMTABLECONVRTCONTRL17延时接通定时器TimerTMR0.1S0.01S0.001SPV%R????Address预置值—()输出端当前值预置值控制字%R%R+1%R+2连续三个R寄存器时基延时时间t=预置值×时基%I,%Q,%M,%T,%G,%R,%AI,%AQ,CONST输入端例如:%R0100,或常数:00050例如:%R0001~%R000318延时接通定时器Timer输出端预置值Enable其工作波形图如下:输入端输出端计时值预置值TS19延时断开定时器TimerOFDT0.1S0.01S0.001SPV%R????Address预置值—()输出端输入端当前值预置值控制字%R%R+1%R+2连续三个R寄存器时基延时时间t=预置值×时基%I,%Q,%M,%T,%G,%R,%AI,%AQ,CONST20延时断开定时器Timer其工作波形图如下:输入端输出端计时值预置值TS输出端预置值OFDT0.1SPV%R0001输入端21ONDTR0.1S0.01S0.001SPV%R????Address预置值—()输出端输入端当前值预置值控制字%R%R+1%R+2连续三个R寄存器时基延时时间t=预置值×时基%I,%Q,%M,%T,%G,%R,%AI,%AQ,CONSTR复位保持型定时器Timer22保持型定时器Timer其工作波形图如下:输入端输出端计时值预置值TST1T2TS=T1+T2输出端预置值ONDTR0.1SPV%R0001输入端复位R复位端23计数器TMRCTRofdtF2ShiftR??????加计数器RPVCVUPCTRF4R??????减计数器RPVCVUPCTRF5ondtrofdttmrtmbaseupctrdnctr|10|4|9|8|7|6|5|3|2|1RELAYOPNSPTMRCTRMATHRELATBITOPDATAMTABLECONVRTCONTRL24PV%R????Address预置值—()输出端输入端当前值预置值控制字%R%R+1%R+2连续三个R寄存器%I,%Q,%M,%T,%G,%R,%AI,%AQ,CONSTR复位计数器CounterUPCTRDNCTR25数学运算指令MathOperationsSeries90-30指令教程MATHmulF3Shift26算术运算ArithmeticFunction加法运算F1I1ADDINTI2Q???????????????减法运算F2I1SUBINTI2Q???????????????乘法运算F3I1MULINTI2Q???????????????除法运算F4I1DIVINTI2Q???????????????MATHmulF3Shiftaddsubmultypesdivmodasbsqrtmore|10|4|9|8|7|6|5|3|2|1RELAYOPNSPTMRCTRMATHRELATBITOPDATAMTABLECONVRTCONTRL27算术运算(1)ArithmeticFunctionEnableADDSUBMULDIVMODINTDINTREAL%I,%Q,%M,%T,%G,%R,%AI,%AQ,CONSTI2OK%I,%Q,%M,%T,%G不能用于REALQ%I,%Q,%M,%T,%G,%R,%AI,%AQ,CONSTI1ADD:Q=I1+I2SUB:Q=I1-I2MUL:Q=I1*I2DIV:Q=I1/I2MOD:Q=I1-((I1/I2)*I2)%I,%Q,%M,%T,%G,%R,%AI,%AQ28(Continued)算术运算ArithmeticFunction开方运算F6INSQRTINTQ??????????求模运算F5I1MODINTI2Q???????????????求绝对值运算F7INABSINTQ??????????MATHmulF3Shiftaddsubmultypesdivmodasbsqrtmore|10|4|9|8|7|6|5|3|2|1RELAYOPNSPTMRCTRMATHRELATBITOPDATAMTABLECONVRTCONTRL29算术运算(2)ArithmeticFunctionEnableSQRTINTDINTREALOK%I,%Q,%M,%T,%G,%R,%AI,%AQQ%I,%Q,%M,%T,%G,%R,%AI,%AQ,CONSTI1SQRT:Q=IN30函数运算ArithmeticFunctionsincostanasinacosdegatanradmore|10|4|9|8|7|6|5|3|2|1RELAYOPNSPTMRCTRMATHRELATBITOPDATAMTABLECONVRTCONTRLmoreF9log10lnexpexptmore|10|4|9|8|7|6|5|3|2|1RELAYOPNSPTMRCTRMATHRELATBITOPDATAMTABLECONVRTCONTRLmoreF931三角函数运算EnableSINCOSTANASINACOSATANREALOK%R,%AI,%AQ,CONSTINQ%R,%AI,%AQ32对数,指数运算EnableLOGLNEXPREALOK%R,%AI,%AQ,CONSTINQ%R,%AI,%AQQ=eIiQ=ln(IN)Q=log(IN)33指数运算EnableLOGLNEXPREALOK%R,%AI,%AQ,CONSTI2Q%R,%AI,%AQ%R,%AI,%AQ,CONSTI1EXP:Q=I1I234数据转换指令DataOperationsCONVRTF8ShiftSeries90-30指令教程35ConvertGroupCONVRTF8Shiftbcd-4typesworddintintrealmore|10|4|9|8|7|6|5|3|2|1RELAYOPNSPTMRCTRMATHRELATBITOPDATAMTABLECONVRTCONTRL36ConvertGroupSTARTINGDATATYPESF2F10F3F4F5F6F7F8F1F9F1F2F3types==BIT=BYTE=WORD=DWORD=UINT=INT=DINT=REAL=MORE=BCD-4=BCD-8=MIXED(Continued)IN??????????????QUINT_TO_INT37ConvertGroupEndDataTypeStartDataTypeBITBYTEWORDDWORDUINTINTDINTREALBCD-4BCD-8MixedBCD-4BCD-8UINTINTDINTREALINTDINT(Continued)38数据转换(1)Enable%I,%Q,%M,%T,%G,%R,%AI,%AQ,CONSTINTTOBCD4INOK%I,%Q,%M,%T,%G,%R,%AI,%AQQ39数据转换(2)Enable%I,%Q,%M,%T,%G,%R,%AI,%AQ,CONSTBCD4TOINTINOK%I,%Q,%M,%T,%G,%R,%AI,%AQQ40数据转换(3)Enable%R,%AI,%AQ,CONSTINTDINTWORDINOK%I,%Q,%M,%T,%G,%R,%AI,%AQQREALTO41数据转换(4)Enable%I,%Q,%M,%T,%G,%R,%AI,%AQ,CONSTINTDINTBCD4WORDINOK%R,%AI,%AQQTOREAL42数据转换(5)Enable%R,%AI,%AQ,CONSTREAL_TRUN_INOK%I,%Q,%M,%T,%G,%R,%AI,%AQQINTDINT43比较指令RelationalOperationsSeries90-30指令教程RELATNF4Shift44RelationalGroupRELATNF4Shifteqnegttypesgeltc
本文标题:指令培训
链接地址:https://www.777doc.com/doc-977881 .html