{"id":3123,"date":"2026-11-17T18:36:34","date_gmt":"2026-11-17T10:36:34","guid":{"rendered":"https:\/\/resource.fatek.com\/index.php\/2026\/11\/17\/mplc-m05-zh-03\/"},"modified":"2026-11-17T18:36:34","modified_gmt":"2026-11-17T10:36:34","slug":"mplc-m05-zh-03","status":"publish","type":"post","link":"https:\/\/resource.fatek.com\/index.php\/2026\/11\/17\/mplc-m05-zh-03\/","title":{"rendered":"\u7b2c3\u7ae0 Uperlogic ST\u7684\u7a0b\u5f0f\u57fa\u672c\u67b6\u69cb"},"content":{"rendered":"<h3>3-1 \u7c21\u4ecb<\/h3>\n<p>\u672c\u7ae0\u5c0d\u4f7f\u7528\u57fa\u672cST\u8a9e\u8a00\u7de8\u5beb\u7a0b\u5f0f\u7684\u65b9\u6cd5\u9032\u884c\u8aaa\u660e\u3002<\/p>\n<h4>3-1-1 \u5b57\u5143\u7de8\u78bc<\/h4>\n<p>ST \u7de8\u8f2f\u5668\u652f\u6301Unicode(encode in UTF-8)\u591a\u570b\u8a9e\u8a00\u3002\u652f\u63f4\u7a0b\u5f0f\u7de8\u8f2f\u4e2d\u51fa\u73fe\u7684\u65e5\u8a9e\u3001\u82f1\u8a9e\u3001\u4e2d\u6587\u7b49\u591a\u7a2e\u8a9e\u8a00\u7684\u57fa\u672c\u5b57\u5143\u53ca\u5927\u90e8\u5206\u7b26\u865f\uff0c\u9664\u4e86\u53ef\u4ee5\u7528\u4e8e\u8a3b\u89e3\u5916\uff0c\u9084\u53ef\u4ee5\u7528\u4e8e\u6a19\u7c64\u6216\u7a0b\u5f0f\u3001\u8868\u683c\u540d\u4e2d\u3002<\/p>\n<h4>3-1-2 \u69cb\u6210\u55ae\u4f4d<\/h4>\n<p>ST\u8a9e\u8a00\u4f7f\u7528\u4ee5\u4e0b\u8a18\u865f\u7684\u7d44\u5408\u6558\u8ff0\u7a0b\u5f0f\u3002\u5f8c\u9762\u7684\u7ae0\u7bc0\u6703\u5728\u7d30\u90e8\u89e3\u8aaa<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"2\">\n<p>\u985e\u578b<\/p>\n<\/td>\n<td>\n<p>\u7bc4\u4f8b<\/p>\n<\/td>\n<td>\n<p>\u53c3\u8003<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>\u904b\u7b97\u7b26\u865f<\/p>\n<\/td>\n<td>\n<p>+\u3001-\u3001*\u3001\/\u3001AND\u3001&amp;\u3001OR\u3001|\u3001XOR\u3001MOD\u3001 &lt;=\u3001 &gt;=\u3001&lt;&gt;\u3001++\u3001&#8211;\u3001&lt;&lt;\u3001&gt;&gt;\u3001NOT\u3001:=\u3001(\u3001)<\/p>\n<\/td>\n<td>\n<p>3-4\u904b\u7b97\u5143\uff08Operand\uff09\u8207\u904b\u7b97\u5b50\uff08Operator\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>\u63a7\u5236\u8a9e\u6cd5\u7684\u95dc\u9375\u5b57<\/p>\n<p>(\u5b9a\u7fa9\u7684\u6a19\u6e96\u8b58\u5225\u7b26\u865f)<\/p>\n<\/td>\n<td>\n<p>IF\u3001ELSEIF\u3001END_IF<\/p>\n<p>CASE\u3001OF\u3001END_CASE<\/p>\n<p>WHILE\u3001FOR\u3001END_WHILE<\/p>\n<p>END_FOR<\/p>\n<p>LBL<\/p>\n<p>GOTO\u3001CALL\u3001<\/p>\n<p>LBL_F\u3001GOTO_F<\/p>\n<p>IF_RISINGTRIGGER<\/p>\n<p>IF_FALLINGTRIGGER<\/p>\n<\/td>\n<td>\n<p>3-6\u6d41\u7a0b\u63a7\u5236\u8207\u8ff4\u5708<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>\u8b58\u5225\u7b26\u865f<\/p>\n<\/td>\n<td>\n<p>\u8b8a\u6578, \u786c\u9ad4\u66ab\u5b58\u5668,IO\u9ede\u4f4d,\u9593\u63a5\u5b9a\u5740&#8230;.etc<\/p>\n<p>(\u6a19\u7c64\u3001\u5143\u4ef6\u7b49)<\/p>\n<\/td>\n<td>\n<p>X0\u3001Y0\u3001M100\u3001R0\u3001DR0\u3001D0\u3001DD0\u3001IM0\u2026etc<\/p>\n<p>Tag(\u8a3b\u518a\u4efb\u610f\u7684\u540d\u7a31)<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u51fd\u5f0f\u547c\u53eb(FCM)<\/p>\n<\/td>\n<td>\n<p>1.\u7cfb\u7d71\u5167\u5efaFunction<\/p>\n<p>2.FCM\u51fd\u5f0f\u5eab<\/p>\n<\/td>\n<td>\n<p>3-14\u547c\u53ebFCM\u51fd\u6578<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>\u5e38\u6578<\/p>\n<\/td>\n<td>\n<p>\u6574\u6578: \u9810\u8a2d\u70basigned int  <\/p>\n<p>      Ex:  <strong>R0<\/strong>:=1;  <strong>R0<\/strong>:=-2;<\/p>\n<p>     Unsigned int <\/p>\n<p>      Ex:  <strong>Tag0<\/strong>:=0xFF;<\/p>\n<p>\u5b57\u4e32: \u53ea\u80fd\u4f7f\u7528\u5728 Label \u4e0a<\/p>\n<p>     Goto, LBL&#8230;etc<\/p>\n<p>Bit (Bool) Type:  <\/p>\n<p> TRUE\u3001FALSE<\/p>\n<p>Float:   32\u4f4d\u5143\u6d6e\u9ede\u5e38\u6578 <\/p>\n<p>     ex:  TagFloat1:=1.1;   <\/p>\n<\/td>\n<td>\n<p>3-7-4\u5e38\u6578<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>\u5206\u9694\u7b26\u865f<\/p>\n<\/td>\n<td>\n<p>\u5206\u865f\u300e:\u300f <strong>\u51fa\u73fe\u5728CASE OF \u4e2d<\/strong><\/p>\n<p>\u5206\u9694\u300e,\u300f  \u591a\u500b\u51fd\u5f0f\u53c3\u6578\u50b3\u905e\u4f7f\u7528<\/p>\n<\/td>\n<td>\n<p>3-6-3 Case Of<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>\u5de6\u53f3\u5c0f\u62ec\u5f27<\/p>\n<\/td>\n<td>\n<p>\u300e(\u300f ,\u300e )\u300f<\/p>\n<ol>\n<li>\u51fd\u5f0f\u547c\u53eb \u7684\u53c3\u6578\u958b\u59cb\u7d50\u5c3e<\/li>\n<\/ol>\n<p>  ex: Fun0 ( S:=R0, D:=R1 );<\/p>\n<ol>\n<li>\u5f37\u5236\u666e\u901a\u904b\u7b97\u5b50\u7684\u512a\u5148\u9806\u5e8f<\/li>\n<\/ol>\n<p>  R0:= (1+R0)*R2;<\/p>\n<\/td>\n<td>\n<p>3-4-1 ( )<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>RETURN<\/p>\n<\/td>\n<td>\n<p>\u53ef\u4ee5\u7acb\u5373\u96e2\u958b\u8a72\u7a0b\u5f0f\u5340\u6bb5<\/p>\n<\/td>\n<td>\n<p>3-6-6\tLabel &amp; Jump\/Call<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>\u300e;\u300f \u63cf\u8ff0\u53e5\u7d50\u5c3e<\/p>\n<\/td>\n<td>\n<p>\u7528\u65bc\u6a19\u660e\u4e00\u6bb5\u7a0b\u5f0f\u6558\u8ff0\u53e5\u7684\u7d50\u675f<\/p>\n<\/td>\n<td>\n<p>&#8211;<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u5404\u8a18\u865f\u4e4b\u9593\u53ef\u4ee5\u81ea\u7531\u63d2\u5165\u7a7a\u767d\u3001\u63db\u884c\u53ca\u6ce8\u91cb\u3002<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>\u985e\u578b<\/p>\n<\/td>\n<td>\n<p>\u7bc4\u4f8b<\/p>\n<\/td>\n<td>\n<p>\u53c3\u8003<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u7a7a\u767d<\/p>\n<\/td>\n<td>\n<p>\u7a7a\u683c(\u5168\u5f62\/\u534a\u5f62)\u3001TAB<\/p>\n<\/td>\n<td>\n<p>\uff0d<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u63db\u884c<\/p>\n<\/td>\n<td>\n<p>\u63db\u884c\u4ee3\u78bc<\/p>\n<\/td>\n<td>\n<p>\uff0d<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u8a3b\u89e3<\/p>\n<\/td>\n<td>\n<p>\/\/\u3001(* &#8230;. *)<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>3-2 \u6558\u8ff0\u53e5<\/h3>\n<p>\u6558\u8ff0\u53e5\u662f ST \u8a9e\u8a00\u4e2d\u6700\u57fa\u672c\u7684\u57f7\u884c\u55ae\u4f4d\uff0c\u5b83\u4ee3\u8868\u7684\u662f\u4e00\u500b\u53ef\u88ab\u5b8c\u6574\u57f7\u884c\u7684\u5de5\u4f5c\u3002\u4e00\u500b\u5b8c\u6574\u6558\u8ff0\u53e5\u7684\u5448\u73fe\u53ef\u80fd\u4e26\u4e0d\u4fb7\u9650\u5728\u540c\u4e00\u884c\u6587\u5b57\u7576\u4e2d\uff0c\u4f46\u5b83\u5fc5\u5b9a\u662f\u4ee5\u5206\u865f\u300e\uff1b\u300f\u4f86\u505a\u70ba\u8a72\u6558\u8ff0\u53e5\u7684\u7d50\u5c3e\u3002\u53e6\u5916\uff0c\u4e00\u500b\u6558\u8ff0\u53e5\u4e2d\u4e5f\u5141\u8a31\u518d\u5305\u542b\u591a\u500b\u6216\u591a\u5c64\u7684\u5b50\u6558\u8ff0\u53e5\uff0c\u4e14\u4e0d\u8ad6\u5176\u6558\u8ff0\u53e5\u6240\u8655\u7684\u4f4d\u7f6e\u70ba\u4f55\uff0c\u53ea\u8981\u662f\u4e00\u500b\u6558\u8ff0\u53e5\u7684\u7d50\u5c3e\uff0c\u6700\u5f8c\u5fc5\u5b9a\u6703\u8ddf\u96a8\u8457\u300e\uff1b\u300f\u7b26\u865f\u3002<\/p>\n<p>                       <img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-001.png\" \/><\/p>\n<p>\u4e00\u500b\u5b8c\u6574\u7684\u6558\u8ff0\u53e5\u76f8\u7576\u65bc\u4e00\u500b\u5177\u5099\u5b8c\u6574\u529f\u80fd\u7684\u968e\u68af\u5716\u5340\u6bb5\uff08NETWORK\uff09\uff0c\u5b83\u5fc5\u9808\u80fd\u5920\u660e\u78ba\u7684\u8868\u9054\u4e00\u4ef6\u5de5\u4f5c\u3002\u4ee5\u4e0a\u8ff0\u7a0b\u5f0f\u4e2d\u7684\u6558\u8ff0\u53e5\u70ba\u4f8b\uff0c\u5b83\u6240\u57f7\u884c\u7684\u5de5\u4f5c\u4fbf\u662f\u5c07\u5404\u88dd\u7f6e\u7684\u5167\u5bb9\u503c\u4f9d\u7167\u6578\u5b78\u5f0f\u8868\u9054\u7684\u9806\u5e8f R0*\uff08R1+R2\uff09 \u4f86\u9032\u884c\u904b\u7b97\uff0c\u4e26\u5c07\u904b\u7b97\u7684\u7d50\u679c\u6307\u5b9a\u7d66\u88dd\u7f6e R10\uff1b\u4f46\u5982\u4e0b\u5716\u7d05\u8272\u6846\u7dda\u4e2d\u7684\u5167\u5bb9\u96d6\u7136\u5408\u6cd5\uff0c\u4f46\u4e0d\u662f\u4e00\u500b\u5b8c\u6574\u7684\u6558\u8ff0\u53e5\uff0c\u5b83\u53ea\u662f\u4e00\u500b\u8868\u9054\u5f0f\uff08Expression\uff09\uff0c\u4ee3\u8868\u7684\u53ea\u662f\u4e00\u500b\u6578\u5b78\u904b\u7b97\u7684\u6578\u503c\uff0c\u537b\u4e0d\u662f\u4e00\u4ef6\u5177\u9ad4\u7684\u5de5\u4f5c\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-002.png\" \/><\/p>\n<p>\u4ee5\u4e0b\u5c07\u63d0\u4f9b\u5e7e\u500bUperlogic\u7d50\u69cb\u5316\u8a9e\u8a00\u7684\u6558\u8ff0\u53e5:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-003.png\" \/><\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"2\">\n<p>\u985e\u578b<\/p>\n<\/td>\n<td>\n<p>\u5167\u5bb9<\/p>\n<\/td>\n<td>\n<p>\u7bc4\u4f8b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>\u5206\u914d\u6558\u8ff0\u53e5<\/p>\n<\/td>\n<td>\n<p>\u5c07\u53f3\u908a\u7684\u7d50\u679c\u4ee3\u5165\u5de6\u908a\u7684\u8b8a\u6578<\/p>\n<\/td>\n<td>\n<p>:=<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>\u6d41\u7a0b\u63a7\u5236\u8a9e\u6cd5<\/p>\n<\/td>\n<td>\n<p>\u9078\u64c7\u6558\u8ff0\u53e5(IF\u3001CASE)<\/p>\n<\/td>\n<td>\n<p>\u6839\u64da\u689d\u4ef6\u9078\u64c7\u57f7\u884c\u7684\u8a9e\u6cd5<\/p>\n<\/td>\n<td>\n<p>3-6-1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u5faa\u74b0\u8655\u7406\u6558\u8ff0\u53e5(FOR\u3001WHILE)<\/p>\n<\/td>\n<td>\n<p>\u6839\u64da\u7d50\u675f\u689d\u4ef6\uff0c\u591a\u6b21\u57f7\u884c<\/p>\n<\/td>\n<td>\n<p>3-6-2<\/p>\n<p>3-6-4<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>\u5b50\u7a0b\u5f0f\u8a9e\u53e5<\/p>\n<\/td>\n<td>\n<p>FCM\u8abf\u7528\u8a9e\u53e5<\/p>\n<\/td>\n<td>\n<p>\u8abf\u7528FB(FCM)<\/p>\n<\/td>\n<td>\n<p>3-14<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u6a19\u7c64\u8a9e\u53e5<\/p>\n<\/td>\n<td>\n<p>\u8abf\u7528LBL<\/p>\n<\/td>\n<td>\n<p>3-6-6<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>\u5de5\u5177\u7bb1\u8a9e\u53e5<\/p>\n<\/td>\n<td>\n<p>\u5c07\u5de5\u5177\u7bb1\u6307\u4ee4\u8abf\u7528\u7684\u65b9\u4fbf\u8a9e\u53e5<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u6d41\u7a0b\u63a7\u5236\u8a9e\u6cd5\u53ef\u5206\u5c64\u3002(\u53ef\u4ee5\u642d\u914d\u9078\u64c7\u8a9e\u53e5\u3001\u5faa\u74b0\u8655\u7406\u8a9e\u53e5\u6df7\u5408\u591a\u5c64\u4f7f\u7528)<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-004.png\" \/><\/p>\n<h3>3-3 \u8868\u9054\u5f0f\uff08Expression\uff09<\/h3>\n<p>\u8868\u9054\u5f0f\u5728\u6558\u8ff0\u53e5\u7d50\u69cb\u7576\u4e2d\u662f\u4e00\u500b\u76f8\u7576\u91cd\u8981\u7684\u7d44\u6210\u5143\u7d20\uff0c\u5b83\u4ee3\u8868\u7684\u662f\u4e00\u500b\u300c\u503c\u300d\uff0c\u4f8b\u5982 TRUE \u6216 FALSE \u7684\u5e03\u6797\u503c\uff0c\u4ea6\u6216\u662f20\u6216 -5 \u7684\u6574\u6578\u503c\uff1b\u800c\u8868\u9054\u5f0f\u8996\u4f7f\u7528\u7684\u5834\u5408\uff0c\u53ef\u4ee5\u662f\u4e00\u500b\u904b\u7b97\u5f0f\u6216\u662f\u4e00\u500b\u5e38\u6578\uff0c \u7576\u7136\u4e5f\u53ef\u4ee5\u662f\u4e00\u500b\u8b8a\u6578\u7b26\u865f\u6216\u88dd\u7f6e\u3002\u4e0b\u5217\u4fbf\u662f\u4e00\u4e9b\u8868\u9054\u5f0f\u7684\u4f8b\u5b50\u3002<\/p>\n<p>\u25a0 M0 &amp; M1\uff08\u5e03\u6797\u503c\u7684\u8868\u9054\u5f0f\uff09 \u6b64\u8868\u9054\u5f0f\u6240\u4ee3\u8868\u7684\u662f M0 \u8207 M1 \u9032\u884c &amp; \u904b\u7b97\u5f8c\u7684\u5e03\u6797\u503c\u3002<\/p>\n<p>\u25a0 M0 = FALSE\uff08\u5e03\u6797\u503c\u7684\u8868\u9054\u5f0f\uff09 \u6b64\u8868\u9054\u5f0f\u6240\u4ee3\u8868\u7684\u662f\u300cM0 = FALSE\u300d\u9019\u500b\u689d\u4ef6\u662f\u5426\u6210\u7acb\u3002<\/p>\n<p>\u25a0 M0 \uff08\u5e03\u6797\u503c\u7684\u8868\u9054\u5f0f\uff09 \u6b64\u8868\u9054\u5f0f\u5247\u76f4\u63a5\u4ee5 M0 \u7684\u503c\u7576\u4f5c\u5176\u4ee3\u8868\u7684\u5e03\u6797\u503c\u3002<\/p>\n<p>\u25a0 D1 + D2\uff08\u6578\u503c\u7684\u8868\u9054\u5f0f\uff09 \u6b64\u8868\u9054\u5f0f\u4ee3\u8868\u7684\u6578\u503c\u70ba D1 \u8207 D2 \u76f8\u52a0\u5f8c\u7684\u904b\u7b97\u7d50\u679c\u3002<\/p>\n<p>\u25a0 D0\uff08\u6578\u503c\u7684\u8868\u9054\u5f0f\uff09 \u6b64\u8868\u9054\u5f0f\u5247\u76f4\u63a5\u4ee5 D0 \u7684\u73fe\u5728\u503c\u505a\u70ba\u5176\u4ee3\u8868\u7684\u6578\u503c\u3002<\/p>\n<p>\u25a0 D2 = D0 + D1\uff08\u5e03\u6797\u503c\u7684\u8868\u9054\u5f0f\uff09 \u5b83\u4ee3\u8868\u7684\u662f\u300cD2=D0+D1\u300d\u9019\u500b\u689d\u4ef6\u662f\u5426\u6210\u7acb\u3002\u4e5f\u5c31\u662f\u8aaa\u7576 D0 \u8207 D1 \u76f8\u52a0\u7684\u7d50\u679c\u7b49\u65bc D2 \u7684\u73fe\u5728\u503c\u6642\uff0c\u8868\u9054\u5f0f\u4ee3\u8868\u7684\u4fbf\u662f\u5e03\u6797\u503c TRUE\uff1b\u76f8\u53cd\u7684\uff0c\u5982\u679c D0 \u8207 D1 \u76f8\u52a0\u7684\u7d50\u679c\u4e0d\u7b49\u65bc D2 \u7684\u73fe\u5728\u503c\u6642\uff0c\u8868\u9054\u5f0f\u6240\u4ee3\u8868\u7684\u5373\u662f\u5e03\u6797\u503c FALSE\u3002<\/p>\n<p>\u25a0 D2 := D0 + D1\uff1b\uff08\u6558\u8ff0\u53e5\uff0c\u975e\u8868\u9054\u5f0f\u3002\uff09 \u6b64\u70ba\u4e00\u500b\u5b8c\u6574\u7684\u6558\u8ff0\u53e5\u800c\u975e\u8868\u9054\u5f0f\uff0c\u5176\u4ee3\u8868\u7684\u610f\u7fa9\u662f\u300c\u5c07 D0 \u8207 D1 \u7684\u76f8\u52a0\u7d50\u679c\u6307\u5b9a\u7d66 D2\u300d\u7684\u5de5\u4f5c\uff1b\u4e0d\u904e\u9019\u500b\u6558\u8ff0\u53e5\u4e5f\u662f\u7531\u300cD2\u300d\u300cD0+D1\u300d\u9019\u5169\u500b\u8868\u9054\u5f0f\u6240\u7d44\u6210\u7684\u3002<\/p>\n<p>\u8868\u9054\u5f0f\u7684\u4f7f\u7528\u4f4d\u7f6e<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-005.png\" \/><\/p>\n<p>\u4e0b\u8868\u6240\u793a\u70ba\u8868\u9054\u5f0f\u7684\u985e\u578b<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"2\">\n<p>\u985e\u578b<\/p>\n<\/td>\n<td>\n<p>\u8868\u9054\u5f0f(\u904b\u7b97\u7d50\u679c)\u7684\u8cc7\u6599\u985e\u578b<\/p>\n<\/td>\n<td>\n<p>\u7bc4\u4f8b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"3\">\n<p>\u904b\u7b97\u8868\u9054\u5f0f<\/p>\n<\/td>\n<td>\n<p>\u7b97\u8853\u8868\u9054\u5f0f<\/p>\n<\/td>\n<td>\n<p>\u6574\u6578\u3001\u5be6\u6578\u7b49(\u4f9d\u64da\u904b\u7b97\u7269\u4ef6)<\/p>\n<\/td>\n<td>\n<p>R0+R2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u908f\u8f2f\u8868\u9054\u5f0f<\/p>\n<\/td>\n<td>\n<p>\u5e03\u6797\u503c(TRUE\/FALSE)<\/p>\n<\/td>\n<td>\n<p>R0 AND R2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u6bd4\u8f03\u8868\u9054\u5f0f<\/p>\n<\/td>\n<td>\n<p>\u5e03\u6797\u503c(TRUE\/FALSE)<\/p>\n<\/td>\n<td>\n<p>R0 &gt; R2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>\u57fa\u672c\u8868\u9054\u5f0f<\/p>\n<\/td>\n<td>\n<p>\u8b8a\u6578\u3001\u5e38\u6578<\/p>\n<\/td>\n<td>\n<p>\u5b9a\u7fa9\u7684\u8cc7\u6599\u985e\u578b<\/p>\n<\/td>\n<td>\n<p>M0.R0.123.TRUE<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u51fd\u6578\u8abf\u7528\u8868\u9054\u5f0f<\/p>\n<\/td>\n<td>\n<p>\u8fd4\u56de\u503c\u7684\u8cc7\u6599\u985e\u578b<\/p>\n<\/td>\n<td>\n<p>Fcm0( PA0:= ,OUT0=&gt; );<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h4>3-3-1 \u904b\u7b97\u8868\u9054\u5f0f<\/h4>\n<p>\u672c\u7bc0\u4ee5\u7bc4\u4f8b\u8aaa\u660e\uff0c\u904b\u7b97\u8868\u9054\u5f0f\u5728ST\u74b0\u5883\u548cLD\u74b0\u5883\u7684\u5448\u73fe\u65b9\u5f0f<\/p>\n<h4>3-3-2 \u56db\u5247\u904b\u7b97(+\u3001-\u3001*\u3001\/)<\/h4>\n<p>\u56db\u5247\u904b\u7b97\u4f7f\u7528\u8207\u4e00\u822c\u7684\u7b97\u8853\u7b26\u865f\u76f8\u540c\u7684\u904b\u7b97\u7b26\u865f(+\u3001-\u3001*\u3001\/)\u6558\u8ff0\u3002<\/p>\n<p>\u5c0d\u4e8e\u4f7f\u7528LD\u5716\u7121\u6cd5\u4e00\u6b21\u6027\u6558\u8ff0\u5b8c\u6574\u7684\u904b\u7b97\uff0c\u53ef\u4ee5\u901a\u904e\u55ae\u884c\u8868\u9054\u5f0f\u7c21\u6f54\u5730\u6558\u8ff0\u51fa\u6765\u3002<\/p>\n<p><strong>\u7a0b\u5f0f\u7bc4\u4f8b<\/strong><\/p>\n<p>\u5728 R3 \u4e2d\u4ee3\u5165 R0~R2 \u7684\u548c\u3002<\/p>\n<p>R3=R0+R1+R2<\/p>\n<p><strong>ST<\/strong><\/p>\n<p>R3:=R0+R1+R2;<\/p>\n<p><strong>LD<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-006.png\" \/><\/p>\n<p>\u25a0\u7528\u4e00\u500b\u6558\u8ff0\u53e5\u52a0\u5165\u591a\u500b\u904b\u7b97\u8868\u9054\u5f0f\u6642\uff0c\u5c07\u5f9e\u512a\u5148\u7d1a\u6700\u9ad8\u7684\u904b\u7b97\u7b26\u865f\u958b\u59cb\u8655\u7406\u3002<\/p>\n<p>\u56db\u5247\u904b\u7b97\u7b26\u865f\u7684\u512a\u5148\u7d1a\u8acb\u53c3\u8003\u904b\u7b97\u5143\u7ae0\u7bc0\uff0c\u6709\u591a\u500b\u512a\u5148\u7d1a\u76f8\u540c\u7684\u904b\u7b97\u7b26\u865f\u6642\uff0c\u5f9e\u6700\u5de6\u908a\u7684\u904b\u7b97\u7b26\u865f\u958b\u59cb\u904b\u7b97\u3002<\/p>\n<h4>\u9ad8\u7d1a\u904b\u7b97(\u6307\u6578)<\/h4>\n<p>\u6307\u6578\u904b\u7b97\u6216\u4e09\u89d2\u51fd\u6578\u904b\u7b97\u4f7f\u7528\u901a\u7528\u51fd\u6578\u3002<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"2\" rowspan=\"2\">\n<p>\u985e\u578b<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u51fd\u6578\u540d<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>\u7bc4\u4f8b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u4e00\u822c\u7b97\u5f0f\u8868\u8ff0<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>\u7d55\u5c0d\u503c<\/p>\n<\/td>\n<td>\n<p>ABS<\/p>\n<\/td>\n<td>\n<p>|X|<\/p>\n<\/td>\n<td>\n<p>ABS( D:= );<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>\u5e73\u65b9\u6839<\/p>\n<\/td>\n<td>\n<p>SQRT<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>FSQR(S:= ,D:= );<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"3\">\n<p>\u4e09\u89d2\u51fd\u6578<\/p>\n<\/td>\n<td>\n<p>\u6b63\u5f26\u3001\u53cd\u6b63\u5f26<\/p>\n<\/td>\n<td>\n<p>SIN\u3001ASIN<\/p>\n<\/td>\n<td>\n<p>B=SIN A<\/p>\n<\/td>\n<td>\n<p>FSIN( S:= , D:= );<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u9918\u5f26\u3001\u53cd\u9918\u5f26<\/p>\n<\/td>\n<td>\n<p>COS\u3001ACOS<\/p>\n<\/td>\n<td>\n<p>B=COS A<\/p>\n<\/td>\n<td>\n<p>FCOS( S:= , D:= );<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u6b63\u5207\u3001\u53cd\u6b63\u5207<\/p>\n<\/td>\n<td>\n<p>TAN\u3001ATAN<\/p>\n<\/td>\n<td>\n<p>B=TAN A<\/p>\n<\/td>\n<td>\n<p>FTAN( S:= , D:= );<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p><strong>\u7a0b\u5f0f\u7bc4\u4f8b<\/strong><\/p>\n<p>\u6c42\u76f4\u89d2\u4e09\u89d2\u5f62\u7684\u659c\u908a\u9577<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-007.png\" \/><\/p>\n<p><strong>ST                                                                    <\/strong><\/p>\n<p>(\u4f7f\u7528\u6d6e\u9ede\u6578\u9700\u5148\u8a3b\u518aTag\u6539\u8b8a\u8cc7\u6599\u578b\u5225  <\/p>\n<p>ex: A= Float DR0\u3001B= Float DR2\u3001C= Float DR4)<\/p>\n<p>FSQR( S:= A*A+B*B, D:= C);<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-008.png\" \/><\/p>\n<p><strong>LD                                                                    <\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-009.png\" \/><\/p>\n<h3>3-4 \u904b\u7b97\u5143\uff08Operand\uff09\u8207\u904b\u7b97\u5b50\uff08Operator\uff09<\/h3>\n<p>\u904b\u7b97\u5143\u8207\u904b\u7b97\u5b50\u70ba\u7d44\u6210\u4e00\u500b\u8868\u9054\u5f0f\u7684\u57fa\u672c\u5143\u7d20\u3002\u904b\u7b97\u5143\u6307\u7684\u662f\u53c3\u8207\u904b\u7b97\u7684\u5c0d\u8c61\uff0c\u800c\u904b\u7b97\u5b50\u5247\u4ee3\u8868\u6240\u57f7\u884c\u7684\u904b\u7b97\u52d5\u4f5c\uff0c\u4f8b\u5982\u8868\u9054\u5f0f D0 + D1 \u4e2d\uff0cD0 \u8207 D1 \u90fd\u662f\u904b\u7b97\u5143\uff0c\u800c + \u865f\u5247\u662f\u904b\u7b97\u5b50\u3002 \u7531\u4e0a\u4e00\u7bc0\u7684\u5404\u500b\u4f8b\u5b50\u53ef\u77e5\uff0c\u8868\u9054\u5f0f\u53ef\u70ba\u4e00\u7fa4\u904b\u7b97\u5143\u8207\u904b\u7b97\u5b50\u7684\u7d44\u5408\uff0c\u4f46\u4e5f\u53ef\u55ae\u7368\u7684\u4ee5\u4e00\u500b\u904b\u7b97\u5143\u4f86\u5448\u73fe\u4e00\u500b\u8868\u9054\u5f0f\uff0c\u800c\u5176\u4e2d\u505a\u70ba\u904b\u7b97\u5143\u7684\u53ef\u70ba\u88dd\u7f6e\u3001\u8b8a\u6578\u7b26\u865f\u6216\u662f\u5e38\u6578\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-010.png\" \/><\/p>\n<p>\u5982\u540c\u6578\u5b78\u5f0f\u4e00\u822c\uff0c\u904b\u7b97\u5b50\u672c\u8eab\u4e5f\u6709\u57f7\u884c\u904b\u7b97\u7684\u512a\u5148\u9806\u5e8f\uff0c\u800c\u7576\u512a\u5148\u7684\u7b49\u7d1a\u76f8\u540c\u6642\uff0c\u9032\u884c\u904b\u7b97\u7684\u9806\u5e8f\u4fbf\u6703\u662f\u7531\u5de6\u81f3\u53f3\u3002\u4e0b\u8868\u5373\u70ba Uperlogic\u4e2d ST \u8a9e\u6cd5\u7684\u904b\u7b97\u5b50\u4e00\u89bd\u8868\u3002<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>\u7b26\u865f<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u529f\u80fd<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>\u8cc7\u6599\u683c\u5f0f<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>\u8868\u9054\u5f0f\u7bc4\u4f8b<\/p>\n<\/td>\n<td>\n<p>\u512a\u5148\u7b49\u7d1a<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u904b\u7b97\u5143<\/p>\n<\/td>\n<td>\n<p>\u904b\u7b97\u7d50\u679c<\/p>\n<p>(\u8868\u9054\u5f0f\u7684\u503c)<\/p>\n<\/td>\n<td>\n<p>\u8868\u9054\u5f0f<\/p>\n<\/td>\n<td>\n<p>\u503c<\/p>\n<\/td>\n<td>\n<p>\u6700\u9ad8<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\uff08\uff09<\/p>\n<\/td>\n<td>\n<p>\u5340\u584a\u512a\u5148<\/p>\n<\/td>\n<td>\n<p>\u4e0d\u9650<\/p>\n<\/td>\n<td>\n<p>\u4e0d\u9650<\/p>\n<\/td>\n<td>\n<p>\uff08D0 + 6\uff09* 3<\/p>\n<\/td>\n<td><\/td>\n<td rowspan=\"15\"><\/td>\n<\/tr>\n<tr>\n<td>\n<p>++,&#8211;<\/p>\n<\/td>\n<td>\n<p>\u5feb\u901f\u52a0,\u6e1b1<\/p>\n<\/td>\n<td>\n<p>\u4efb\u4f55\u6578\u503c<\/p>\n<\/td>\n<td>\n<p>\u4efb\u4f55\u6578\u503c<\/p>\n<\/td>\n<td>\n<p>++D0      D0++<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>&#8211;<\/p>\n<\/td>\n<td>\n<p>\u6578\u503c\u8ca0\u865f<\/p>\n<\/td>\n<td>\n<p>\u4efb\u4f55\u6578\u503c<\/p>\n<\/td>\n<td>\n<p>\u4efb\u4f55\u6578\u503c<\/p>\n<\/td>\n<td>\n<p>-D0<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>NOT<\/p>\n<\/td>\n<td>\n<p>\u908f\u8f2f\u53cd\u5411<\/p>\n<\/td>\n<td>\n<p>\u5e03\u6797<\/p>\n<\/td>\n<td>\n<p>\u5e03\u6797<\/p>\n<\/td>\n<td>\n<p>NOT M0<\/p>\n<\/td>\n<td>\n<p>TRUE<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>*<\/p>\n<\/td>\n<td>\n<p>\u4e58\u6cd5<\/p>\n<\/td>\n<td>\n<p>\u4efb\u4f55\u6578\u503c<\/p>\n<\/td>\n<td>\n<p>\u4efb\u4f55\u6578\u503c<\/p>\n<\/td>\n<td>\n<p>D0*3<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>\/<\/p>\n<\/td>\n<td>\n<p>\u9664\u6cd5<\/p>\n<\/td>\n<td>\n<p>\u4efb\u4f55\u6578\u503c<\/p>\n<\/td>\n<td>\n<p>\u4efb\u4f55\u6578\u503c<\/p>\n<\/td>\n<td>\n<p>15\/D0<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>+,-<\/p>\n<\/td>\n<td>\n<p>\u52a0\u6cd5,\u6e1b\u6cd5<\/p>\n<\/td>\n<td>\n<p>\u4efb\u4f55\u6578\u503c<\/p>\n<\/td>\n<td>\n<p>\u4efb\u4f55\u6578\u503c<\/p>\n<\/td>\n<td>\n<p>D0+3<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>&lt; , &gt;,&lt;=, &gt;=<\/p>\n<\/td>\n<td>\n<p>\u6578\u503c\u6bd4\u8f03<\/p>\n<\/td>\n<td>\n<p>\u4efb\u4f55\u6578\u503c<\/p>\n<\/td>\n<td>\n<p>\u5e03\u6797<\/p>\n<\/td>\n<td>\n<p>D0&gt;2<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>=,&lt;&gt;<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u7b49\u65bc,\u4e0d\u7b49\u65bc<\/p>\n<\/td>\n<td>\n<p>\u4efb\u4f55\u6578\u503c<\/p>\n<\/td>\n<td>\n<p>\u5e03\u6797<\/p>\n<\/td>\n<td>\n<p>D0&lt;&gt;2<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u5e03\u6797<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>M0=TRUE<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>AND,&amp;<\/p>\n<\/td>\n<td>\n<p>\u201c\u53ca\u201d\u904b\u7b97<\/p>\n<\/td>\n<td>\n<p>\u5e03\u6797 or \u6578\u503c<\/p>\n<\/td>\n<td>\n<p>\u5e03\u6797 or \u6578\u503c<\/p>\n<\/td>\n<td>\n<p>M0&amp;M1<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>OR, |<\/p>\n<\/td>\n<td>\n<p>\u201c\u6216\u201d\u904b\u7b97<\/p>\n<\/td>\n<td>\n<p>\u5e03\u6797 or \u6578\u503c<\/p>\n<\/td>\n<td>\n<p>\u5e03\u6797 or \u6578\u503c<\/p>\n<\/td>\n<td>\n<p>M0 OR M1<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>XOR<\/p>\n<p>XNOR<\/p>\n<\/td>\n<td>\n<p>\u201c\u4e92\u65a5\u6216\u201d\u904b\u7b97<\/p>\n<p>\u9664\u6cd5\u53d6\u6574\u6578<\/p>\n<\/td>\n<td>\n<p>\u5e03\u6797 or \u6578\u503c<\/p>\n<\/td>\n<td>\n<p>\u5e03\u6797 or \u6578\u503c<\/p>\n<p>\u6574\u6578<\/p>\n<\/td>\n<td>\n<p>M0 XOR M1<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>MOD<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u6578\u503c<\/p>\n<\/td>\n<td>\n<p>\u6578\u503c<\/p>\n<\/td>\n<td>\n<p>D0 MOD 3 <\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>&gt;&gt;,&lt;&lt;<\/p>\n<\/td>\n<td>\n<p>\u53f3\u79fb\uff11,\u5de6\u79fb1<\/p>\n<\/td>\n<td>\n<p>\u4efb\u4f55\u6578\u503c<\/p>\n<\/td>\n<td>\n<p>\u4efb\u4f55\u6578\u503c<\/p>\n<\/td>\n<td>\n<p>D0&gt;&gt;1<\/p>\n<\/td>\n<td>\n<p>2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>R_TRIG, F_TRIG<\/p>\n<\/td>\n<td>\n<p>\u4e0a\u6cbf<\/p>\n<p>\u4e0b\u6cbf<\/p>\n<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td>\n<p>\u6700\u4f4e<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u25a0\u6709\u5e95\u8272\u7684\u90e8\u5206\u540c\u5340\u6bb5\u5e95\u8272\u7684\u6703\u662f\u540c\u6a23\u7684\u512a\u5148\u5ea6<\/p>\n<p>\u25a0AND OR  XOR XNOR \u57fa\u672c\u4e0a\u6703\u505aBitWise\u7684\u4f5c\u7528(ex R0 AND R1) \u7d50\u679c\u5c31\u6703\u662f\u6578\u503c<br \/>\u9664\u975e\u5de6\u53f3\u5169\u908a\u90fd\u662fBool(bit) (ex. M0 AND M1) \u7684\u578b\u5225\u5c31\u6703\u505a\u908f\u8f2f\u7684\u904b\u7b97,\u7d50\u679c\u5c31\u6703\u662f Bool(bit) \u503c<\/p>\n<p>\u25a0\u6c92\u6709\u652f\u63f4&amp;&amp;\u3001||\u3001==\u8a9e\u6cd5<\/p>\n<p><strong>\u5404\u5c0f\u7bc0\u91dd\u5c0d\u500b\u5225\u904b\u7b97\u5b50\u505a\u4ecb\u7d39<\/strong><\/p>\n<h4>3-4-1 (  )<\/h4>\n<p>\u4f5c\u7528\u8ddf\u6578\u5b78\u5f0f\u5b50\u4e00\u6a23\uff0c\u91dd\u5c0d\u62ec\u5f27\u5167\u7684\u8868\u9054\u5f0f\u4f86\u512a\u5148\u9032\u884c\u904b\u7b97<\/p>\n<p><strong>EX: <\/strong><\/p>\n<p><strong>R0:= (R0+2)*3-(R2+3)*56 ; \/\/ R0=1;R2=2 <\/strong><\/p>\n<p><strong>\/\/ R0= &#8211; 271<\/strong><\/p>\n<h4>3-4-2 \u56db\u5247\u904b\u7b97 +, -,* , \/<\/h4>\n<p>\u91dd\u5c0d\u5169\u908a\u7684\u904b\u7b97\u5143\u9032\u884c\u52a0\u6e1b\u4e58\u9664\u7684\u8a08\u7b97<\/p>\n<p><strong>\t\t\t\tEX:<\/strong><\/p>\n<p><strong>R0:= 5+4-3*2\/1 ;<\/strong><\/p>\n<p><strong>\t\t\t\t\/\/ R0=3<\/strong><\/p>\n<h4>3-4-3 \u905e\u589e\/\u905e\u6e1b ++, &#8212;<\/h4>\n<p>\u55ae\u7368\u5c0d\u904b\u7b97\u5143 + 1 \u6216\u662f -1<\/p>\n<p><strong>\u524d\u7db4\u8a9e\u6cd5:<\/strong><\/p>\n<p><strong>     ++(Register)<\/strong><\/p>\n<p><strong>     &#8211;(Register)<\/strong><\/p>\n<p><strong>           \u6548\u679c\u7b49\u540c\u65bc (Register):=(Register)+1;<\/strong><\/p>\n<p><strong>           \u4f46\u662f\u6bd4\u8f03\u7c21\u77ed\u6574\u6f54<\/strong><\/p>\n<p><strong>\u5f8c\u7db4\u8a9e\u6cd5:<\/strong><\/p>\n<p><strong>     (Register)++<\/strong><\/p>\n<p><strong>     (Register)&#8211;<\/strong><\/p>\n<p><strong>          \u6703\u5148\u53d6\u51fa(Register)\u6578\u503c,\u4e26\u4e14return ,\u4e4b\u5f8c\u518d\u904b\u884c(Register):=(Register)+1 \u7684\u884c\u70ba<\/strong><\/p>\n<p><strong>      ex:<\/strong><\/p>\n<p><strong>          R0:=10;<\/strong><\/p>\n<p><strong>          R2:=10;<\/strong><\/p>\n<p><strong>          R100:=++R0; \/\/ R100 \u70ba11, R0\u70ba11<\/strong><\/p>\n<p><strong>          R102:=R2++; \/\/ R102 \u70ba10, R2\u70ba11<\/strong><\/p>\n<h4>3-4-4 \u6578\u503c\u6bd4\u8f03   &gt;=,&lt;=,&gt;,&lt;<\/h4>\n<p>\u6703\u6bd4\u8f03\u904b\u7b97\u5b50\u5de6\u53f3\u5169\u5074\u7684\u904b\u7b97\u5143\u5927\u5c0f<\/p>\n<p>\u904b\u7b97\u5b50\u5de6\u53f3\u5169\u5074\u9700\u8981\u76f8\u540c\u578b\u5225\u624d\u53ef\u4ee5\u6bd4\u8f03\u5927\u5c0f<\/p>\n<p>\u5426\u5247\u5f97\u5230\u7684\u6bd4\u8f03\u7d50\u679c\u53ef\u80fd\u6703\u6709\u8aa4 (float &lt;-&gt;int)<\/p>\n<p><strong>EX:<\/strong><\/p>\n<p><strong>M0:=R1 &gt;= R2;  \/\/\u5982\u679cR1\u5927\u65bc\u7b49\u65bcR2\u7684\u8a71\u5247M0\u70baTRUE ( 1 )<\/strong><\/p>\n<h4>3-4-5 \u76f8\u7b49\u6216\u4e0d\u7b49  = ,&lt;&gt;<\/h4>\n<p>\u6bd4\u8f03\u5de6\u53f3\u5169\u500b\u904b\u7b97\u5143\u662f\u5426\u76f8\u7b49<\/p>\n<p>\u5f97\u5230\u7684\u7d50\u679c\u5247\u70baTRUE\/ FALSE ( 1\/ 0)<\/p>\n<p><strong>    EX:<\/strong><\/p>\n<p><strong>   M0 := R0=100; \/\/\u5047\u5982R0\u7684\u503c\u70ba100\u7684\u8a71 M0\u70baTRUE ( 1 )<\/strong><\/p>\n<h4>3-4-6 \u4f4d\u5143\u5de6\u53f3\u5e73\u79fb &lt;&lt;, &gt;&gt;<\/h4>\n<p><strong>\u300e&gt;&gt;\u300f,\u300e&lt;&lt;\u300f<\/strong><\/p>\n<p>\u91dd\u5c0d\u5de6\u5074\u904b\u7b97\u5143 \u5de6\/\u53f3\u504f\u79fb\u53f3\u5074\u7684\u904b\u7b97\u5143<\/p>\n<p><strong>EX:  R10:=R0&lt;&lt;4;  \/\/R0=1(0b0_0001)<\/strong><\/p>\n<p><strong>     \/\/ R0 \u7684\u6578\u503c\u6703\u88ab\u5f80\u5de6\u504f\u79fb4 \u500bbit, \u4e26\u4e14\u5206\u914d\u5230R10<\/strong><\/p>\n<p><strong>\t\t \/\/ R10=16(0b1_0000)<\/strong><\/p>\n<p><strong>     P.S. R0\u4e26\u4e0d\u6703\u6539\u8b8a<\/strong><\/p>\n<h4>3-4-7 \u53cd\u76f8\u904b\u7b97\u5143 NOT<\/h4>\n<p>\u91dd\u5c0d\u53f3\u908a\u7684\u904b\u7b97\u5143\u4f9d\u4f4d\u5143\u53cd\u76f8<\/p>\n<p><strong>EX:<\/strong><\/p>\n<p><strong>R0:=NOT R2;  \/\/  \u5c0dR2\u7684\u6578\u503c\u505a\u53cd\u76f8\u5b58\u5230R0<\/strong><\/p>\n<p><strong>\/\/ R2=1(0b0_0001) =&gt; NOT R2= -2(0b1111_1110)<\/strong><\/p>\n<p><strong>M0:= NOT ( M0 OR M2 ); \/\/  M0 \u8ddfM2 \u505a\u5b8c\u6216\u9598\u4e4b\u5f8c \u518d\u53cd\u76f8 \u5b58\u5230M0<\/strong><\/p>\n<h4>3-4-8 \u8ca0\u865f\u904b\u7b97\u5143 &#8216;-\u2019<\/h4>\n<p><strong>\u300e-\u300f<\/strong><\/p>\n<p>\u91dd\u5c0d\u53f3\u908a\u7684\u904b\u7b97\u5143\u8b8a\u70ba\u8ca0\u6578 <\/p>\n<p><strong>EX:  <\/strong><\/p>\n<p><strong>\t\t\tIF R_TRIG( S:=M1 ) THEN<\/strong><\/p>\n<p><strong>R0:=-R2;\t\t\/\/R2=1 (0b0_0000_0000_0001)=&gt; R0=-1(0b1111_1111_1111_1111)<\/strong><\/p>\n<p><strong>END_IF<\/strong><\/p>\n<h4>3-4-9 \u8ce6\u4e88\u6578\u503c  :=<\/h4>\n<p>\u5c07\u904b\u7b97\u5b50\u7684\u53f3\u908a\u904b\u7b97\u5143(\u8b8a\u6578),\u6307\u6d3e\u5230\u5de6\u908a\u7684\u8b8a\u6578\t<\/p>\n<p><strong>EX: <\/strong><\/p>\n<p><strong>    R1:=R0;  \/\/  R1=R0<\/strong><\/p>\n<p><strong>    R1:=1;   \/\/  R1=1<\/strong><\/p>\n<h4>3-4-10 \u908f\u8f2f\u904b\u7b97\u5143 AND ( &amp; )\u3001OR ( | )\u3001XOR\u3001XNOR<\/h4>\n<p>\u5c0d\u904b\u7b97\u5b50\u5de6\u53f3\u5169\u908a\u7684\u904b\u7b97\u5143\u9032\u884c\u908f\u8f2f\u904b\u7b97<\/p>\n<p>\u904b\u7b97\u7d50\u679c\u578b\u5225\u6703\u8ddf\u904b\u7b97\u5143\u7684\u5de6\u908a\u7b2c\u4e00\u4f4d\u578b\u5225\u662f\u4e00\u6a23\u7684<\/p>\n<p><strong>          EX:<\/strong><\/p>\n<p><strong>               R0:=  R1 AND R2;   \/\/  \u5c0dR1, R2\u7684\u6578\u503c\u9032\u884c\u4f4d\u5143 \u53ca \u904b\u7b97\u5b58\u5230R0<\/strong><\/p>\n<p><strong>                \/\/  \u5047\u5982R1=1(0b0_0001)  R2=15(0b0_1111)  \u5247R0 =1(0b0_0001)<\/strong><\/p>\n<p><strong>               DR0:=  R10 &amp; DR12;   \/\/  \u5c0dR10, DR12\u7684\u6578\u503c\u9032\u884c\u4f4d\u5143 \u53ca \u904b\u7b97\u5b58\u5230DR0<\/strong><\/p>\n<p><strong>\/\/  \u5047\u5982R10=1118481(0x11_1111H)  DR12=69905(0x1_1111H)  <\/strong><\/p>\n<p><strong>\/\/  \u5247DR0 =4369(0x1111H)<\/strong><\/p>\n<p><strong>\t\t\t\t\t\t\t R0:=  R1 | R2;\t\t\/\/\t\t\u5c0dR1, R2\u7684\u6578\u503c\u9032\u884c\u4f4d\u5143 \u6216 \u904b\u7b97\u5b58\u5230R0<\/strong><\/p>\n<p><strong>                        \/\/  \u5047\u5982R1=1(0b0_0001)  R2=15(0b0_1111)  \u5247R0 =15(0b0_1111)<\/strong><\/p>\n<p><strong>               DR0:=  DR10 OR R12;   \/\/  \u5c0dR10, DR12\u7684\u6578\u503c\u9032\u884c\u4f4d\u5143 \u6216 \u904b\u7b97\u5b58\u5230DR0<\/strong><\/p>\n<p><strong>\/\/ \u5047\u5982DR10=4369(0x1111H)  R12=69905(0x1_1111H)  <\/strong><\/p>\n<p><strong>\/\/ \u5247DR0 =4369(0x1111H)<\/strong><\/p>\n<p><strong>\t\t\t\t\t\t\t R0:=  R1 XOR R2;\t\t\/\/\t\t\u5c0dR1, R2\u7684\u6578\u503c\u9032\u884c\u4f4d\u5143 \u53cd\u6216 \u904b\u7b97\u5b58\u5230R0<\/strong><\/p>\n<p><strong>                        \/\/  \u5047\u5982R1=1(0b0_0001)  R2=15(0b0_1111)  \u5247R0 =14(0b0_1110)<\/strong><\/p>\n<p><strong>\t\t\t\t\t\t\t R0:=  R1 XNOR R2;\t\t\/\/\t\t\u5c0dR1, R2\u7684\u6578\u503c\u9032\u884c\u4f4d\u5143 \u53cd\u4e92\u65a5\u6216 \u904b\u7b97\u5b58\u5230R0<\/strong><\/p>\n<p><strong>                     \/\/  \u5047\u5982R1=1(0b0_0001)  R2=15(0b0_1111)  \u5247R0 =-15(0b1111_0001)<\/strong><\/p>\n<h4>3-4-11 MOD \u9918\u6578<\/h4>\n<p>\u8a08\u7b97\u5de6\u53f3\u904b\u7b97\u5143\u7684\u9918\u6578 (\u7b49\u540c\u65bcC\u8a9e\u8a00\u7684 %\u7b26\u865f)<\/p>\n<p><strong>           EX:<\/strong><\/p>\n<p><strong>                R0:= R1 MOD R2 ;  \/\/ R0\u70baR1\u9664\u4ee5R2\u4e4b\u5f8c\u7684\u9918\u6578<\/strong><\/p>\n<p><strong>\t\t\t\t\t\t\t\/\/  R1=10,R2=3  10\/3\u5546\u6578\u7b49\u65bc3\u9918\u6578\u7b49\u65bc1,R0=1<\/strong><\/p>\n<h3>3-5 \u8a3b\u89e3\uff08Comment\uff09<\/h3>\n<p>\u8a3b\u89e3\u662f\u7528\u4f86\u8b93\u7a0b\u5f0f\u958b\u767c\u8005\u65e5\u5f8c\u5bb9\u6613\u7dad\u8b77\u7684\u8a3b\u89e3<\/p>\n<p>\u6709\u5206\u70ba\u55ae\u884c\u6216\u662f\u9023\u7e8c\u8a3b\u89e3<\/p>\n<p>\u6703\u5448\u73fe\u6dfa\u7070\u8272\u5b57\u6a23\uff0c\u9019\u4e9b\u90e8\u5206\u6703\u88ab\u7de8\u8b6f\u5668\u5ffd\u7565\u4e0d\u6703\u7522\u751f\u904b\u884c\u8cc7\u6599<\/p>\n<h4>3-5-1 \u55ae\u884c\u8a3b\u89e3   \/\/<\/h4>\n<p>\u9019\u500b\u7b26\u865f\u4e4b\u5f8c\u6703\u5448\u73fe\u6dfa\u7070,\u4e26\u4e14\u4e0d\u6703\u7522\u751f\u904b\u884c\u7684\u7a0b\u5f0f\u78bc<\/p>\n<p>         <img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-011.png\" \/><\/p>\n<h4>3-5-2 \u591a\u884c\u8a3b\u89e3 (*     *)<\/h4>\n<p>\u53ef\u4ee5\u8de8\u591a\u884c(\u55ae\u884c\u4e5f\u884c) \u7684\u9023\u7e8c\u8a3b\u89e3<\/p>\n<p>\u5728\u9019\u5169\u500b\u7b26\u865f\u4e2d\u9593\u7684\u6587\u5b57\u6703\u88ab\u7576\u6210\u8a3b\u89e3<\/p>\n<p>       <img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-012.png\" \/><\/p>\n<p><strong>P.S. \u5728\u64cd\u4f5c\u4e0a\u4e5f\u53ef\u4ee5\u900f\u904e\u5feb\u6377\u9375  (Ctrl+ \/ ) \u4f86\u91dd\u5c0d\u6240\u9078\u53d6\u7684\u884c\u5217<\/strong><\/p>\n<p><strong>        \u6279\u6b21 ( \u52a0 \/ \u79fb\u9664 ) \u8a3b\u89e3<\/strong><\/p>\n<h3>3-6 \u6d41\u7a0b\u63a7\u5236\u8207\u8ff4\u5708<\/h3>\n<p>\u64b0\u5bebST\u7684\u6642\u5019\u901a\u5e38\u90fd\u6703\u9700\u8981\u4e00\u4e9b\u689d\u4ef6\u6216\u662f\u8ff4\u5708\u63a7\u5236\u4fbf\u65bc\u8a2d\u8a08\uff0c\u53c3\u8003\u4ee5\u4e0b\u4ecb\u7d39\u3002<\/p>\n<h4>3-6-1   IF ELSE<\/h4>\n<p><strong>        <\/strong><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-013.png\" \/><\/p>\n<p>           <strong>\u7576 IF \u5f8c\u9762\u7684\u8868\u9054\u5f0f\u6700\u5f8c\u7d50\u679c\u70ba TRUE \u6216\u662f 1\u7684\u6642\u5019 <\/strong><\/p>\n<p><strong>         \u6703\u7dca\u63a5\u8457\u904b\u884c IF \u5f8c\u7684\u63cf\u8ff0 <\/strong><\/p>\n<p><strong>         \u5426\u5247\u6703\u904b\u884c ELSE \u5f8c\u7684\u63cf\u8ff0<\/strong><\/p>\n<p>         <strong>EX:<\/strong><\/p>\n<p>             <img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-014.png\" \/><\/p>\n<p><strong>\u5047\u5982 M5 \u4e0a\u6cbf\u8a0a\u865f\u89f8\u767c, \u4e26\u4e14 M88 \u4e5f\u70ba TRUE (1) \u7684\u6642\u5019<\/strong><\/p>\n<p><strong>       R100\u70ba10\uff0cR10\u70ba12<\/strong><\/p>\n<p><strong>      \u5982\u679c\u6709\u591a\u500b\u689d\u4ef6\u5247\u53ef\u4ee5\u7528  ELSEIF<\/strong><\/p>\n<p><strong>      EX:<\/strong><\/p>\n<p><strong>       <\/strong><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-015.png\" \/><\/p>\n<h4>3-6-2   For Loop<\/h4>\n<p>  <img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-016.png\" \/>    <\/p>\n<p>\u53c3\u6578\uff1a<\/p>\n<p><strong>(\uff0aReg\uff0a)<\/strong>\uff1a\u8a08\u6578\u66ab\u5b58\u5668<\/p>\n<p>\u91cd\u8907\u904b\u884cFOR \u5230  END_FOR\u88cf\u982d\u7684\u6307\u4ee4\uff0c\u76f4\u5230\u8a08\u6578\u66ab\u5b58\u5668\u9054\u5230\u9054\u5230\u76ee\u6a19\u503c<\/p>\n<p>\u6bcf\u91cd\u8907\u4e00\u6b21\u904b\u884c\u5c31\u6703\u5c0d\u8a08\u6578\u66ab\u5b58\u5668\u503c\u52a0\u4e0a\u905e\u589e\u503c\u6216\u905e\u6e1b\u503c<\/p>\n<p><strong>(\uff0aStart\uff0a)<\/strong>\uff1a\u8a08\u6578\u521d\u59cb\u503c<\/p>\n<p><strong>(\uff0aEnd\uff0a)<\/strong>\uff1a\u8a08\u6578\u76ee\u6a19\u503c<\/p>\n<p><strong>(\uff0a&lt; inc &gt;\uff0a)<\/strong>\uff1a\u905e\u589e\u503c\u6216\u905e\u6e1b\u503c<\/p>\n<p><strong>(\uff0aStatements\uff0a)<\/strong>\uff1a\u6b32\u8ff4\u5708\u57f7\u884c\u4e4b\u7a0b\u5f0f<\/p>\n<p><strong><em>P.S. <\/em>BY<em> \u905e\u589e\u503c\u9019\u500b\u6b04\u4f4d\u53ef\u4ee5\u7701\u7565 (\u9810\u8a2d\u70ba1) \u5982\u4e0b\u5716<\/em> <\/strong><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-017.png\" \/><\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td><\/td>\n<td>\n<p>\u8a08\u6578\u66ab\u5b58\u5668<\/p>\n<\/td>\n<td>\n<p>\u8a08\u6578\u521d\u59cb\u503c<\/p>\n<\/td>\n<td>\n<p>\u8a08\u6578\u76ee\u6a19\u503c<\/p>\n<\/td>\n<td>\n<p>\u905e\u589e\u503c\u6216\u905e\u6e1b\u503c<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>16\u4f4d\u5143\u66ab\u5b58\u5668<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>32\u4f4d\u5143\u66ab\u5b58\u5668<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u5e38\u6578<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p><strong><em>P.S. \u82e5\u8ff4\u5708\u8a08\u6578\u70ba\u905e\u589e\uff0c\u5247 \u8a08\u6578\u521d\u59cb\u503c &lt; \u8a08\u6578\u76ee\u6a19\u503c\uff1b<\/em><\/strong><\/p>\n<p><strong><em>\u82e5\u8ff4\u5708\u8a08\u6578\u70ba\u905e\u6e1b\uff0c\u5247 \u8a08\u6578\u521d\u59cb\u503c &gt; \u8a08\u6578\u76ee\u6a19\u503c\u3002<\/em><\/strong><\/p>\n<p><strong>     EX:<\/strong><\/p>\n<p><strong>     FOR DR0 := R2 TO R4 BY 2 DO \/\/DR0 \u6703\u5f9eR2, R2+2, R2+4,&#8230;.etc\u76f4\u5230R4<\/strong><\/p>\n<p><strong>         R10++;                              \/\/ DR0 = R4, R10 = R10 + (R4-R2) \/ 2<\/strong><\/p>\n<p><strong> END_FOR<\/strong><\/p>\n<h4>3-6-3   Case Of<\/h4>\n<p>\u6574\u6578\u689d\u4ef6\u9078\u64c7<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-018.png\" \/><\/p>\n<p>    <strong>  \u6703\u8b80\u53d6\u5c0d\u76ee\u6a19\u66ab\u5b58\u5668\u7684\u6578\u503c\uff0c\u6eff\u8db3\u6307\u5b9a\u7684\u689d\u4ef6\u5f8c\u904b\u884c : \u5f8c\u9762\u7684\u6558\u8ff0\u53e5 <\/strong><\/p>\n<p><strong>      \u5047\u5982\u90fd\u4e0d\u6eff\u8db3\uff0c\u5247\u6703\u904b\u884c ELSE \u5f8c\u9762\u7684\u6558\u8ff0\u53e5<\/strong><\/p>\n<p><strong>      \u689d\u4ef6\u53ea\u652f\u63f4\u6574\u6578\u5e38\u6578 \u6216\u662f \u7bc4\u570d  .. \u7b26\u865f\u5167\u7684\u5e38\u6578<\/strong><\/p>\n<p><strong>      EX:<\/strong><\/p>\n<p><strong>     <\/strong><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-019.png\" \/><\/p>\n<p>        <strong>R0 \u7b49\u65bc 1    \/\/ R100 \u7b49\u65bc10<\/strong><\/p>\n<p><strong>      <\/strong>\t<strong>             \/\/3, 4, 5, 6, 7, 8, 9  ,R100\u7b49\u65bc11<\/strong><\/p>\n<h4>3-6-4   While Loop &amp; Repeat<\/h4>\n<p>\u91cd\u8907\u904b\u884c\u63cf\u8ff0 \u76f4\u5230\u689d\u4ef6(\u4e0d)\u6eff\u8db3<\/p>\n<p><strong>      While Loop:  <\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-020.png\" \/><\/p>\n<p>EX:<\/p>\n<p><strong><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-021.png\" \/><\/strong><\/p>\n<p><strong>      Repeat:<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-022.png\" \/><\/p>\n<p>EX:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-023.png\" \/><\/p>\n<p><strong>Notice:<\/strong><\/p>\n<p><strong>\u56e0\u70ba\u786c\u9ad4\u904b\u884c\u908f\u8f2f\u7684\u95dc\u4fc2\uff0cWhile\u5982\u679c\u6301\u7e8c\u592a\u4e45\u6642\u9593\u6c92\u6709\u8df3\u958b\u8ff4\u5708\uff0c\u6703\u4f7fPLC\u8a2d\u5099\u7121\u6cd5\u8655\u7406\u5176\u4ed6IO\u72c0\u614b\uff0c\u9020\u6210\u7cfb\u7d71\u932f\u8aa4\uff0c\u5728\u4f7f\u7528\u7684\u6642\u5019\u8981\u6ce8\u610f<\/strong><\/p>\n<h4>3-6-5 Break \/ Exit \u8df3\u958b\u8ff4\u5708<\/h4>\n<p>\u5728 FOR , WHILE \uff0c REPEAT \u7684\u8ff4\u5708\u72c0\u6cc1\u4e0b\uff0c\u53ef\u4ee5\u5728\u9069\u7576\u6642\u9593\u642d\u914d break \u6216\u662f exit \u63d0\u524d\u96e2\u958b\u8ff4\u5708\u3002<\/p>\n<p><strong>      EX:<\/strong><\/p>\n<p><strong>          <img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-024.png\" \/><\/strong><\/p>\n<p>            <strong>  \u7576R0\u5927\u65bc\u7b49\u65bc100\u7684\u6642\u5019 \u6703\u904b\u884cbreak \u8df3\u958bwhile loop<\/strong><\/p>\n<p><strong>Notice:<\/strong><\/p>\n<p><strong>\u8ff4\u5708\u7cfb\u5217\u5982 For While Repeat\uff0c\u6709\u53ef\u80fd\u6703\u56e0\u70ba\u8ff4\u5708\u904b\u884c\u6b21\u6578\u904e\u4e45\uff0c\u6703\u5c0e\u81f4PLC\u5728\u904b\u884c\u7684\u6642\u5019\u7522\u751fError\uff0c\u4f7f\u7528\u4e0a\u8acb\u7279\u5225\u6ce8\u610f\uff0c\u53ef\u4ee5\u642d\u914d\u4e2d\u65b7\u8a0a\u865f\u8655\u7406\u8ff4\u5708\u8655\u7406\u904e\u4e45\u7684\u554f\u984c\u3002<\/strong><\/p>\n<h4>3-6-6  Label &amp; Jump\/Call<\/h4>\n<p>LBL\u6307\u4ee4\u80fd\u9054\u5230LD FUN_65\u76f8\u540c\u6548\u679c(\u8a73\u7d30\u8aaa\u660e\u53ef\u4ee5\u53c3\u8003FUN 66)\uff0c\u6700\u591a\u53ef\u8f38\u51656\u500bASCII \u5b57\u5143\u7576\u4f5c\u6a19\u7c64\u540d\u7a31\u3002<\/p>\n<p><strong>        EX:<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-025.png\" \/> <\/p>\n<p><strong>\u80fd\u5920\u5728ST\u74b0\u5883\u547c\u53ebLabel\u7684\u95dc\u9375\u5b57\u6709\u4ee5\u4e0b\u5e7e\u7a2e<\/strong><\/p>\n<p><strong>JMP_66\/GOTO (\u8a73\u7d30\u8aaa\u660e\u53ef\u4ee5\u53c3\u8003FUN 66)<\/strong><\/p>\n<p><strong>        EX:<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-026.png\" \/> <\/p>\n<p><strong>JMP_66\/GOTO\u53ea\u80fd\u5728\u7576\u524d\u55ae\u5143\u57f7\u884c\u8df3\u8f49<\/strong><\/p>\n<p><strong>CALL\/CALL_67 (\u8a73\u7d30\u8aaa\u660e\u53ef\u4ee5\u53c3\u8003FUN 67)<\/strong><\/p>\n<p><strong>        EX:<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-027.png\" \/> <img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-028.png\" \/> <img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-029.png\" \/><\/p>\n<p><strong>    \u5728\u526f\u7a0b\u5f0f\u4f7f\u7528Label\u529f\u80fd\u6642\uff0cLBL\u6307\u4ee4\u642d\u914dRETURN\u6703\u6709\u4e0d\u540c\u7684\u7d50\u679c<\/strong><\/p>\n<p><strong>\t\tEX:<\/strong><\/p>\n<p><strong>\t\t\t\t<img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-030.png\" \/><\/strong><\/p>\n<p><strong>\t\tR0=2,\u56e0\u70ba\u540c\u6642\u547c\u53ebA.B\u7684Label,\u4e26\u5c07\u7d50\u679cRETURN<\/strong><\/p>\n<p><strong>\t\t\t\t<img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-031.png\" \/><\/strong><\/p>\n<p><strong>\t\tR0=1,\u56e0\u70ba\u53ea\u547c\u53eb\u4e86A\u7684Label,\u4e26\u5c07\u7d50\u679cRETURN<\/strong><\/p>\n<p><strong>\t\t\t\t<img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-032.png\" \/><\/strong><\/p>\n<p><strong>\t\tR0=2,\u56e0\u70ba\u547c\u53eb\u4e86A\u7684Label,\u4f46RETURN\u5728B\u7684Label\u5f8c<\/strong><\/p>\n<p><strong><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-033.png\" \/><\/strong><\/p>\n<p><strong>R0=3, \u56e0\u70ba\u547c\u53eb\u4e86\u201d\u526f\u55ae\u51430\u201dA\u7684Label,\u4f46RETURN\u5728\u201d\u526f\u55ae\u51431\u201dC\u7684Label\u5f8c(\u9700\u7279\u5225\u6ce8\u610f)<\/strong><\/p>\n<p><strong>\u5982\u9700\u5728FCM\u74b0\u5883<\/strong><\/p>\n<p><strong>\u4f7f\u7528\u6a19\u7c64\u5247\u9700\u8981\u5229\u7528LBL_F\u3001FLBL_165\u6307\u4ee4<\/strong><\/p>\n<p><strong>\u53ea\u80fd\u5728FCM \u547c\u53ebLabel\u7684\u95dc\u9375\u5b57<\/strong><\/p>\n<p><strong>GOTO_F(\u53ea\u80fd\u5728FB \u4f7f\u7528\u7684Label)<\/strong><\/p>\n<p><strong>FJMP_166<\/strong><\/p>\n<p><strong>EX:<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-034.png\" \/><\/p>\n<h3>3-7 \u66ab\u5b58\u5668\u548c\u8cc7\u6599\u578b\u5225<\/h3>\n<p>\u5728\u7a0b\u5f0f\u8a9e\u8a00\u4e2d\uff0c\u8b8a\u6578\u4f7f\u7528\u8ddf\u8cc7\u6599\u578b\u5225\u662f\u4e0d\u53ef\u6216\u7f3a\u7684\u4e00\u90e8\u5206\u70ba\u4e86\u8981\u8ce6\u4e88\u66ab\u5b58\u5668\u578b\u5225\u7684\u7279\u6027\uff0c\u4fbf\u65bc\u7a0b\u5f0f\u64b0\u5beb\u8005\u89c0\u770b\u9664\u932f\uff0cST\u90fd\u4f7f\u7528\u6a19\u7c64(\u5168\u57df\u3001\u5340\u57df) \u4f86\u8ce6\u4e88\u66ab\u5b58\u5668\u5177\u6709\u7279\u5b9a\u7684\u578b\u5225\uff0c\u4ee5\u4e0b\u4e00\u4e00\u4ecb\u7d39ST \u4e2d\u6240\u652f\u63f4\u7684\u8cc7\u6599\u578b\u614b\u8ddf\u7528\u6cd5\u3002<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p><strong>\u6ce8\u610f\u4e8b\u9805<\/strong><\/p>\n<p><strong>\u904b\u7b97\u7d50\u679c\u8d85\u51fa\u4e86\u8cc7\u6599\u985e\u578b\u6240\u80fd\u8655\u7406\u7684\u503c\u7684\u7bc4\u570d\u6642\uff0c\u5728\u4ee5\u5f8c\u7684\u8655\u7406\u4e2d\u5c07\u7121\u6cd5\u53cd\u6620\u6b63\u78ba\u7684\u7d50\u679c \uff08\u6578\u503c\uff09\u3002<\/strong><\/p>\n<p><strong>\u61c9\u4e8b\u5148\u5c07\u904b\u7b97\u7269\u4ef6\u8b8a\u6578\u7684\u8cc7\u6599\u985e\u578b\u8f49\u63db\u6210\u53ef\u5c0d\u904b\u7b97\u7d50\u679c\u9032\u884c\u8655\u7406\u7684\u7bc4\u570d\u7684\u8cc7\u6599\u985e\u578b\u3002<\/strong><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h4>\u6a19\u7c64\u5efa\u7acb\u7bc4\u4f8b <\/h4>\n<p>\u6a19\u7c64\u5206\u70ba\u5168\u57df\u6a19\u7c64\u53ca\u5340\u57df\u6a19\u7c64\uff0c\u5168\u57df\u6a19\u7c64\u6240\u5efa\u7acb\u7684\u6a19\u7c64\u540d\u7a31\u7121\u6cd5\u8207\u5340\u57df\u6a19\u7c64\u5171\u7528\uff0c\u70ba\u6574\u500b\u5c08\u6848\u53ef\u5171\u7528\u7684\u6a19\u7c64\u540d\u7a31\u3002\u5340\u57df\u6a19\u7c64\u6240\u5efa\u7acb\u7684\u6a19\u7c64\u540d\u7a31\u53ef\u5728\u4e0d\u540c\u4e3b\u7a0b\u5f0f\u3001\u526f\u7a0b\u5f0f\u3001Fcm\u7a0b\u5f0f\u9593\u4f7f\u7528\u76f8\u540c\u7684\u540d\u5b57\uff0c\u4e14\u4e0d\u76f8\u4e92\u5f71\u97ff\u4f7f\u7528(\u4f46\u4f7f\u7528\u4f4d\u5740\u9808\u4e0d\u76f8\u540c)\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-035.png\" \/><\/p>\n<p>\u70ba\u914d\u5408\u4e0d\u540c\u8cc7\u6599\u578b\u5225\u7684\u7a0b\u5f0f\u904b\u7b97\u4f7f\u7528\uff0c\u4ee5\u4e0b\u5c07\u793a\u7bc4\u5982\u4f55\u5efa\u7acb\u4e0d\u540c\u578b\u5225\u7684\u6a19\u7c64<\/p>\n<p>Rx.Dx\u66ab\u5b58\u5668\u9810\u8a2d\u70baINT16, DRx.DDx\u66ab\u5b58\u5668\u9810\u8a2dINT32\u6574\u6578\u578b\u8b8a\u6578<\/p>\n<p><strong>EX:<\/strong><\/p>\n<p><strong>\u96d9\u64ca\u9ede\u9078\u5168\u57df\u6a19\u7c64-&gt;\u65b0\u589e\u6a19\u7c64<\/strong><\/p>\n<p><strong><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-036.png\" \/><\/strong><\/p>\n<p><strong><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-037.png\" \/><\/strong><\/p>\n<p><strong><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-038.png\" \/><\/strong><\/p>\n<p>\u5982\u679c\u9078\u53d6\u7684\u4f4d\u5740\u8207\u8cc7\u6599\u578b\u5225\u4e0d\u652f\u63f4\uff0c\u5247\u6703\u8df3\u51fa\u63d0\u9192\u963b\u64cb<\/p>\n<h4>3-7-1 Bool \/ Bit <\/h4>\n<p>\u53ea\u8981\u662f\u4ee3\u8868\u7684\u8cc7\u6599\u70babit \u6216\u662f\u6578\u503c\u6bd4\u8f03\u904b\u7b97  ex. &lt;, &gt;, &lt;&gt; &#8230;\u7b49, \u9019\u4e9b\u7d50\u679c\u90fd\u70baBool (Bit) \u578b\u5225\uff0c\u5728\u9019\u88e1\u53ef\u4ee5\u4f7f\u75280\u6216\u662f 1  ,  TRUE,   FALSE \u90fd\u53ef\u4ee5\u63a5\u53d7\u70ba\u8868\u73feBool \u578b\u5225\u7684\u5e38\u6578\u3002<\/p>\n<p>\u5176\u4e2d\u7e7c\u96fb\u5668\u7684\u958b\u95dc\u4e5f\u90fd\u662f\u7528Bool \/ Bit\u4f86\u8868\u793a ( ex. M0, X0, Y0&#8230;etc)<\/p>\n<p><strong>       EX:<\/strong><\/p>\n<p><strong>             <\/strong><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-039.png\" \/>                         <\/p>\n<h4>3-7-2 Integer \u6574\u6578\u578b\u5225<\/h4>\n<p>ST \u6709\u56db\u7a2e\u6574\u6578\u985e\u578b  \u5206\u5225\u70ba INT16, UINT16, INT32, UINT32\uff0c<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p><strong>\u578b\u5225\u540d\u7a31<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u8aaa\u660e<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>INT16<\/p>\n<\/td>\n<td>\n<p><strong>16\u4f4d\u5143\u7684\u6574\u6578<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>UINT16<\/p>\n<\/td>\n<td>\n<p><strong>16\u4f4d\u5143\u7684\u6b63\u6574\u6578<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>INT32<\/p>\n<\/td>\n<td>\n<p><strong>32\u4f4d\u5143\u7684\u6574\u6578<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>UINT32<\/p>\n<\/td>\n<td>\n<p><strong>32\u4f4d\u5143\u7684\u6b63\u6574\u6578<\/strong><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u5982\u679c\u4f7f\u7528\u523016 bit \u7684\u66ab\u5b58\u5668\u4f4d\u7f6e (ex. R0, R1..etc) \u7cfb\u7d71\u6703\u9810\u8a2d\u70baINT16\u7684\u8cc7\u6599\u578b\u5225\u8655\u7406\uff0c\u5982\u679c\u662f32 bit \u7684\u66ab\u5b58\u5668 (ex. DR0, DR2&#8230;etc)\u5247\u6703\u4ee5INT32 \u7684\u65b9\u5f0f\u5c0d\u5f85<\/p>\n<h4>3-7-3 Float\u6d6e\u9ede\u6578<\/h4>\n<p><strong>IEEE-754 \u5b9a\u7fa9\u7684\u6d6e\u9ede\u6578<\/strong><\/p>\n<p>ST \u91dd\u5c0d\u6d6e\u9ede\u6578\u7684\u64cd\u4f5c, \u90fd\u9700\u8981\u5148\u7522\u751f\u5c0d\u61c9\u7684Tag \u624d\u53ef\u4ee5\u8b93\u7cfb\u7d71\u77e5\u9053\u54ea\u500b\u8b8a\u6578\u6307\u7684\u66ab\u5b58\u5668\u4f4d\u7f6e\u4ee3\u8868\u8457\u6d6e\u9ede\u6578.<\/p>\n<p>\u5176\u4e2d\u7576\u4f7f\u7528\u8005\u5728\u505a\u6d6e\u9ede\u6578\u7684\u64cd\u4f5c\u7684\u6642\u5019\u6703\u6709\u4e00\u4e9b\u9810\u8a2d\u96b1\u542b\u7684\u884c\u70ba\u51fa\u73fe\uff0c\u4ee5\u4e0b\u5716\u7684\u7bc4\u4f8b\u4f86\u8aaa\u660e\u3002<\/p>\n<p>         <img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-040.png\" \/><\/p>\n<p><strong>Line 1:  \u8868\u793a\u5c07\u6a19\u7c640\u7684\u6d6e\u9ede\u6578\u6578\u503c\u8ce6\u503c\u70ba69905.14159<\/strong><\/p>\n<p>           <strong>Line 3:  \u8868\u793a\u628a\u6a19\u7c640\u7684\u6d6e\u9ede\u6578\u6578\u503c\u8f49\u63db\u6210<\/strong>int32 <strong>\u7684\u6574\u6578\u6578\u503c<\/strong><\/p>\n<p><strong>                       \u4e26\u4e14\u5b58\u5728DR10\u7684\u4f4d\u7f6e,\u5c0f\u6578\u9ede\u7684\u90e8\u5206\u5247\u6703\u88ab\u79fb\u9664<\/strong><\/p>\n<p><strong>                     (ex.  \u6a19\u7c640 \u70ba69905.141 \u5247 DR10\u5167\u5bb9\u5247\u70ba69905 )<\/strong><\/p>\n<p>           <strong>Line 5:  \u8868\u793a\u6703\u628a\u6a19\u7c640\u7684\u6d6e\u9ede\u6578\u6578\u503c\u8f49\u63db\u6210<\/strong>int16 <strong>\u7684\u6574\u6578\u6578\u503c<\/strong><\/p>\n<p><strong>\u4e26\u4e14\u5b58\u5728R12\u7684\u4f4d\u7f6e,\u8d85\u904e<\/strong>int16<strong>\u7684\u6574\u6578\u6578\u503c\u4ee5\u53ca\u5c0f\u6578\u9ede\u7684\u90e8\u5206\u5247\u6703\u88ab \u79fb\u9664<\/strong><\/p>\n<p><strong>(ex.  \u6a19\u7c640 \u70ba69905.141 \u5247 R12\u5167\u5bb9\u5247\u70ba4369 )<\/strong><\/p>\n<p><strong><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-041.png\" \/><\/strong><\/p>\n<p><strong>          Line 2: DR14( <\/strong>INT32 <strong>)\u8f49\u63db\u6210\u6d6e\u9ede\u6578\u7684\u8cc7\u6599\u578b\u5225\uff0c\u4e26\u4e14\u5b58\u9032\u6a19\u7c640\u9019\u500b\u6a19\u7c64\u4e2d<\/strong><\/p>\n<p><strong>(\u53ef\u89c0\u5bdf\u6d6e\u9ede\u6578\u7684\u6578\u4f4d\u8868\u793a\u8ddf\u6574\u6578\u4e0d\u540c\uff0c\u53ef\u7576\u4f5c Fun 200 I -&gt; F\u904b\u7528)<\/strong><\/p>\n<p><strong>EX:<\/strong><\/p>\n<p><strong><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-042.png\" \/><\/strong><\/p>\n<h4>3-7-4 \u5e38\u6578<\/h4>\n<p>\u4ee5\u4e0b\u70baST\u6240\u652f\u63f4\u8f38\u5165\u7684\u5e38\u6578\u985e\u578b <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Type<\/p>\n<\/td>\n<td>\n<p><strong>\u683c\u5f0f\u53ca\u6a23\u672c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Bool (Bit)<\/p>\n<\/td>\n<td>\n<p><strong>0, 1, TRUE, FALSE<\/strong><\/p>\n<p><strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/strong><\/p>\n<p><strong>M0:=1;<\/strong><\/p>\n<p><strong>M0:=TRUE;<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u6574\u6578<\/p>\n<\/td>\n<td>\n<p><strong>\u6574\u6578:<\/strong><\/p>\n<p><strong>    R0:=1;<\/strong><\/p>\n<p><strong>    R0:=-10;<\/strong><\/p>\n<p><strong>\u4e8c\u9032\u4f4d:<\/strong><\/p>\n<p>   2# <strong>\u5f8c\u9762\u63a5\u4e0a0,1 \u7684\u6578\u503c,<\/strong><\/p>\n<p><strong>          \u53ef\u4ee5\u4f7f\u7528\u5e95\u7dda\u5206\u5272\u7fa4\u7d44<\/strong><\/p>\n<p><strong>    R0:=2#1111_0000;<\/strong><\/p>\n<p><strong>\u516b\u9032\u4f4d:<\/strong><\/p>\n<p>     8# <strong>\u5f8c\u9762\u63a5\u4e0a\u6578\u503c,<\/strong><\/p>\n<p><strong>          \u53ef\u4ee5\u4f7f\u7528\u5e95\u7dda\u5206\u5272\u7fa4\u7d44<\/strong><\/p>\n<p><strong>    R0:=8#243;<\/strong><\/p>\n<p><strong>\u5341\u516d\u9032\u4f4d:<\/strong><\/p>\n<p>    16# <strong>\u5f8c\u9762\u63a5\u4e0a\u6578\u503c,<\/strong><\/p>\n<p><strong>          \u53ef\u4ee5\u4f7f\u7528\u5e95\u7dda\u5206\u5272\u7fa4\u7d44<\/strong><\/p>\n<p><strong>     <\/strong> 0x <strong>\u5f8c\u9762\u63a5\u4e0a\u6578\u503c,<\/strong><\/p>\n<p><strong>          \u53ef\u4ee5\u4f7f\u7528\u5e95\u7dda\u5206\u5272\u7fa4\u7d44<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u79d1\u5b78\u8a18\u865f<\/p>\n<\/td>\n<td>\n<p><strong>   Tag_FlR100:=1E3;       \/\/1000<\/strong><\/p>\n<p><strong>   Tag_FlR100:=1.2E+3;    \/\/1200<\/strong><\/p>\n<p><strong>   Tag_FlR100:=1E-3;      \/\/0.001<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u55ae\u4f4d\u7b26\u865f<\/p>\n<\/td>\n<td>\n<p><strong>G :  1e+9<\/strong><\/p>\n<p><strong>M :   1e+6<\/strong><\/p>\n<p><strong>K,k :  1e+3<\/strong><\/p>\n<p><strong>m :    1e-3 <\/strong><\/p>\n<p><strong>u :     1e-6<\/strong><\/p>\n<p><strong>n :      1e-9<\/strong><\/p>\n<p><strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/strong><\/p>\n<p><strong>   DR0:=1G;<\/strong><\/p>\n<p><strong>   R0:=1K;<\/strong><\/p>\n<p><strong>   R0:=1k;<\/strong><\/p>\n<p><strong>   DR0:=1M;<\/strong><\/p>\n<p><strong>   Tag_FlR100:=1m;<\/strong><\/p>\n<p><strong>   Tag_FlR100:=1n;<\/strong><\/p>\n<p><strong>   Tag_FlR100:=1u;<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u5b57\u4e32 <\/p>\n<p>(\u76ee\u524d\u53ea\u6709Label \u6307\u4ee4\u53ef\u4ee5\u4f7f\u7528)<\/p>\n<\/td>\n<td>\n<p><strong>\u7528 <\/strong>\u201c <strong>quote \u7b26\u865f \u5305\u8d77\u4f86\u7684ASCII \u5b57\u4e32<\/strong><\/p>\n<p><strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/strong><\/p>\n<p><strong>LBL (<\/strong> &quot;<strong>my_lab<\/strong>&quot;<strong> )<\/strong><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>3-8 \u4f7f\u7528PLC \u7684\u66ab\u5b58\u5668\u8ddf\u8a18\u61b6\u9ad4<\/h3>\n<p>\u9664\u4e86\u4f7f\u7528\u5efa\u7acbTag\u4f86\u8abf\u7528\u5c0d\u61c9\u7684\u66ab\u5b58\u5668\u4e4b\u5916\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u9593\u63a5\u66ab\u5b58\u5668\u540d\u4f86\u9032\u884c\u904b\u7b97\u6216\u662f\u6d41\u7a0b\u63a7\u5236\u3002 <\/p>\n<p><strong>\u53ea\u8981\u662f\u8a72\u66ab\u5b58\u5668\u7684\u8cc7\u6599\u578b\u614b\u70basingle word 16bit &#8212;&gt; INT16<\/strong><\/p>\n<p><strong>                          double word 32bit &#8212;&gt; INT32<\/strong><\/p>\n<p><strong>EX:<\/strong><\/p>\n<p><strong>      R29:=100;<\/strong><\/p>\n<p><strong>V:=19; \/\/\u9593\u63a5\u5b9a\u5740<\/strong><\/p>\n<p><strong>R200:= R10V+100;\t\tR200=200<\/strong><\/p>\n<p><strong>\u6bd4\u8f03\u7279\u5225\u7684T, C \u9019\u5169\u500b\u4f4d\u5143\u53ea\u6703\u6839\u64da\u7a0b\u5f0f\u7684\u908f\u8f2f\u6703\u6709bit \u6216\u662f int\u7684\u7279\u6027<\/strong><\/p>\n<p><strong>EX:<\/strong><\/p>\n<p><strong>\/\/\/ T1 \u8868\u793a\u70ba bit \u578b\u5225<\/strong><\/p>\n<p><strong>\/\/\/ \u4ee3\u8868\u662f\u5426timeout<\/strong><\/p>\n<p><strong>IF T1 THEN<\/strong><\/p>\n<p><strong>R10:=20;<\/strong><\/p>\n<p><strong>\/\/\/ T1\u8868\u793a\u7576\u524dtimer \u7684\u6578\u503c<\/strong><\/p>\n<p><strong>\/\/\/ \u70baint16\u7684\u6574\u6578<\/strong><\/p>\n<p><strong>ELSEIF T1&gt;100 THEN<\/strong><\/p>\n<p><strong>   R10:=30;<\/strong><\/p>\n<p><strong>END_IF<\/strong><\/p>\n<p><strong>\/\/\/\u9019\u6642\u5019\u6703\u628aT1\u7576\u6210Bit \u985e\u578b\u4f86\u505a\u53cd\u5411<\/strong><\/p>\n<p><strong>M0:=NOT T1;<\/strong><\/p>\n<h3>3-9 \u547c\u53eb\u7cfb\u7d71\u5167\u5efa\u7684\u51fd\u5f0f<\/h3>\n<p>\u5167\u5efa\u51fd\u5f0f\u8868\u9054\u7d50\u69cb\u6703\u5982\u4e0b\u6240\u793a<\/p>\n<p><em>&lt;\u51fd\u5f0f\u540d\u7a31&gt; (  &lt;\u53c3\u6578\u540d\u7a311&gt; := &lt;\u8f38\u5165\u53c3\u65781&gt; ,  \u2026.);<\/em><\/p>\n<p>\u548c\u968e\u68af\u5716\u4e00\u6a23\uff0cST\u5c31\u5e36\u6709\u4e00\u4e9b\u5167\u5efa\u7684\u51fd\u5f0f\u4f9b\u4f7f\u7528\u8005\u547c\u53eb\uff0c<\/p>\n<p>\u6703\u51fa\u73fe\u5728\u53f3\u5074\u7684\u5de5\u5177\u7bb1\u6b04\u4f4d\u4e2d\u3002<\/p>\n<p>\u53ef\u4ee5\u5f9e\u5de5\u5177\u7bb1\u62d6\u66f3 \u6216\u662f\u96d9\u64ca\u8a72\u6b04\u4f4d\uff0c\u4fbf\u6703\u65b0\u589e\u81f3\u6587\u672c\u4e2d\u3002<\/p>\n<p>\u5728\u547c\u53eb\u7684\u6642\u5019\uff0c\u53c3\u6578\u7684\u9806\u5e8f\u53ef\u4ee5\u96a8\u610f\u8b8a\u66f4\uff0c\u4f46\u662f\u4e0d\u80fd\u7f3a\u5c11\uff0c<\/p>\n<p>\u9664\u975e\u4e00\u4e9b\u7279\u6b8a\u6578\u5141\u8a31\u7701\u7565<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-043.png\" \/><\/p>\n<p>\u5176\u4e2d\u67d0\u4e9b\u51fd\u5f0f\u6703\u6709\u520632 bit \u6a21\u5f0f ( \u9810\u8a2d\u90fd\u662f16 bit \u6a21\u5f0f)<\/p>\n<p>\u6703\u9700\u8981\u518d\u8a72\u51fd\u5f0f\u5f8c\u9762\u52a0\u4e0a_D \u660e\u78ba\u6307\u793a\u8a72\u51fd\u793a\u70ba32 bit\u6a21\u5f0f  <\/p>\n<p>EX:\u4e8c\u9032\u5236\u78bc\u8f49\u63db\u683c\u96f7\u78bc      <\/p>\n<p><strong>\u932f\u8aa4\u8f49\u63db                                  \u6b63\u78ba\u8f49\u63db  <\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-044.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-045.png\" \/><\/p>\n<p><strong>\t<\/strong>\u5927\u90e8\u5206\u7684\u51fd\u5f0f\u90fd\u662f\u547c\u53eb\u5373\u57f7\u884c\uff0c\u5982\u4f7f\u7528\u6642\u5e0c\u671b\u689d\u4ef6\u9054\u6210\u5f8c\u53ea\u57f7\u884c\u4e00\u6b21\u52d5\u4f5c\uff0c\u53c3\u8003\u5beb\u6cd5<\/p>\n<p><strong>EX:<\/strong><\/p>\n<p><strong>IF R_TRIG( S:=\u201d\u689d\u4ef6\u201d ) then <\/strong><\/p>\n<p><strong>\u201c\u51fd\u5f0f\u201d<\/strong><\/p>\n<p><strong>END_IF<\/strong><\/p>\n<p><strong>!\u6ce8\u610f!<\/strong><\/p>\n<p><strong>\u5de5\u5177\u7bb1\u4e2d\u7684\u201dMotion Basic\u201d.\u201dMotion Mode1\u201d. \u201dMotion Mode2\u201d. \u201dMotion Mode3\u201d\u51fd\u5f0f\u9664\u975e\u689d\u4ef6\u72c0\u614b\u6709\u8b8a\u5316\uff0c\u5426\u5247\u90fd\u662f\u53ea\u57f7\u884c\u4e00\u6b21\u3002<\/strong><\/p>\n<p>\u6709\u95dc\u65bc\u6bcf\u500b\u547c\u53eb\u51fd\u6578\u7684\u7d30\u90e8\u53c3\u6578\u5167\u5bb9\uff0c\u5247\u8acb\u53c3\u8003FUN \u7684\u6587\u4ef6\uff0c\u4e0b\u9762\u5c31\u91dd\u5c0d\u5e7e\u500b\u4e0d\u540c\u7684FUN \u4f86\u4ecb\u7d39<\/p>\n<h4>3-9-1 Timer <\/h4>\n<p><strong>Prototype:<\/strong><\/p>\n<p>Timer( Trigger:=  (* Trigger Bit Rising Edge -&gt;ON, Falling Edge -&gt;OFF *), <\/p>\n<p>  T:=       (* Timer 0~1023 *), <\/p>\n<p>PV:=      (* preset value (0~32767) *), <\/p>\n<p>IsTimeout=&gt; (* time out bit *);<\/p>\n<p>      \u53c3\u6578:<\/p>\n<p>     Trigger  (bool)    :  Rising Edge \u5247\u70baTimer \u555f\u52d5\uff0c<\/p>\n<p>                    Falling Edge \u505c\u6b62\u904b\u884c<\/p>\n<p>         T       (int)     :  0~1023\u7684\u6574\u6578\uff0c\u5206\u5225\u4ee3\u8868T0~T1023\u7684Timer  \/\/0,T0\u2026etc<\/p>\n<p>       PV      (int)     :  Timer \u7684\u8a2d\u5b9a\u503c<\/p>\n<p>      IsTimeout  (bool)     :  Timer \u9054\u5230\u8a2d\u5b9a\u503c\u5f8c\u8f38\u51fa\u7684\u7dda\u5708  \/\/M0,T0\u2026etc<\/p>\n<p><strong>\u8a73\u7d30\u53c3\u6578\u8aaa\u660e\u8acb\u5c0d\u61c9 LD Timer \u7684\u8aaa\u660e\u6587\u4ef6<\/strong><\/p>\n<h4>3-9-2 Counter \/ Counter_L<\/h4>\n<p>\u9019\u88e1\u5206\u6210\u5169\u7d44Counter\u51fd\u5f0f\uff0c\u8b93\u4f7f\u7528\u8005\u80fd\u5bb9\u6613\u5206\u5225\u76ee\u524d\u547c\u53eb\u7684\u662f<\/p>\n<p>single word ( Counter ) \u7684counter \u9084\u662f double words (Counter_L) \u7684\u7248\u672c<\/p>\n<p><strong>Prototype:<\/strong><\/p>\n<p>Counter( Pulse:= (* Pulse Signal *), <\/p>\n<p>         Clr:= (* CLR Signal *), <\/p>\n<p>         C:= (* counter number (0~1023) *), <\/p>\n<p>         PV:= (* Preset value (Single Word 0~65535) *), <\/p>\n<p>         IsUp=&gt; (* Counter Is Up *);<\/p>\n<p>Counter_L( Pulse:= (* Pulse Signal *), <\/p>\n<p>           Clr:= (* CLR Signal *), <\/p>\n<p>           C:= (* counter number (1024~1279 Long counter) *), <\/p>\n<p>           PV:= (* Preset value (Double Words) *), <\/p>\n<p>           IsUp=&gt; (* Counter Is Up *);<\/p>\n<p>\u53c3\u6578:<\/p>\n<p>  Pulse     (bool)         :  Off-&gt;On \u5247\u6703\u8a08\u6578\u4e00\u6b21         \/\/M0,M9129\u2026etc<\/p>\n<p>Clr       (bool)         :  \u662f\u5426\u6e05\u9664counter<\/p>\n<p>    C        (int)           :  Counter id 0~1279 <\/p>\n<p>      PV       (int)           :  Counter \u8a2d\u5b9a\u503c<\/p>\n<p>        IsUp     (bool)          :  Counter\u9054\u5230\u8a2d\u5b9a\u503c\u5f8c\u8f38\u51fa\u7684\u7dda\u5708 \/\/M0,C0\u2026etc<\/p>\n<h4>3-9-3 R_TRIG  \/  F_TRIG<\/h4>\n<p>\u4e0a\u6cbf\u8a0a\u865f\u548c\u4e0b\u6cbf\u8a0a\u865f\u7684\u5075\u6e2cfunction<\/p>\n<p><strong>Prototype:<\/strong><\/p>\n<p><strong>     <\/strong> Mode 1:\t\t<\/p>\n<p>R_TRIG( S:= , D=&gt; )<\/p>\n<p>F_TRIG( S:= , D=&gt; )<\/p>\n<p>Mode 2:<\/p>\n<p>R_TRIG( S:= )<\/p>\n<p>F_TRIG( S:= )<\/p>\n<p>      \u96b1\u542bReturn Value D<\/p>\n<p><strong>\u53c3\u6578:<\/strong><\/p>\n<p><strong>           <\/strong> S   (bool)    :  Rising \/ Falling Edge \u5075\u6e2c\u4f86\u6e90<\/p>\n<p>            D   (bool)   :   \u5075\u6e2c\u7d50\u679c<\/p>\n<p>Example: <\/p>\n<p>       Mode 1:  R_TRIG(S:=M0, D:=M5);<\/p>\n<p>       Mode 2: <\/p>\n<p>                      IF R_TRIG(S:=M0) THEN<\/p>\n<p>                            ++R100;<\/p>\n<p>                      END_IF<\/p>\n<h4>3-9-4 TARESUB  and  TAREZEOFFSET<\/h4>\n<p>\u9019\u5169\u500b\u51fd\u5f0f\u662f\u7531\u539f\u672c\u7684 FUN258 MODCONF \u76ae\u91cd\u504f\u79fb\u6307\u4ee4 \u6a21\u5f0f\u62c6\u51fa\u4f86\u7684\uff0c\u8a73\u7d30\u53c3\u6578\u8a2d\u5b9a\u53ef\u4ee5\u53c3\u8003\u539f\u672cFUN258\u7684\u6587\u4ef6\u3002\u62c6\u6210\u5169\u500b\u7368\u7acb\u7684\u51fd\u5f0f\u4e5f\u662f\u4fbf\u65bc\u4f7f\u7528\u8005\u5728\u64b0\u5beb\u7684\u6642\u5019\u80fd\u5920\u4e00\u76ee\u4e86\u7136\u547c\u53eb\u7684\u529f\u80fd\u3002<\/p>\n<p>Prototype:<\/p>\n<p>TAREZEOFFSET( EN:= , MD:= , ID:= , CH:= , WR:= , ERR=&gt; , DN=&gt; )<\/p>\n<p>TARESUB( EN:= , RST:= , ID:= , CH:= , SB:= , ERR=&gt; )<\/p>\n<h3>3-10 \u5177\u6709\u591a\u91cd\u547c\u53eb\u6a21\u5f0f\u7684\u51fd\u5f0f<\/h3>\n<p>\u5982\u524d\u97623-9-3 \u7ae0\u7bc0\u4e2d\u7684\u89f8\u767c\u5075\u6e2c\u6307\u4ee4\uff0c\u9019\u4e9b\u6307\u4ee4\u90fd\u652f\u63f4\u5169\u7a2e\u578b\u614b\uff0c\u4e00\u7a2e\u662f\u76f4\u63a5\u5b8c\u6574\u547c\u53eb\uff0c\u53e6\u4e00\u7a2e\u662f\u7701\u7565\u5b58\u653e\u7d50\u679c\u7684\u66ab\u5b58\u5668\u4f4d\u7f6e(D)\uff0c\u4e0b\u8868\u5247\u70ba\u76ee\u524d\u5177\u6709\u8a72\u7279\u6027\u7684\u51fd\u5f0f\u3002<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p><strong>\u51fd\u5f0f\u540d\u7a31<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u5177\u6709\u56de\u50b3\u7279\u6027<\/strong><\/p>\n<p><strong>\u53c3\u6578\u540d\u7a31<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u51fd\u6578\u683c\u5f0f<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>FSQR<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>D<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>FSQR(S:= ,D:= )<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>FSIN<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>D<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>FSIN(S:= ,D:= )<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>FCOS<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>D<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>FCOS(S:= ,D:= )<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>FTAN<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>D<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>FTAN(S:= ,D:= )<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>FASIN<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>D<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>FASIN(S:= ,D:= ,MD:= )<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>FACOS<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>D<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>FACOS(S:= ,D:= ,MD:= )<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>R_TRIG<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>D<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>R_TRIG(S:= ,D:= )<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>F_TRIG<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>D<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>F_TRIG(S:= ,D:= )<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>ItoF<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>D<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>ItoF(S:= ,D:= )<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>FtoI<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>D<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>FtoI(S:= ,D:= )<\/strong><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u4e5f\u5c31\u662f\u8aaa\u4e0a\u8ff0\u9019\u4e9b\u51fd\u5f0f\u5177\u6709\u56de\u50b3\u7279\u6027\u7684\u53c3\u6578\u5728\u547c\u53eb\u7684\u6642\u5019\u53ef\u4ee5\u7701\u7565<\/p>\n<p>\u4e26\u4e14\u76f4\u63a5\u7528\u53e6\u4e00\u500b\u53c3\u6578\u627f\u63a5\u6216\u662f\u76f4\u63a5\u4f86\u904b\u7b97<\/p>\n<p><strong>EX:<\/strong><\/p>\n<p><strong>      \u6c92\u6709\u7701\u7565:<\/strong><\/p>\n<p><strong>     FSIN(S:=Tag_Float_DR100, D:=Tag_Float_DR102);<\/strong><\/p>\n<p>\u7701\u7565\u56de\u50b3\u53c3\u6578: (\u7531\u65bc\u56de\u50b3\u6578\u503c\u53ca\u4ee3\u8868\u7d50\u679c\uff0c\u5247\u53ef\u4ee5\u76f4\u63a5\u5e36\u5165\u4e00\u4e9b\u56db\u5247\u904b\u7b97\u6216\u662f\u689d\u4ef6\u662f\u5224\u65b7)<\/p>\n<p><strong>Tag_Float_DR200 := FSIN(S:=Tag_Float_DR100) + FSIN(S:=Tag_Float_DR102);<\/strong><\/p>\n<h3>3-11 \u8907\u9031\u671f\u6307\u4ee4\u96c6(Multi-cycle instructions)<\/h3>\n<p>\u4ee5\u4e0b\u6307\u4ee4\u5217\u8868\u70ba\u6301\u7e8c\u5728\u80cc\u666f\u904b\u4f5c\u578b\u6307\u4ee4, \u4f7f\u7528\u65b9\u5f0f\u70ba, \u653e\u5728IF\u8ff4\u5708\u5916, \u6bcf\u6b21\u6383\u63cf\u9031\u671f\u90fd\u57f7\u884c, \u6703\u4ee5EN\u8a0a\u865f\u662f\u5426\u6210\u7acb\uff0c\u6c7a\u5b9a\u8a72\u51fd\u5f0f\u7684\u904b\u884c\u72c0\u614b\u3002<\/p>\n<p><strong>\u5982\u4e0b\u5716\u7684\u7bc4\u4f8b:<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-046.png\" \/><\/p>\n<p>\u9019\u4e9b\u6307\u4ee4\u7684\u985e\u5225, \u56e0\u70ba\u547c\u53eb\u5f8c, \u57f7\u884c\u6642\u9593\u901a\u5e38\u90fd\u8d85\u904e\u4e00\u500b\u6383\u63cf\u9031\u671f\u3002<\/p>\n<p>\u4e0b\u8868\u70ba\u76ee\u524d\u6240\u6709\u7684\u8907\u9031\u671f\u6307\u4ee4<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p><strong>\u51fd\u5f0f\u540d\u7a31<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u51fd\u5f0fID<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>LCNV<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>33<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MLC<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>34<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>TPCTL2<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>99<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>RAMP2<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>98<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>HSPWM<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>139<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>HSPSO<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>140<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MPARA<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>141<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>PSOFF<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>142<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>PSCNV<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>143<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MPG<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>148<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>ModBUS<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>150<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>CLINK<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>151<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>ReadWriteFileReg<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>160<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>WriteSDMem<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>161<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>ReadSDMem<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>162<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>PID2<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>38<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>DBUF<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>115<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>ICA<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>137<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>ICF<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>138<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>NCR<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>152<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>CMCTL<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>156<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>HSPWM2<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>144<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>Timer<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>T<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>T.01s<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>87<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>T.1s<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>88<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>T1s<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>89<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFSysInit<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>187<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFSysStop<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>177<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFSysRstAlm<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>185<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFSysRCPR<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>188<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFSysRCPW<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>189<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFSysCAMR<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>191<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFSysCAMW<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>192<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFSysCAMGen<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>196<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFSysSetVirt<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>235<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFSDOR<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>236<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFSDOW<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>237<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFFlowStart<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>176<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFFlowStop<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>186<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFFlowHalt<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>184<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFFlowResume<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>183<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFChgTbPrm<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>181<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFMapTbPrm<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>198<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFPointMov<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>179<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFHome<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>178<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFJog<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>180<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFGearMPG<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>193<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFVelCtl<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>194<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFTorqCtl<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>195<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFAxMov<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>197<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFAxLMov<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>238<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFAxCirMov<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>239<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>MFPathMov<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>240<\/strong><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>3-12 \u4e2d\u65b7,\u7279\u6b8a\u6307\u4ee4\u555f\u52d5\/\u95dc\u9589\u6307\u4ee4<\/h3>\n<p>\u8acb\u53c3\u7167FUN 145, 146<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-047.png\" \/><\/p>\n<p>LB\u53c3\u6578\u53ef\u8f38\u51651~49\u7684\u6574\u6578\uff0c\u5206\u5225\u5c0d\u61c9\u4e2d\u65b7\u7684\u985e\u578b<\/p>\n<p>\u4e5f\u53ef\u85c9\u7531\u667a\u80fd\u5f48\u8df3\u63d0\u793a\u8996\u7a97\u9078\u53d6\u5c0d\u61c9\u4e2d\u65b7\u7684\u985e\u578b<\/p>\n<p><strong><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-048.png\" \/><\/strong><\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p><strong>No.<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u4e2d\u65b7\u6e90<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u512a\u5148\u5ea6<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u4e2d\u65b7\u6a19\u8a18<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u689d\u4ef6<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u5099\u8a3b<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>1<\/strong><\/p>\n<\/td>\n<td rowspan=\"16\">\n<p><strong>\u5167\u5efa\u6578\u4f4d\u8f38\u5165<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X0+I (INT0+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X0\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<td rowspan=\"16\">\n<p><strong>\u8edf\u9ad4\u9ad8\u901f\u8a08\u6578\u5668HSC4~HSC7\u53ef\u4ee5\u6307\u5b9a\u70ba\u4efb\u610f\u4e2d\u65b7X0~X15\u7684\u89f8\u767c\u6e90\u3002 \u56e0\u6b64\uff0c\u8edf\u9ad4\u9ad8\u901f\u8a08\u6578\u5668\u7684\u4e2d\u65b7\u512a\u5148\u6b0a\u53d6\u6c7a\u65bcX0~X15\u7684\u512a\u5148\u6b0a\u3002<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>2<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X0\u2212I (INT0-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X0\u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>3<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X1+I (INT1+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X1\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>4<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X1\u2212I (INT1-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X1\u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>5<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X2+I (INT2+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X2\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>6<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X2\u2212I (INT2-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X2\u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>7<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X3+I (INT3+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X3\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>8<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X3\u2212I (INT3-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X3\u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>9<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X4+I (INT4+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X4\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>10<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X4\u2212I (INT4-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X4\u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>11<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X5+I (INT5+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X5\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>12<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X5\u2212I (INT5-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X5\u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>13<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X6+I (INT6+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X6\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>14<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X6\u2212I (INT6-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X6\u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>15<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X7+I (INT7+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X7\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>16<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X7\u2212I (INT7-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X7\u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>17<\/strong><\/p>\n<\/td>\n<td rowspan=\"8\">\n<p><strong>\u5167\u90e8\u5b9a\u6642\u6642\u57fa<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>3<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>STM0I<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u9593\u96941ms~60000ms<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u6642\u57fa\u55ae\u4f4d1ms\uff0c\u503c=1~60000<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>18<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>3<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>STM1I<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u9593\u96941ms~60000ms<\/strong><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>19<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>3<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>STM2I<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u9593\u96941ms~60000ms<\/strong><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>20<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>3<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>STM3I<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u9593\u96941ms~60000ms<\/strong><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>21<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>3<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>LTM0I<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u9593\u969410ms~60000ms<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u6642\u57fa\u55ae\u4f4d10ms\uff0cValue=1~6000<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>22<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>3<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>LTM1I<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u9593\u969410ms~60000ms<\/strong><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>23<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>3<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>LTM2I<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u9593\u969410ms~60000ms<\/strong><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>24<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>3<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>LTM3I<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u9593\u969410ms~60000ms<\/strong><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>25<\/strong><\/p>\n<\/td>\n<td rowspan=\"4\">\n<p><strong>HST<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>1<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>HST0I<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u9593\u96940.1ms to 6000ms<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u6642\u57fa\u55ae\u4f4d100us\uff0cValue=1~60000<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>26<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>1<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>HST1I<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u9593\u96940.1ms to 6000ms<\/strong><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>27<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>1<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>HST2I<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u9593\u96940.1ms to 6000ms<\/strong><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>28<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>1<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>HST3I<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u9593\u96940.1ms to 6000ms<\/strong><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>33<\/strong><\/p>\n<\/td>\n<td rowspan=\"8\">\n<p><strong>HSC<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>2<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>HSC0I<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u9593\u9694HSC0 to (CV=PV)<\/strong><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>34<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>2<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>HSC1I<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u9593\u9694HSC1 to (CV=PV)<\/strong><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>35<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>2<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>HSC2I<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u9593\u9694HSC2 to (CV=PV)<\/strong><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>36<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>2<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>HSC3I<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u9593\u9694HSC3 to (CV=PV)<\/strong><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>37<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>2<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>HSC4I<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u9593\u9694HSC4 to (CV=PV)<\/strong><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>38<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>2<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>HSC5I<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u9593\u9694HSC5 to (CV=PV)<\/strong><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>39<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>2<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>HSC6I<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u9593\u9694HSC6 to (CV=PV)<\/strong><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>40<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>2<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>HSC7I<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u9593\u9694HSC7 to (CV=PV)<\/strong><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>66<\/strong><\/p>\n<\/td>\n<td rowspan=\"16\">\n<p><strong>\u5167\u5efa\u6578\u4f4d\u8f38\u5165(MA \u7cfb\u5217)<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X8+I (INT8+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X8 \u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<td rowspan=\"32\">\n<p><strong>\u8edf\u9ad4\u9ad8\u901f\u8a08\u6578\u5668HSC4~HSC7\u53ef\u4ee5\u6307\u5b9a\u70ba\u4efb\u610f\u4e2d\u65b7X0~X15\u7684\u89f8\u767c\u6e90\u3002 \u56e0\u6b64\uff0c\u8edf\u9ad4\u9ad8\u901f\u8a08\u6578\u5668\u7684\u4e2d\u65b7\u512a\u5148\u6b0a\u53d6\u6c7a\u65bcX0~X15\u7684\u512a\u5148\u6b0a\u3002<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>67<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X8\u2212I (INT8-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X8\u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>68<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X9+I (INT9+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X9\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>69<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X9\u2212I (INT9-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X9\u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>70<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X10+I (INT10+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X10\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>71<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X10\u2212I (INT10-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X10\u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>72<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X11+I (INT11+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X11\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>73<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X11\u2212I (INT11-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X11\u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>74<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X12+I (INT12+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X12\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>75<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X12\u2212I (INT12-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X12\u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>76<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X13+I (INT13+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X13\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>77<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X13\u2212I (INT13-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X13\u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>78<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X14+I (INT14+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X14\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>79<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X14\u2212I (INT14-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X14\u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>80<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X15+I (INT15+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X15\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>81<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X15\u2212I (INT15-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X15 \u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>82<\/strong><\/p>\n<\/td>\n<td rowspan=\"16\">\n<p><strong>MQ model DI Plug-in<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X16+I (INT15+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X16\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>83<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X16\u2212I (INT15-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X16 \u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>84<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X17+I (INT15+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X17\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>85<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X17\u2212I (INT15-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X17 \u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>86<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X18+I (INT15+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X18\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>87<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X18\u2212I (INT15-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X18 \u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>88<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X19+I (INT15+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X19\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>89<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X19\u2212I (INT15-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X19 \u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>90<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X20+I (INT15+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X20\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>91<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X20\u2212I (INT15-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X20\u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>92<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X21+I (INT15+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X21\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>93<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X21\u2212I (INT15-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X21\u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>94<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X22+I (INT15+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X22\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>95<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X22\u2212I (INT15-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X22 \u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>96<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X23+I (INT15+)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X23\u4e0a\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>97<\/strong><\/p>\n<\/td>\n<td><\/td>\n<td>\n<p><strong>X23\u2212I (INT15-)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>X23 \u4e0b\u6cbf\u89f8\u767c<\/strong><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>3-13 \u5177\u6709\u7279\u6b8a\u610f\u7fa9\u7684\u8b8a\u6578\u540d\u7a31<\/h3>\n<ol>\n<li><strong>Timer, Counter<br \/>   T0~TN,  C0~CN<\/strong><\/li>\n<\/ol>\n<p>\u5728ST\u74b0\u5883\u4e2d\u8ce6\u4e88\u9019\u5169\u500b\u8b8a\u6578\u540c\u6642\u5177\u6709Bool \u7684\u7279\u6027\u8ddfInteger\u6574\u6578\u7684\u7279\u6027<\/p>\n<p><strong>       \u4f8b\u5982:<\/strong><\/p>\n<p><strong>            R0:=T1;  \/\/\u6703\u628aTimer1 \u76ee\u524d\u8a08\u7b97\u5230\u7684\u6578\u503c\u5b58\u5230R0(Integer)<\/strong><\/p>\n<p><strong>            M0:=T1;  \/\/ \u6703\u628aTimer1 \u76ee\u524d\u662f\u5426\u5728\u904b\u884c\u7684\u72c0\u614b\u5b58\u5230M0 (Bool)<\/strong><\/p>\n<p><strong>            M3:=C1&gt;10; \/\/ \u5247\u6703\u5224\u65b7Counter 1\u662f\u5426\u8a08\u6578\u8d85\u904e10 <\/strong><\/p>\n<p><strong>            IF R_TRIG( T1 ) THEN <\/strong><\/p>\n<p><strong>\t\t\t\t\t\t\t\t \/\/\/ \u7576Timer1 \u5f9e0\u8b8a1\u7684\u6642\u5019 (\u958b\u59cb\u904b\u884c\u7684\u77ac\u9593),\u5247\u6703\u57f7\u884c<\/strong><\/p>\n<p><strong>\t\t\t\t\t\t\tEND_IF<\/strong><\/p>\n<ol>\n<li><strong>\u4e2d\u65b7Enum<br \/><\/strong>\u539f\u672cEnable \/ Disable \u4e2d\u65b7\u53ea\u80fd\u8f38\u5165\u5e38\u6578\uff0c\u70ba\u4e86\u8b93\u7a0b\u5f0f\u770b\u8d77\u4f86\u53ef\u8b80\u6027\u63d0\u9ad8\uff0c\u4fee\u6539\u70ba\u53ef\u4ee5\u8f38\u5165\u7cfb\u7d71\u9810\u8a2d\u7684Enum \u53c3\u6578\uff0c\u53ef\u4ee5\u6253 INT_ \u7684\u5b57\u6a23\u5c31\u6703\u986f\u793a\u5c0d\u61c9\u7684\u4e00\u7cfb\u5217\u53ef\u7528\u7684Enum\u3002<br \/><strong>       <\/strong><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-049.png\" \/><\/li>\n<\/ol>\n<p><strong>       \u4f8b\u5982:<\/strong><\/p>\n<p><strong>IF M2 THEN<\/strong><\/p>\n<p><strong>    INTEnable( LB:= INT_STM1I);<\/strong><\/p>\n<p><strong>ELSE<\/strong><\/p>\n<p><strong>    INTDisable( LB:= INT_STM1I);<\/strong><\/p>\n<p><strong>END_IF<\/strong><\/p>\n<ol>\n<li><strong>\u9ad8\u901f\u8a08\u6578 Enum  \u201cHSC_\u201d  Prefix<\/strong><\/li>\n<\/ol>\n<p><strong>  \u547c\u53eb\u76f8\u95dc\u9ad8\u901f\u6307\u4ee4\u5982<\/strong><\/p>\n<p><strong>  HSCTR( CN:= (* 0~7 *));<\/strong><\/p>\n<p><strong>  HSCTW( S:= , CN:= , D:= );<\/strong><\/p>\n<p><strong>  \u5176\u4e2dCN , \u8ddfD \u7684\u53c3\u6578\u5f0f\u652f\u63f4\u5e38\u6578\u6574\u6578\uff0c\u70ba\u4e86\u95b1\u8b80\u65b9\u4fbf \u4e5f\u5c0e\u5165HSC_ \u958b\u982d\u7684Enum<\/strong><\/p>\n<p><strong>   <img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-050.png\" \/><\/strong><\/p>\n<p><strong>   \u8b93\u7a0b\u5f0f\u66f4\u5177\u53ef\u8b80\u6027<\/strong><\/p>\n<p><strong>   \u4f8b\u5982:<\/strong><\/p>\n<p><strong>            HSCTR( CN:= HSC_HSC0(* 0~7 *));<\/strong><\/p>\n<p><strong>            HSCTW( S:=R0 , CN:=HSC_HSC0 , D:=HSC_PV );<\/strong><\/p>\n<ol>\n<li><strong>File Register Enum  F0~F32767<br \/>   <\/strong>\u91dd\u5c0dFUN 160 \u7684Sb \u53c3\u6578\uff0c\u9664\u4e86\u4f7f\u75280~32767\u4e4b\u5916\uff0c\u53ef\u4ee5\u4f7f\u7528F0~F32767\u7684Enum \u4f86\u4ee3\u8868\u5c0d\u61c9\u7684\u4f4d\u7f6e.<\/li>\n<\/ol>\n<p><strong>   \u4f8b\u5982:<\/strong><\/p>\n<p><strong>   <\/strong><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-051.png\" \/><\/p>\n<h3>3-14 \u547c\u53ebFCM\u51fd\u6578<\/h3>\n<p>\u547c\u53ebFCM\u7684\u65b9\u5f0f\u8207\u547c\u53eb\u7cfb\u7d71\u51fd\u5f0f\u985e\u4f3c\uff0c\u4e0d\u904e\u9019\u4e9bFCM\u51fd\u5f0f\u90fd\u662f\u4f7f\u7528\u8005\u81ea\u884c\u5275\u5efa\u7684<\/p>\n<p>\u5275\u5efa\u7684FCM\u6703\u653e\u5728\u5de6\u5074\u7684\u547d\u4ee4\u6b04\u4f4d\u4e2d\u7684FCM list<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-052.png\" \/><\/p>\n<p>\u53ef\u4ee5\u76f4\u63a5\u96d9\u64ca \u8a72\u6b04\u4f4d\uff0c\u63d2\u5165\u6240\u9078\u53d6\u7684\u51fd\u6578\u5230\u6587\u672c<\/p>\n<p>\u5176\u4e2d FCM\u53ef\u4ee5\u6307\u5b9a\u4e00\u500bReturn Value, \u7528\u4f86\u4f7f\u7528\u5728\u7a0b\u5f0f\u64b0\u5beb\u7684\u6642\u5019\u53ef\u4ee5\u76f4\u63a5\u8abf\u7528<\/p>\n<p><strong>EX:<\/strong><\/p>\n<p><strong>FCM: <\/strong><\/p>\n<p><strong>   <img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-053.png\" \/><\/strong><\/p>\n<p><strong>\u547c\u53eb\u7aef:<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-054.png\" \/><\/p>\n<p>\u9019\u6a23\u53ef\u4ee5\u9069\u6642\u5730\u6e1b\u5c11\u4e00\u4e9b\u66ab\u6642\u4e0d\u9700\u8981\u7684\u8b8a\u6578\u5ba3\u544a<\/p>\n<h3>3-15 \u51fd\u6578\u6ce8\u610f\u4e8b\u9805<\/h3>\n<p>\u7121\u8ad6\u662f\u547c\u53eb\u7cfb\u7d71\u5167\u5efa\u7684\u6216\u662f FCM \u5747\u6709\u4ee5\u4e0b\u5171\u540c\u7279\u9ede<\/p>\n<ol>\n<li><strong>\u547c\u53eb\u65b9\u5f0f :<br \/>   1. \u5b8c\u6574\u5e36\u5165\u53c3\u6578\u540d\u7a31<br \/>   2. \u7701\u7565\u53c3\u6578\u540d\u7a31<br \/>   3. \u8f38\u51fa\u53c3\u6578(=&gt;)\u53ef\u4ee5\u76f4\u63a5\u5ffd\u7565\u4e0d\u50b3\u905e<br \/>      \u7bc4\u4f8b:<\/strong><\/li>\n<\/ol>\n<p><strong>      \u4ee5R_TRIG \u9019\u500b\u51fd\u5f0f\u70ba\u4f8b<\/strong><\/p>\n<p><strong>      \u5b8c\u6574\u8868\u73fe :  R_TRIG( S:= M0,  D=&gt;M1 );<\/strong><\/p>\n<p><strong>                 \u7528\u53c3\u6578\u5e36\u5165\u7684\u8a71\u5141\u8a31\u4e0d\u6309\u7167\u9810\u8a2d\u7684\u9806\u5e8f<\/strong><\/p>\n<p><strong>                 \u4e0a\u8ff0\u7684\u51fd\u5f0f\u53ef\u4ee5\u6539\u6210<\/strong><\/p>\n<p><strong>                 R_TRIG( D=&gt;M1,  S:= M0 );<\/strong><\/p>\n<p><strong>                 R_TRIG( D=&gt;M1);<\/strong><\/p>\n<p><strong>                 \u90fd\u662f\u5408\u6cd5\u8f38\u5165<\/strong><\/p>\n<p><strong>      \u7701\u7565\u53c3\u6578\u540d\u7a31 :  R_TRIG( M0,  M1 );<\/strong><\/p>\n<p><strong>      \u5e36\u6709Return \u6548\u679c\u6216\u662f\u8f38\u51fa\u7684\u53ef\u4ee5\u4e0d\u50b3\u905e :<\/strong><\/p>\n<p><strong>                   R_TRIG( S:= M0 );<\/strong><\/p>\n<p><strong>                   R_TRIG( M0 );<\/strong><\/p>\n<p><strong>      \u6709 Return \u7279\u6027\u7684\u53ef\u4ee5\u8207\u5176\u4ed6\u8b8a\u6578\u6216\u662f\u63cf\u8ff0\u53e5\u6df7\u5408\u904b\u7528<\/strong><\/p>\n<p><strong>                   IF R_TRIG(M0) THEN<\/strong><\/p>\n<p><strong>                     \/\/\/\/ some statements<\/strong><\/p>\n<p><strong>                   END_IF<\/strong><\/p>\n<p><strong>                   M10:= R_TRIG(M0) AND R_TRIG(M1);<\/strong><\/p>\n<p><strong>         <br \/>      ! \u6ce8\u610f !  \u5e36\u5165\u53c3\u6578\u8ddf\u4e0d\u5e36\u5165\u53c3\u6578\u7684\u547c\u53eb\u65b9\u5f0f\u4e0d\u80fd\u6df7\u7528\u5982:<\/strong><\/p>\n<p><strong>               R_TRIG(S:=M0, M1);<\/strong><\/p>\n<p><strong>               R_TRIG(M1,D:=M2);<\/strong><\/p>\n<p><strong>               \u4ee5\u4e0a\u5169\u500b\u90fd\u662f\u4e0d\u5408\u6cd5\u7684\u8f38\u5165<\/strong><\/p>\n<h3>3-16 VAR \u5ba3\u544a\u8a9e\u6cd5<\/h3>\n<p>\u4f7f\u7528\u8005\u53ef\u4ee5\u5728\u6587\u672c\u88e1\u982d\u76f4\u63a5\u5ba3\u544aTag \u8b8a\u6578.<\/p>\n<p><strong>\u8a9e\u6cd5:<\/strong><\/p>\n<p><strong>VAR  [RETAIN]<\/strong><\/p>\n<p><strong>    &lt;\u8b8a\u6578&gt;  :  &lt;\u578b\u5225&gt; ;<\/strong><\/p>\n<p><strong>END_VAR<\/strong><\/p>\n<p><strong>\u89e3\u91cb:<\/strong><\/p>\n<p><strong>&lt;\u8b8a\u6578&gt;  \u7528\u4f86\u547d\u540d\u6a19\u7c64\u8b8a\u6578\u540d\u7a31\u7684\u5b57\u4e32<br \/>        \u4e26\u4e14\u53ef\u4ee5\u7528\u9017\u865f \u6279\u6b21\u5ba3\u544a\u540c\u6a23\u578b\u5225\u7684\u8b8a\u6578<\/strong><\/p>\n<p><strong>        \u4e5f\u53ef\u4ee5\u4f7f\u7528AT \u5b57\u6a23 \u660e\u78ba\u95dc\u806f\u4f4d\u7f6e<\/strong><\/p>\n<p><strong>        Ex.<\/strong><\/p>\n<p><strong>           VAR1           : BOOL;<\/strong><\/p>\n<p><strong>           VAR2, VAR3, VAR4 : INT;<\/strong><\/p>\n<p><strong>           VAR5 AT R100    : INT;<\/strong><\/p>\n<p><strong>        AT \u652f\u63f4<\/strong><\/p>\n<ol>\n<li><strong>\u95dc\u806f\u4e00\u822c\u66ab\u5b58\u5668\u7684\u4f4d\u7f6e<br \/>  \u8f38\u5165 X, Y, M, V, Z, P0~P9, R, D, DR, DD, WX, WY, WM<\/strong><\/li>\n<li><strong>\u4f7f\u7528 % \u5b9a\u5740 DeviceView \u4e0a\u7684\u8cc7\u6e90<br \/>   \u4f7f\u7528\u8005\u8f38\u5165%\u5f8c\u6703\u6839\u64da\u76ee\u524dDeviceView \u986f\u793a\u6240\u6709\u53ef\u4ee5\u7d81\u5b9a\u7684\u4f4d\u7f6e<\/strong><\/li>\n<\/ol>\n<p><strong>   %I   ==&gt; \u6a21\u7d44 X \u7684\u4f4d\u7f6e<\/strong><\/p>\n<p><strong>   %Q  ==&gt; \u6a21\u7d44 Y \u7684\u4f4d\u7f6e<\/strong><\/p>\n<p><strong>   %SM ==&gt; \u6a21\u7d44\u7684\u72c0\u614bM\u66ab\u5b58\u5668<\/strong><\/p>\n<p><strong>   %SR ==&gt;  \u6a21\u7d44\u7684\u72c0\u614bR\u66ab\u5b58\u5668<\/strong><\/p>\n<p><strong>   %IR ==&gt;  \u6a21\u7d44\u908f\u8f2f\u8f38\u5165\u66ab\u5b58\u5668<\/strong><\/p>\n<p><strong>   %OR==&gt;  \u6a21\u7d44\u908f\u8f2f\u8f38\u51fa\u66ab\u5b58\u5668 <\/strong><\/p>\n<p><strong>   \u5f8c\u9762\u7684\u5f62\u5f0f\u53ef\u4ee5\u662f <\/strong><\/p>\n<ol>\n<li><strong> &lt;\u6578\u5b57N&gt; :  \u53ea\u91dd\u5c0dPLC\u4e3b\u6a5f\u4e0a\u7b2cN\u500b\u8cc7\u6e90<\/strong><\/li>\n<li><strong> &lt;\u64f4\u5145\u6a21\u7d44ID&gt; . &lt;\u6578\u5b57N&gt; : \u91dd\u5c0d\u67d0\u500bID\u64f4\u5145\u6a21\u7d44\u7684\u7b2cN\u500b\u8cc7\u6e90<\/strong><\/li>\n<\/ol>\n<p><strong>Example:<\/strong><\/p>\n<p><strong>                       VAR <\/strong><\/p>\n<p><strong>    zLocation   AT  Z  :  INT;<\/strong><\/p>\n<p><strong>    rlocation    AT R0  :  INT;<\/strong><\/p>\n<p><strong>    x_loca      AT X10  : BOOL;<\/strong><\/p>\n<p><strong>    y_loc       AT Y11 :  BOOL;<\/strong><\/p>\n<p><strong>    d_loc       AT D10 :  INT;<\/strong><\/p>\n<p><strong>    m_loc       AT M100 : BOOL;<\/strong><\/p>\n<p><strong>    dd_loc      AT DD10:  INT32;<\/strong><\/p>\n<p><strong>    dr_loc      AT DR20 :  INT32;<\/strong><\/p>\n<p><strong>    wx_loc      AT WX0 :  INT16;<\/strong><\/p>\n<p><strong>    wy_loc      AT WY16 :  INT16;<\/strong><\/p>\n<p><strong>    dwx_loc     AT DWX16:  INT32;<\/strong><\/p>\n<p><strong>    dwy_loc     AT DWY32 :  INT32;<\/strong><\/p>\n<p><strong>    p_loc        AT P0  :  INT16;<\/strong><\/p>\n<p><strong>    \/\/\/ID : 2, \u7b2c\u4e8c\u500bOR<\/strong><\/p>\n<p><strong>    AIO_Output_Ch1 AT %OR2.1  : int16;<\/strong><\/p>\n<p><strong>END_VAR     <\/strong><\/p>\n<p><strong>&lt;\u578b\u5225&gt;  \u652f\u63f4\u95dc\u9375\u5b57 <br \/>BOOL,  INT\/INT16,  UINT\/UINT16,  DINT\/INT32,  UDINT\/UINT32,  FLOAT<\/strong><\/p>\n<p><strong>        \u4e26\u4e14\u53ef\u4ee5\u7d66\u4e88\u521d\u59cb\u6578\u503c<\/strong><\/p>\n<p><strong>        Ex. <\/strong><\/p>\n<p><strong>           BOOL:=FALSE<\/strong><\/p>\n<p><strong>           INT:=10<\/strong><\/p>\n<p><strong>\u88dc\u5145:<\/strong><\/p>\n<ol>\n<li><strong>\u5982\u679c\u4f7f\u7528\u8005\u6c92\u6709\u660e\u78ba\u95dc\u806f\u6a19\u7c64\u7684\u4f4d\u7f6e (AT)  \u5247\u6703\u6839\u64da\u4e0b\u5716(Memory Allocation)\u4ecb\u9762\u4e2d\u7684<\/strong><\/li>\n<\/ol>\n<p><strong>STX VAR \u7684\u5206\u9801 \u4f86\u81ea\u52d5\u5206\u914d\u8b8a\u6578\u914d\u7f6e\u7684M, R \u8cc7\u6e90 (M\u662f\u5206\u914d\u7d66BOOL, \u5176\u9918\u7684\u662f\u7528 R\u4f86\u5206\u914d\u7684)<br \/><\/strong><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-055.png\" \/><\/p>\n<ol>\n<li><strong>\u5ba3\u544a\u51fa\u4f86\u7684\u8b8a\u6578 \u8ddf\u539f\u672c\u7684\u6a19\u7c64\u7684\u529f\u80fd\u4e00\u6a23,\u6240\u4ee5\u4e5f\u90fd\u662f\u5168\u57df\u8b8a\u6578,\u5fc5\u9808\u8981\u6ce8\u610f\u4e0d\u80fd\u8ddf\u6240<\/strong><\/li>\n<\/ol>\n<p><strong>\u6709\u7684\u6a19\u7c64\u540d\u7a31\u91cd\u8907.<\/strong><\/p>\n<ol>\n<li><strong>\u5982\u679c\u4f7f\u7528\u55ae\u7d14 VAR \u4f86\u5ba3\u544a,\u9810\u8a2d\u81ea\u52d5\u5206\u914d\u7684\u4f4d\u7f6e\u70ba\u975e\u4fdd\u6301\u7684\u5340\u9593,\u5982\u679c\u9700\u8981\u81ea\u52d5\u5339\u914d\u4fdd\u6301\u7684\u4f4d\u7f6e, \u5247\u4f7f\u7528 VAR RETAIN \u4f86\u81ea\u52d5\u5339\u914d\u6a19\u7c64\u5c0d\u61c9\u7684\u5340\u6bb5 \u5982\u4e0b\u5716:<br \/><\/strong><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-056.png\" \/><\/li>\n<li><strong>\u5982\u679c\u5728VAR RETAIN \u5167\u624b\u52d5\u6307\u5b9a\u4e86\u975e\u4fdd\u6301\u7684\u5340\u6bb5 ,\u5247\u6703\u6709\u8b66\u544a\u51fa\u4f86\u5982\u4e0b\u5716:<\/strong><\/li>\n<\/ol>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m05-zh-03\/mplc-m05-zh-03-057.png\" \/><strong><br \/><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>3-1 \u7c21\u4ecb \u672c\u7ae0\u5c0d\u4f7f\u7528\u57fa\u672cST\u8a9e\u8a00\u7de8\u5beb\u7a0b\u5f0f\u7684\u65b9\u6cd5\u9032\u884c\u8aaa\u660e\u3002 3-1-1 \u5b57\u5143\u7de8\u78bc ST \u7de8\u8f2f\u5668\u652f\u6301Unico [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[],"class_list":["post-3123","post","type-post","status-publish","format-standard","hentry","category-zh-mplc-m05"],"_links":{"self":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/posts\/3123","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/comments?post=3123"}],"version-history":[{"count":0,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/posts\/3123\/revisions"}],"wp:attachment":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/media?parent=3123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/categories?post=3123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/tags?post=3123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}