{"id":23,"date":"2026-08-26T00:20:06","date_gmt":"2026-08-25T16:20:06","guid":{"rendered":"http:\/\/115.29.220.116\/?p=23"},"modified":"2026-08-26T00:53:33","modified_gmt":"2026-08-25T16:53:33","slug":"23","status":"publish","type":"post","link":"https:\/\/www.wnblog.cn\/index.php\/2026\/08\/26\/23\/","title":{"rendered":"S7-1200\u8fd0\u52a8\u63a7\u5236\u6307\u4ee4V8.0\u4f7f\u7528\uff08\u4e00\uff09"},"content":{"rendered":"\n<div class=\"crossnote markdown-preview  \">\n      \n\n<p style=\"text-indent:2em;\"><span style=\"color:#0066cc;\">\u6307\u4ee4\u8def\u5f84\uff1a\u5de5\u827a\u9009\u9879-&gt;Motion Control<\/span><\/p>\n\u6240\u6709\u8fd0\u52a8\u6307\u4ee4\u90fd\u57fa\u4e8e<span style=\"font-size:16px;font-weight:bold;\">\u5b9a\u4f4d\u8f74\u5de5\u827a\u5bf9\u8c61<\/span> ,\u6bcf\u6761\u6307\u4ee4\u901a\u7528\u8f93\u51fa\uff1aDone\u3001Busy\u3001Error\u3001ErrorID\u3002\nExecute\uff1a\u4e0a\u5347\u6cbf\u89e6\u53d1\uff1bMC_Power \u5fc5\u987b\u6bcf\u4e2a\u626b\u63cf\u5468\u671f\u8c03\u7528\uff0c\u4e0d\u80fd\u6761\u4ef6\u6267\u884c\u3002\n<h2>1.\u6307\u4ee4MC_POWER<\/h2>\n<p>\u529f\u80fd\uff1a\u4f7f\u80fd\u8f74\u6216\u7981\u7528\u8f74<br>\n\u4f7f\u7528\u8981\u70b9\uff1a\u5728\u7a0b\u5e8f\u91cc\u4e00\u76f4\u8c03\u7528\uff0c\u5e76\u4e14\u5728\u5176\u4ed6\u8fd0\u52a8\u63a7\u5236\u6307\u4ee4\u4e4b\u524d\u8c03\u7528\u5e76\u4f7f\u80fd\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wnblog.cn\/images\/PLC_002_01.png\" alt=\"\u56fe\u7247\u63cf\u8ff0\"><\/p>\n<h3>\u8f93\u5165\u53c2\u6570<\/h3>\n<ul>\n<li><strong>Axis<\/strong><\/li>\n<\/ul>\n<p style=\"text-indent:2em;\"> \u8f74\u5de5\u827a\u5bf9\u8c61\uff0c`TO_PositioningAxis`\u3002\u76f4\u63a5\u62d6\u62fd\u9879\u76ee\u6811\u91cc\u7684\u8f74 DB \u5230\u6b64\u5f15\u811a\uff0c\u6307\u5b9a\u8981\u64cd\u4f5c\u54ea\u4e00\u6839\u8f74\u3002\u2003\u2003<\/p>\n<p style=\"text-indent:2em;\"><span style=\"color:#dc3545;\">\u4e00\u6839\u8f74\u5bf9\u5e94\u4e00\u4e2a MC_Power \u5b9e\u4f8b\uff0c\u4e0d\u80fd\u591a\u8f74\u5171\u7528\u540c\u4e00\u4e2a\u80cc\u666f DB\u3002<\/span>\u2003\u2003<\/p> \n<ul>\n<li><strong>Enable\uff08BOOL\uff09\u8f74\u603b\u4f7f\u80fd<\/strong><\/li>\n<\/ul>\n <p style=\"text-indent:2em;\">Enable=1\uff1a\u8bf7\u6c42\u9a71\u52a8\u5668\u4e0a\u4f7f\u80fd\uff0c\u8f74\u5c31\u7eea\uff0c\u63a5\u901a\u7535\u6e90\uff0c\u53ef\u4ee5\u63a5\u6536\u8fd0\u52a8\u6307\u4ee4\u3002<\/p> \n <p style=\"text-indent:2em;\"> Enable=0\uff1a\u65ad\u5f00\u8f74\u4f7f\u80fd\uff0c\u8f74\u6309\u7167StopMode \u5b9a\u4e49\u7684\u65b9\u5f0f\u505c\u673a\uff0c\u505c\u6b62\u5e76\u7981\u7528\u8f74\u3002<\/p>\n<p><span style=\"color:#dc3545;\">\u6ce8\u610f\uff1a\u4e0d\u662f\u4e0a\u5347\u6cbf\uff0c\u662f\u7535\u5e73\u4fe1\u53f7\uff1b\u53ea\u8981\u9700\u8981\u8f74\u5de5\u4f5c\uff0c\u5c31\u4fdd\u6301 TRUE\u3002<\/span><\/p>\n<ul>\n<li><strong>StartMode\uff08Int\uff09\u542f\u52a8\u6a21\u5f0f<\/strong><\/li>\n<\/ul>\n<p style=\"text-indent:2em;\">Enable = 0:\u542f\u7528\u4f4d\u7f6e\u4e0d\u53d7\u63a7\u7684\u5b9a\u4f4d\u8f74\uff0c\u5373\u901f\u5ea6\u63a7\u5236\u6a21\u5f0f\u3002\u2003\u2003<\/p> \n<p style=\"text-indent:2em;\">Enable = 1:\u542f\u7528\u4f4d\u7f6e\u53d7\u63a7\u7684\u5b9a\u4f4d\u8f74\uff0c\u5373\u4f4d\u7f6e\u63a7\u5236\uff08\u9ed8\u8ba4\uff09\u3002\u2003\u2003<\/p> \n <p style=\"text-indent:2em;\"><span style=\"color:#dc3545;\">1.\u4f7f\u7528\u5e26PTO\u9a71\u52a8\u5668\u7684\u5b9a\u4f4d\u8f74\u65f6\u5ffd\u7565\u8be5\u53c2\u6570\u3002<\/span>\u2003\u2003<\/p> \n <p style=\"text-indent:2em;\"><span style=\"color:#dc3545;\">2.\u53ea\u6709\u5728\u4fe1\u53f7\u68c0\u6d4b\u548c\uff080\u53d8\u4e3a1\uff09\u671f\u95f4\u624d\u4f1a\u8bc4\u4f30StartMode\u53c2\u6570\u3002<\/span>\u2003<\/p>\n<ul>\n<li><strong>StopMode\uff08Int\uff09\u505c\u6b62\u6a21\u5f0f<\/strong><\/li>\n<\/ul>\n <p style=\"text-indent:2em;\">StopMode = 0:\u7d27\u6025\u505c\u6b62\uff0c\u6309\u7167\u5de5\u827a\u5bf9\u8c61\u7ec4\u6001\u7684\u6025\u505c\u51cf\u901f\u5ea6\u659c\u5761\u51cf\u901f\u5230 0\uff0c\u8f74\u9759\u6b62\u4e4b\u540e\uff0c\u518d\u65ad\u5f00\u4f7f\u80fd\u3002\u7535\u673a\u5239\u8f66\u53d7\u63a7\u51cf\u901f\uff0c\u4e0d\u4f1a\u76f4\u63a5\u8131\u5f00\u3002\u2003<\/p> \n<p style=\"text-indent:2em;\">StopMode = 1:\u7acb\u5373\u505c\u6b62\uff0c\u7acb\u523b\u505c\u6b62\u8f93\u51fa\u8109\u51b2\uff0c\u76f4\u63a5\u65ad\u5f00\u8f74\u4f7f\u80fd\uff1bPLC \u4e0d\u518d\u8f93\u51fa\u8109\u51b2\uff0c\u7535\u673a\u81ea\u7531\u6ed1\u884c\uff0c\u9760\u9a71\u52a8\u5668\u672c\u8eab\u60ef\u6027\u505c\u673a\u3002PTO \u8109\u51b2\u8f93\u51fa\u77ac\u95f4\u5207\u65ad\uff0c\u6ca1\u6709 PLC \u4fa7\u51cf\u901f\u659c\u5761\u3002\u2003<\/p> \n<p style=\"text-indent:2em;\">StopMode = 2:\u5e26\u6709\u52a0\u901f\u5ea6\u53d8\u5316\u7387\u63a7\u5236\u7684\u7d27\u6025\u505c\u6b62\u3002\u2003\u2003<\/p> \n<p style=\"text-indent:2em;\"><span style=\"color:#dc3545;\">\u5728 `MC_Power` \u529f\u80fd\u5757\uff0c`StopMode` \u53c2\u6570\uff0c\u53ea\u6709\u5f53 Enable \u4ece TRUE\u2192FALSE\uff08\u65ad\u5f00\u8f74\u4f7f\u80fd\uff09\u65f6\uff0cStopMode \u624d\u751f\u6548\u3002<\/span>\u2003\u2003<\/p> \n<h3 id=\"\u8f93\u51fa\u53c2\u6570\">\u8f93\u51fa\u53c2\u6570 <\/h3>\n<ul>\n<li><strong>Status Bool<\/strong>\uff1a\u8f74\u5b9e\u9645\u4f7f\u80fd\u72b6\u6001\u3002TRUE = \u9a71\u52a8\u5668\u5df2\u7ecf\u6210\u529f\u4e0a\u4f7f\u80fd\uff1bFALSE = \u8f74\u672a\u4f7f\u80fd\u3002<\/li>\n<li><strong>Busy Bool<\/strong>\uff1aMC_Power \u6b63\u5728\u5904\u7406\u4f7f\u80fd \/ \u65ad\u4f7f\u80fd\u8fc7\u7a0b\u3002<\/li>\n<li><strong>Error Bool<\/strong>\uff1a\u51fa\u73b0\u6545\u969c\u7f6e 1\u3002<\/li>\n<li><strong>ErrorID Word<\/strong>\uff1a\u6545\u969c\u7f16\u53f7\u3002<\/li>\n<li><strong>ErrorInfo Word<\/strong>\uff1a\u9644\u52a0\u6545\u969c\u4fe1\u606f\uff0c\u914d\u5408 ErrorID \u8bca\u65ad\u3002<\/li>\n<\/ul>\n<h2 id=\"2\u6307\u4ee4-mc_reset\">2.\u6307\u4ee4 MC_Reset <\/h2>\n<p>\u6307\u4ee4\u540d\u79f0\uff1a\u786e\u8ba4\u6545\u969c\uff1b<br>\n\u529f\u80fd\uff1a\u6e05\u9664\u8f74\u5de5\u827a\u5bf9\u8c61\u7684\u6545\u969c\u72b6\u6001\uff0c\u590d\u4f4d Error\u3001ErrorID\uff1b<br>\n<span style=\"color:#dc3545;\">\u4f7f\u7528\u8981\u70b9\uff1aExcecute\u7528\u4e0a\u5347\u6cbf\u89e6\u53d1<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wnblog.cn\/images\/PLC_002_02.png\" alt=\"\u56fe\u7247\u63cf\u8ff0\"><\/p>\n<h3 id=\"\u8f93\u5165\u53c2\u6570\">\u8f93\u5165\u53c2\u6570 <\/h3>\n<ul>\n<li><strong>Axis<\/strong>\uff1aTO_PositioningAxis\uff0c\u8f74\u5de5\u827a\u5bf9\u8c61 DB\uff0c\u6307\u5b9a\u8981\u590d\u4f4d\u54ea\u6839\u8f74\u3002<\/li>\n<li><strong>Execute<\/strong>\uff1aBOOL\uff0c\u4e0a\u5347\u6cbf\u89e6\u53d1\u3002<\/li>\n<\/ul>\n<p style=\"text-indent:2em;\">\u2003<span style=\"color:#dc3545;\">\u4ece 0\u21921 \u7684\u77ac\u95f4\u6267\u884c\u4e00\u6b21\u590d\u4f4d\uff1b\u6301\u7eed\u9ad8\u7535\u5e73\u4e0d\u4f1a\u91cd\u590d\u590d\u4f4d\u3002<\/span><\/p>\n<ul>\n<li>Restart:<p style=\"text-indent:2em;\">\u2003Restart = 0:\u7528\u6765\u786e\u8ba4\u9519\u8bef\u3002\u2003<\/p>\n<p style=\"text-indent:2em;\">\u2003Restart = 1:\u5c06\u8f74\u7684\u7ec4\u6001\u4ece\u8f6c\u8f7d\u5b58\u50a8\u5668\u4e0b\u8f7d\u5230\u5de5\u4f5c\u5b58\u50a8\u5668\uff08\u53ea\u6709\u5728\u7981\u7528\u8f74\u7684\u65f6\u5019\u624d\u80fd\u6267\u884c\u8be5\u547d\u4ee4\uff09\u2003<\/p>\n<\/li>\n<\/ul>\n<h3 id=\"\u8f93\u51fa\u53c2\u6570-1\">\u8f93\u51fa\u53c2\u6570 <\/h3>\n<ul>\n<li><strong>Done<\/strong>\uff1aBOOL<br>\n\u590d\u4f4d\u52a8\u4f5c\u5b8c\u6210\uff0c\u4ec5\u4e00\u4e2a\u626b\u63cf\u5468\u671f\u4e3a TRUE\u3002\u6545\u969c\u6e05\u9664\u6210\u529f\u5c31\u7f6e Done\u3002<\/li>\n<li><strong>Busy<\/strong>\uff1aBOOL<br>\n\u6b63\u5728\u6267\u884c\u590d\u4f4d\u8fc7\u7a0b\u3002<\/li>\n<li><strong>Error<\/strong>\uff1aBOOL<br>\n\u590d\u4f4d\u6307\u4ee4\u672c\u8eab\u51fa\u9519\uff08\u6781\u5c11\uff09\u3002<\/li>\n<li><strong>ErrorID<\/strong>\uff1aWord<br>\n\u590d\u4f4d\u6307\u4ee4\u81ea\u8eab\u7684\u6545\u969c\u7801\u3002<\/li>\n<\/ul>\n<h2 id=\"mc_home\">MC_Home <\/h2>\n<p>\u6307\u4ee4\u540d\u79f0\uff1a\u56de\u539f\u70b9\u6307\u4ee4\u3002<br>\n\u529f\u80fd\uff1a\u5efa\u7acb\u8f74\u673a\u68b0\u53c2\u8003\u5750\u6807\u7cfb\u3002\u6267\u884c\u5b8c\u6210\u540e\uff0c\u8f74\u624d\u6709\u6709\u6548\u7684\u673a\u68b0\u539f\u70b9\u3002<\/p>\n<p><span style=\"color:#dc3545;\">\u524d\u63d0\u6761\u4ef6\uff1aMC_Power.Status = TRUE\uff0c\u8f74\u4f7f\u80fd\u5c31\u7eea\u3002<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wnblog.cn\/images\/PLC_002_03.png\" alt=\"\u56fe\u7247\u63cf\u8ff0\"><\/p>\n<h2 id=\"\u8f93\u5165\u53c2\u6570-1\">\u8f93\u5165\u53c2\u6570 <\/h2>\n<ul>\n<li><strong>Axis<\/strong>\uff1aTO_PositioningAxis\uff0c\u8f74\u5de5\u827a\u5bf9\u8c61 DB\u3002<\/li>\n<li><strong>Execute<\/strong>\uff1aBOOL\uff0c\u4e0a\u5347\u6cbf\u89e6\u53d1\u56de\u96f6\u4efb\u52a1\u30020\u21921 \u542f\u52a8\u4e00\u6b21\u56de\u96f6\u3002<\/li>\n<li><strong>Mode<\/strong>\uff1aInt\uff0c\u56de\u96f6\u6a21\u5f0f<\/li>\n<\/ul>\n<p style=\"text-indent:2em;\">mode = 0:\u4e3b\u52a8\u56de\u539f\u70b9\u3002\u8f74\u81ea\u52a8\u8fd0\u52a8\uff0c\u5bfb\u627e\u539f\u70b9\u5f00\u5173\u3001\u7f16\u7801\u5668\u96f6\u8109\u51b2.<\/p>\n<p style=\"text-indent:2em;\">mode = 1:\u88ab\u52a8\u56de\u539f\u70b9\u3002\u5916\u90e8\u89e6\u53d1\u4fe1\u53f7\u5230\u6765\u65f6\u8bbe\u7f6e\u539f\u70b9\uff0c\u8f74\u4e0d\u4e3b\u52a8\u8dd1\u52a8\u3002\u2003<\/p>\n<p style=\"text-indent:2em;\">mode = 3:\u76f4\u63a5\u8bbe\u7f6e\u53c2\u8003\u70b9\uff08\u76f8\u5bf9\u56de\u96f6\uff09\u3002\u8f74\u4e0d\u8fd0\u52a8\uff0c\u76f4\u63a5\u628a\u5f53\u524d\u4f4d\u7f6e\u8d4b\u503c\u4e3a\u53c2\u6570 Position\u3002<\/p>\n<ul>\n<li><strong>Position<\/strong>: LReal\uff0c\u56de\u96f6\u5b8c\u6210\u540e\uff0c\u8f74\u8bbe\u5b9a\u7684\u5750\u6807\u503c\u3002\u4e00\u822c\u586b 0.0\u3002<\/li>\n<\/ul>\n<h2 id=\"\u8f93\u51fa\u53c2\u6570-2\">\u8f93\u51fa\u53c2\u6570 <\/h2>\n<ul>\n<li><strong>Done<\/strong>\uff1aBOOL<br>\n\u56de\u539f\u70b9\u4efb\u52a1\u6b63\u5e38\u7ed3\u675f\uff0c\u4ec5 1 \u4e2a\u626b\u63cf\u5468\u671f TRUE\u3002Done=TRUE \u4ee3\u8868\u539f\u70b9\u5efa\u7acb\u5b8c\u6210\u3002<\/li>\n<li><strong>Busy<\/strong>\uff1aBOOL<br>\n\u56de\u96f6\u52a8\u4f5c\u6b63\u5728\u8fd0\u884c\u4e2d\u3002<\/li>\n<li><strong>Error<\/strong>\uff1aBOOL<br>\n\u6307\u4ee4\u6267\u884c\u6545\u969c\u3002<\/li>\n<li><strong>ErrorID<\/strong>\uff1aWord\uff0c\u6545\u969c\u4ee3\u7801\u3002<\/li>\n<\/ul>\n<h2 id=\"mc_halt\">MC_Halt <\/h2>\n<p>\u540d\u79f0\uff1a\u6682\u505c\u8f74\u6307\u4ee4<br>\n\u529f\u80fd\uff1a\u8ba9\u6b63\u5728\u8fd0\u52a8\u7684\u8f74\uff0c\u6309\u7167\u8f74\u5de5\u827a\u5bf9\u8c61\u91cc\u914d\u7f6e\u7684\u51cf\u901f\u5ea6\u5e73\u6ed1\u51cf\u901f\u505c\u4e0b\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wnblog.cn\/images\/PLC_002_04.png\" alt=\"\u56fe\u7247\u63cf\u8ff0\"><\/p>\n<h2 id=\"\u8f93\u5165\u53c2\u6570-2\">\u8f93\u5165\u53c2\u6570 <\/h2>\n<ul>\n<li><strong>Axis<\/strong>\uff1aTO_PositioningAxis\uff0c\u8f74\u5de5\u827a\u5bf9\u8c61 DB\u3002<\/li>\n<li><strong>Execute<\/strong>\uff1aBOOL\uff0c\u4e0a\u5347\u6cbf\u89e6\u53d1\u505c\u6b62\u52a8\u4f5c\uff080\u21921 \u6267\u884c\u4e00\u6b21\uff09\u3002<\/li>\n<\/ul>\n<h2 id=\"\u8f93\u51fa\u53c2\u6570-3\">\u8f93\u51fa\u53c2\u6570 <\/h2>\n<ul>\n<li><strong>Done<\/strong>\uff1aBOOL<br>\n\u8f74\u5df2\u7ecf\u5b8c\u5168\u9759\u6b62\uff0c\u505c\u673a\u5b8c\u6210\uff0c\u4ec5\u4e00\u4e2a\u626b\u63cf\u5468\u671f\u4e3a TRUE\u3002<\/li>\n<li><strong>Busy<\/strong>\uff1aBOOL<br>\n\u6b63\u5728\u51cf\u901f\u505c\u6b62\u8fc7\u7a0b\u4e2d\u3002<\/li>\n<li><strong>Error<\/strong>\uff1aBOOL\uff0c\u6307\u4ee4\u6545\u969c\u3002<\/li>\n<li><strong>ErrorID<\/strong>\uff1aWord\uff0c\u6545\u969c\u7f16\u53f7<\/li>\n<\/ul>\n\n      <\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u6307\u4ee4\u8def\u5f84\uff1a\u5de5\u827a\u9009\u9879-&gt;Motion Control \u6240\u6709\u8fd0\u52a8\u6307\u4ee4\u90fd\u57fa\u4e8e\u5b9a\u4f4d\u8f74\u5de5\u827a\u5bf9\u8c61 ,\u6bcf\u6761\u6307 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-23","post","type-post","status-publish","format-standard","hentry","category-plc"],"_links":{"self":[{"href":"https:\/\/www.wnblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/23","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wnblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wnblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wnblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wnblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=23"}],"version-history":[{"count":5,"href":"https:\/\/www.wnblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/23\/revisions"}],"predecessor-version":[{"id":30,"href":"https:\/\/www.wnblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/23\/revisions\/30"}],"wp:attachment":[{"href":"https:\/\/www.wnblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wnblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wnblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}