{"id":19181,"date":"2022-03-09T10:11:17","date_gmt":"2022-03-09T02:11:17","guid":{"rendered":"https:\/\/hongtronics.com\/?p=19181"},"modified":"2023-04-06T13:07:29","modified_gmt":"2023-04-06T05:07:29","slug":"revpi-st-traffic-light","status":"publish","type":"post","link":"https:\/\/hongtronics.com\/en\/revpi-st-traffic-light\/","title":{"rendered":"\u3010\u5de5\u696d\u6a39\u8393\u6d3e\u3011\u4f7f\u7528\u7d50\u69cb\u5316\u6587\u672c\u4f5cPLC\u63a7\u5236\u4ea4\u901a\u71c8\u865f"},"content":{"rendered":"<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ralph lauren preface<\/h2>\n\n\n\n<p class=\"has-medium-font-size\">\u4f7f\u7528\u4e00\u6bb5\u7c21\u55ae\u7684\u7d50\u69cb\u5316\u6587\u672cPLC\u7a0b\u5e8f\u4fbf\u53ef\u5728RevPi Core 3\u4e0a\u904b\u884c\u4ee5\u63a7\u5236\u4ea4\u901a\u865f\u8a8c\u71c8\u3002\u5c07RevPi Core 3\u548cDIO\u5b89\u88dd\u5728DIN\u5c0e\u8ecc\u4e0a\u4e26\u4f7f\u5176\u555f\u52d5\u904b\u884c\uff0c\u4f5c\u70ba\u300e\u6982\u5ff5\u9a57\u8b49\u300f\uff0c\u6211\u5011\u5c07\u5be6\u9a57\u6a21\u64ec\u7c21\u55ae\u7684\u4ea4\u901a\u865f\u8a8c\u71c8\u8a2d\u7f6e\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"656\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/03\/640-2022-03-09T094227.465.jpg\" alt=\"\" class=\"wp-image-19182\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/03\/640-2022-03-09T094227.465.jpg 1024w, https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/03\/640-2022-03-09T094227.465-300x192.jpg 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/03\/640-2022-03-09T094227.465-600x384.jpg 600w, https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/03\/640-2022-03-09T094227.465-768x492.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>\u57161\u3001Revpi Core 3\u8207DIO\u6a21\u584a\u642d\u5efa\u7684\u5be6\u9a57\u5e73\u53f0<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"has-medium-font-size\">Revpi core 3\u662fKUNBUS\u57fa\u65bc\u6a39\u8393\u6d3e\u958b\u767c\u7684\u5c0f\u578b\u5de5\u63a7\u6a5f\u7522\u54c1\uff0c\u9664\u505a\u6578\u64da\u63a1\u96c6\u5916\uff0c\u4f5c\u70baPLC\u4e5f\u662f\u5176\u4e3b\u8981\u7684\u61c9\u7528\u4e4b\u4e00\uff0c\u4e3b\u8981\u4f9d\u8cf4\u65bc\u8edfPLC\u8edf\u9ad4\uff0c\u8679\u79d1\u96fb\u5b50\u8207\u5b8f\u8679\u96fb\u5b50\u4f5c\u70baKUNBUS\u7684\u4e2d\u83ef\u5340\u7e3d\u4ee3\u7406\uff0c\u651c\u624b\u63a8\u5ee3\u6a39\u8393\u6d3e\u5728\u5de5\u696d\u4e0a\u7684\u61c9\u7528\u3002\u672c\u6587\u4e3b\u8981\u5e36\u5927\u5bb6\u4e86\u89e3\u6a39\u8393\u6d3e\u5de5\u63a7\u6a5f\u8207logi.CAD 3\u5de5\u696d\u7de8\u7a0b\u8edf\u9ad4\u7684\u7d50\u5408\u3002<\/p>\n\n\n\n<h2 class=\"has-luminous-vivid-amber-background-color has-background wp-block-heading\">\u7d50\u69cb\u5316\u6587\u5b57\uff08ST\uff09\u8a9e\u8a00<\/h2>\n\n\n\n<p class=\"has-medium-font-size\">\u67093\u7a2e\u4e3b\u8981\u7684\u6a19\u6e96\u8a9e\u8a00\u7528\u65bc\u5275\u5efaPLC\u7684\u63a7\u5236\u7a0b\u5e8f\u2014\u7d50\u69cb\u5316\u6587\u672c\u8a9e\u8a00\uff08ST\uff09\uff0c\u68af\u5f62\u5716\u908f\u8f2f\u548c\u529f\u80fd\u584a\u5716\uff08FBD\uff09\u3002\u5f8c\u5169\u8005\u9867\u540d\u601d\u7fa9\uff0c\u5b83\u5011\u5177\u6709\u66f4\u591a\u7684\u5716\u5f62\u754c\u9762\uff0c\u4f46\u4e0d\u5982\u7d50\u69cb\u5316\u6587\u672c\u9748\u6d3b\uff0cRevPi\u9644\u5e36\u7684\u514d\u8cbb\u7248\u672clogi.CAD 3\u50c5\u652f\u6301ST\uff0c\u56e0\u6b64\u6211\u5011\u9700\u8981\u4f7f\u7528\u5b83\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\">\u5118\u7ba1\u7d50\u69cb\u5316\u6587\u672c\u662f\u53d7\u884c\u696d\u6a19\u6e96IEC 61131-3\u7ba1\u8f44\u7684\u6a19\u6e96\u8a9e\u8a00\uff0c\u4e26\u4e14\u8a72\u8a9e\u8a00\u7684\u6838\u5fc3\u90fd\u4fdd\u6301\u4e00\u81f4\uff0c\u4f46\u662f\u6bcf\u500bPLC\u4f9b\u61c9\u5546\u90fd\u6709\u81ea\u5df1\u7684\u7368\u7279\u7279\u9ede\u548c\u6dfb\u52a0\u9805\u3002\u6211\u5011\u5728\u7db2\u4e0a\u627e\u5230\u4e86\u6709\u7528\u7684\u5165\u9580\u6559\u7a0b\uff0c\u9019\u4f7f\u6211\u5011\u66f4\u5bb9\u6613\u5165\u9580\u3002\u5c0d\u65bc\u90a3\u4e9b\u719f\u6089\u8a08\u7b97\u6a5f\u8a9e\u8a00\u7684\u4eba\u4f86\u8aaa\uff0cST\u6e90\u81eaPASCAL\uff0c\u4ed6\u5011\u6703\u66f4\u52a0\u719f\u6089\u4e00\u4e9b\u3002<\/p>\n\n\n\n<h2 class=\"has-luminous-vivid-amber-background-color has-background wp-block-heading\">logi.CAD3 \u8edf\u9ad4<\/h2>\n\n\n\n<p class=\"has-medium-font-size\">\u9664\u4e86\u8655\u7406\u65b0\u8a9e\u8a00\u5916\uff0c\u9084\u9700\u8981\u4f7f\u7528\u65b0\u7684\u7de8\u7a0b\u8edf\u9ad4\u3002\u5c0d\u65bclogi.CAD 3\u8edf\u9ad4\uff0c\u4ee5\u4e0b\u4e00\u4e9b\u8853\u8a9e\u5c0d\u65bc\u6211\u5011\u5728\u7406\u89e3\u4e26\u5728\u5fc5\u8981\u6642\u9032\u884c\u53c3\u8003\u9084\u662f\u662f\u5f88\u6709\u7528\u7684\uff1a<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>1\u3001\u5c0d\u8c61<\/strong>\u2014logi.CAD 3\u7684\u9805\u76ee\u700f\u89bd\u5668\u4e2d\u5c0d\u8c61\u4f4d\u65bc\u6587\u4ef6\u593e\u4e2d\uff0c\u5b83\u662f\u6b64\u6587\u4ef6\u593e\u7684\u5b50\u7d1a\u3002\u8a72\u5c0d\u8c61\u76f8\u7576\u65bc\u6587\u4ef6\u7cfb\u7d71\u4e0a\u7684\u6587\u4ef6\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2\u3001\u9805\u76ee<\/strong>\u2014\u9805\u76ee\u662flogi.CAD 3\u7684\u9805\u76ee\u700f\u89bd\u5668\u4e2d\u6587\u4ef6\u593e\u7684\u4e00\u7a2e\u7279\u6b8a\u985e\u578b\u3002\u9810\u8a2d\u60c5\u6cc1\u4e0b\uff0c\u9805\u76ee\u662f\u9805\u76ee\u700f\u89bd\u5668\u4e2d\u7684\u6839\u76ee\u9304\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\">\u61c9\u7528\u7a0b\u5e8f\u9805\u76ee\u4f5c\u70ba\u4e00\u500b\u5b8c\u6574\u7684\u5167\u5bb9\uff0c\u4e0d\u50c5\u5305\u62ec\u5305\u542b\u60a8\u7de8\u5beb\u7684\u4ee3\u78bc\u7684STL\u6587\u4ef6\uff0c\u9084\u5305\u62ec\u4e86\u4e00\u4e9b\u914d\u7f6e\u6587\u4ef6\uff0c\u4ee5\u53ca\u5168\u5c40\u8b8a\u91cf\u548c\u6240\u4f7f\u7528\u7684\u7279\u5b9aPLC\u5eab\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\">\u5728\u4f7f\u7528logi.CAD 3\u7684\u904e\u7a0b\u4e2d\uff0c\u6709\u6642\u5019\u6703\u767c\u73felogi.CAD 3\u7121\u6cd5\u69cb\u5efa\u61c9\u7528\u7a0b\u5e8f\uff0c\u5373\u4f7f\u5176\u8a9e\u6cd5\u548c\u4e00\u5207\u90fd\u6b63\u5e38\u7684\u60c5\u6cc1\u4e0b\u3002\u5728\u9019\u4e9b\u60c5\u6cc1\u4e0b\uff0c\u900f\u904e\u9ede\u64ca\u300e\u9805\u76ee\u300f\u83dc\u55ae\u4e0b\u7684\u300e\u6e05\u7406\u300f\u9078\u9805\u4f86\u6e05\u7406\u9805\u76ee\u5f88\u6709\u7528\uff0c\u8b93logi.CAD 3\u57f7\u884c\u5176\u64cd\u4f5c\uff0c\u7136\u5f8c\u69cb\u5efa\u4e26\u52a0\u8f09\u597d\u61c9\u7528\u7a0b\u5e8f\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"1024\" height=\"691\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/03\/640-2022-03-09T094733.203.jpg\" alt=\"\" class=\"wp-image-19188\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/03\/640-2022-03-09T094733.203.jpg 1024w, https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/03\/640-2022-03-09T094733.203-300x202.jpg 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/03\/640-2022-03-09T094733.203-600x405.jpg 600w, https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/03\/640-2022-03-09T094733.203-768x518.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>\u57162\u3001logiCAD 3<\/figcaption><\/figure><\/div>\n\n\n\n<h2 class=\"has-luminous-vivid-amber-background-color has-background wp-block-heading\">\u7c21\u55ae\u7684LED\u71c8\u9583\u720d<\/h2>\n\n\n\n<p class=\"has-medium-font-size\">\u9996\u5148\u6211\u5011\u53ef\u4ee5\u5148\u8a2d\u8a08\u51fa\u4e00\u500b\u7c21\u55ae\u7684\u61c9\u7528\u7a0b\u5e8f\uff0c\u8a72\u61c9\u7528\u7a0b\u5e8f\u53ef\u4ee5\u5be6\u73fe\u9583\u720d\u4e00\u500bLED\u71c8\u7684\u529f\u80fd\u3002<\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>PROGRAM RevolutionPiCounterProgram<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>VAR<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; value : BOOL; &nbsp;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>END_VAR<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>VAR_EXTERNAL<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; Red_1 : BOOL;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; Yellow_2 : BOOL;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; Green_3 : BOOL;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>END_VAR<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>IF value THEN<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; &nbsp;Red_1 := False;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; &nbsp;value := False;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>ELSE<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; &nbsp;Red_1 := True;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; &nbsp;value := True;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>END_IF;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>END_PROGRAM<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\">\u5728\u6b64\u793a\u4f8b\u4e2d\uff0cLED\u71c8\u6703\u6301\u7e8c\u9583\u720d\u3002\u9019\u662f\u56e0\u70baPLC\u61c9\u7528\u7a0b\u5e8f\u6703\u81ea\u52d5\u91cd\u8907\u6b64\u908f\u8f2f\u8a9e\u53e5\u3002\u201cEnd_Program\u201d\u5be6\u969b\u4e0a\u662f\u6307\u56de\u5230\u958b\u982d\u4e26\u91cd\u65b0\u958b\u59cb\uff0c\u4e5f\u5c31\u662f\u8aaa\u7576PLC\u5230\u9054END_PROGRAM\u8a9e\u53e5\u6642\uff0cPLC\u6383\u63cf\u9031\u671f\u5c07\u518d\u6b21\u958b\u59cb\uff0c\u4e26\u4e14\u7a0b\u5e8f\u5c07\u5faa\u74b0\u81ea\u8eab\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u258d\u5b8c\u6574\u7684\u7d05\u7da0\u71c8\u7a0b\u5e8f<\/h2>\n\n\n\n<p class=\"has-medium-font-size\">\u73fe\u5728\uff0c\u9700\u8981\u5f04\u6e05\u695a\u5982\u4f55\u4f7fLED\u6307\u793a\u71c8\u6309\u7167\u6a19\u6e96\u7684\u4ea4\u901a\u865f\u8a8c\u71c8\u9806\u5e8f\u9583\u720d\u2014\u7d05\u8272\u3001\u7d05\u8272\u548c\u9ec3\u8272\uff1b\u7da0\u8272\uff0c\u9ec3\u8272\u4e26\u8fd4\u56de\u7d05\u8272\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\">\u9996\u5148\u53ef\u4ee5\u60f3\u5230\u7684\u662f\u900f\u904e\u7c21\u55ae\u5730\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u7de8\u8f2f\u4e00\u500b\u503c\u4f86\u66f4\u6539\u6307\u793a\u71c8\u9583\u720d\u7684\u901f\u5ea6\uff0c\u4f46\u9019\u6703\u6539\u8b8a\u6574\u500b\u6383\u63cf\u9031\u671f\u7684\u901f\u5ea6\uff0c\u53ea\u6703\u964d\u4f4e\u61c9\u7528\u7a0b\u5e8f\u4e2d\u6240\u6709\u7684\u901f\u5ea6\u3002\u53e6\u5916\u5982\u679c\u80fd\u5920\u7368\u7acb\u66f4\u6539\u4e0d\u540c\u71c8\u5149\u7684\u901f\u5ea6\u9019\u4e5f\u662f\u6211\u5011\u60f3\u505a\u7684\u3002\u4e8b\u5be6\u8b49\u660e\uff0c\u9019\u6bd4\u9810\u671f\u8981\u56f0\u96e3\u5f88\u591a\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\">TON\u51fd\u6578\uff08\u8a08\u6642\u5668\u5ef6\u9072\uff09\u63d0\u4f9b\u4e86\u9700\u8981\u7684\u5ef6\u9072\u64cd\u4f5c\uff0c\u4f46\u5728\u5be6\u969b\u904e\u7a0b\u4e2d\u537b\u5f88\u96e3\u4f7f\u4ee3\u78bc\u7522\u751f\u9810\u671f\u7684\u6548\u679c\u3002\u5373\u4f7f\u53ef\u4ee5\u8b93LED\u767c\u5149\u4e00\u6bb5\u7d66\u5b9a\u7684\u6642\u9593\uff0c\u7136\u5f8c\u7184\u6ec5\uff0c\u7136\u5f8c\u518d\u4e5f\u4e0d\u4eae\uff0c\u6216\u8005\u9583\u720d\uff0c\u4f46\u7121\u6cd5\u6307\u5b9a\u95dc\u9589\u6642\u9593\u3002\u9019\u88e1\u6211\u5011\u5c0b\u627e\u5230CASE\u8a9e\u53e5\u3002\u5728\u5b78\u7fd2\u548c\u4e86\u89e3\u6709\u95dcCASE\u8a9e\u53e5\u7684\u8a0a\u606f\uff0c\u6700\u7d42\u7528CASE\u7de8\u5beb\u4e86\u793a\u4f8b\u4ee3\u78bc\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"1024\" height=\"912\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/03\/640-2022-03-09T094957.709.jpg\" alt=\"\" class=\"wp-image-19190\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/03\/640-2022-03-09T094957.709.jpg 1024w, https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/03\/640-2022-03-09T094957.709-300x267.jpg 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/03\/640-2022-03-09T094957.709-600x534.jpg 600w, https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/03\/640-2022-03-09T094957.709-768x684.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>\u57163\u3001Revpi Core 3\u63a7\u5236\u4ea4\u901a\u865f\u8a8c\u71c8<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"has-medium-font-size\">\u6700\u7d42\u5f97\u5230\u7684\u7a0b\u5f0f\u78bc\u5982\u4e0b\uff1a<\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>PROGRAM RevolutionPiProgram<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>VAR &nbsp;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>wait : TON;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>count : INT;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>END_VAR<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>VAR_EXTERNAL<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; Red_1 : BOOL;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; Yellow_2 : BOOL;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; Green_3 : BOOL;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>END_VAR<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>CASE count OF<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>0: \/\/init<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; count := count + 1;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>1: \/\/ Red<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp;Red_1 := True;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp;Yellow_2 := False;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp;Green_3 := False;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp;wait(IN:=TRUE, PT:=T#5s);<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp;IF wait.Q THEN<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wait(IN:=FALSE);<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count := count + 1;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp;END_IF;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>2: \/\/ Red and Yellow<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; Red_1 := True;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; Yellow_2 := True;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; Green_3 := False;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; &nbsp;wait(IN:=TRUE, PT:=T#5s);<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; &nbsp;IF wait.Q THEN<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;wait(IN:=FALSE);<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;count := count + 1;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; END_IF;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>3: \/\/ Green<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; Red_1 := False;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; Yellow_2 := False;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; Green_3 := True;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wait(IN:=TRUE, PT:=T#5s);<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF wait.Q THEN<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;wait(IN:=FALSE);<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;count := count + 1;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END_IF;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>4: \/\/ Yellow<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; Red_1 := False;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; Yellow_2 := True;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; Green_3 := False;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; wait(IN:=TRUE, PT:=T#5s);<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; IF wait.Q THEN<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;wait(IN:=FALSE);<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;count := count + 1;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; END_IF;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; ELSE<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;count := 0;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>&nbsp; &nbsp; &nbsp; END_CASE;<\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong>END_PROGRAM<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\">\u5982\u679c\u51fa\u73fe\u7279\u5b9a\u7684\u6574\u6578\u503c\uff0c\u5247\u4f7f\u7528CASE\u57f7\u884c\u8a9e\u53e5\u3002\u5728\u6b64\u793a\u4f8b\u4e2d\uff0c\u5275\u5efa\u4e86\u4e00\u500b\u540d\u7a31\u70ba\u201ccount\u201d\u7684\u6574\u6578\u8b8a\u91cf\uff0c\u8a72\u6574\u6578\u8b8a\u91cf\u5c07\u5728\u6bcf\u6b21PLC\u6383\u63cf\u6642\u589e\u52a01\uff0c\u76f4\u5230\u904b\u884c\u5230\u6700\u5f8c\u4ee5\u53caELSE\u5c07\u5176\u8a2d\u7f6e\u56de\u96f6\u70ba\u6b62\u3002TON\u7528\u65bc\u904b\u884c\u6bcf\u500b\u8a9e\u53e55\u79d2\u9418\u3002\u53ef\u4ee5\u900f\u904e\u7de8\u8f2f\u4ee5\u4e0b\u884c\u4e2d\u76845s\u503c\u8f15\u9b06\u66f4\u6539\u6b64\u503c\uff1a<\/p>\n\n\n\n<p class=\"has-text-align-center has-normal-font-size\"><strong>wait(IN:=TRUE, PT:=T#5s);<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\">\u5982\u679c\u9700\u8981\uff0c\u4e5f\u53ef\u4ee5\u70ba\u6bcf\u500b\u5e8f\u5217\u7684\u71c8\u5149\u5206\u914d\u4e0d\u540c\u7684\u6642\u9593\uff08\u5982\u5c07\u5b83\u5011\u5168\u90e8\u66f4\u6539\u70ba2\u79d2\uff09\u3002\u8a72\u7a0b\u5f0f\u78bc\u4e5f\u53ef\u4ee5\u8f15\u9b06\u64f4\u5c55\u4ee5\u6dfb\u52a0\u66f4\u591a\u7684\u71c8\u5149\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\">\u53e6\u5916\u503c\u5f97\u4e00\u63d0\u7684\u662f\uff0c\u6211\u5011\u4e5f\u53ef\u4ee5\u7528Codesys\u4f86\u505a\u9019\u9805\u5de5\u4f5c\uff0cCodesys\u662f\u8edfPLC\u7684\u4ee3\u8868\uff0c\u4e5f\u662flogi.CAD3\u7684\u66ff\u4ee3\u7522\u54c1\uff0c\u9700\u8981\u6ce8\u610f\u7684\u662fCodesys\u6240\u4f7f\u7528\u7684ST\u8a9e\u6cd5\u8207logi.CAD 3\u9084\u662f\u5b58\u5728\u4e00\u4e9b\u5c0f\u5c0f\u7684\u5dee\u7570\uff0c\u9700\u8981\u6839\u64da\u9700\u6c42\u53bb\u8abf\u6574\u3002<\/p>\n\n\n\n<h2 class=\"has-luminous-vivid-amber-background-color has-background wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"has-medium-font-size\">\u638c\u63e1\u4e00\u7a2e\u65b0\u7684\u8a08\u7b97\u6a5f\u8a9e\u8a00\u548c\u4e00\u500b\u964c\u751f\u7684\u8edf\u9ad4\u59cb\u7d42\u662f\u4e00\u500b\u6311\u6230\uff0c\u4f46\u662f\u6211\u5011\u5c0d\u6700\u7d42\u627e\u5230\u89e3\u6c7a\u65b9\u6848\u611f\u5230\u8208\u596e\u548c\u6eff\u610f\u3002\u5118\u7ba1\u6700\u7d42\u4f7f\u7528\u8d77\u4f86\u7684\u71c8\u53ef\u80fd\u4e0d\u5b8c\u5168\u7b26\u5408\u5be6\u969b\u7684\u4ea4\u901a\u72c0\u6cc1\uff0c\u4f46\u6211\u5011\u53ef\u4ee5\u5f9e\u9019\u6b21\u793a\u4f8b\u4e2d\u770b\u5230\u5982\u4f55\u900f\u904e\u4e00\u4e9b\u5be6\u8e10\u5c07\u5b83\u5011\u958b\u767c\u51fa\u4f86\uff0c\u4ee5\u5728\u8af8\u5982\u8868\u6f14\u7b49\u5176\u4ed6\u884c\u696d\u6216\u985e\u4f3c\u5834\u5408\u7684\u4e00\u6b21\u6027\u6d3b\u52d5\u4e2d\u9032\u884c\u7c21\u55ae\u7684\u4ea4\u901a\u63a7\u5236\u3002\u540c\u6642\u6211\u5011\u4e5f\u53ef\u4ee5\u770b\u5230\u6a39\u8393\u6d3e\u7528\u4f5c\u5de5\u696d\u63a7\u5236\u4e0a\u9762\u7684\u5ee3\u95ca\u524d\u666f\u3002<\/p>\n\n\n\n<h2 class=\"has-text-align-center wp-block-heading\"><a href=\"https:\/\/hongtronics.com\/en\/category\/revpi-case-study\/\" title=\"\u77ad\u89e3\u66f4\u591a\u5de5\u696d\u6a39\u8393\u6d3e\u6280\u8853\u6587\u6a94\/\u61c9\u7528\u6848\u4f8b\">\u77ad\u89e3\u66f4\u591a\u5de5\u696d\u6a39\u8393\u6d3e\u6280\u8853\u6587\u6a94\/\u61c9\u7528\u6848\u4f8b<\/a><\/h2>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/01\/\u5b8f\u8679\u8cc7\u8a0a\u5361-1024x576.png\" alt=\"\" class=\"wp-image-17585\" width=\"768\" height=\"432\"\/><figcaption>Contact Us<\/figcaption><\/figure><\/div>","protected":false},"excerpt":{"rendered":"<p>\u258d\u524d\u8a00 \u4f7f\u7528\u4e00\u6bb5\u7c21\u55ae\u7684\u7d50\u69cb\u5316\u6587\u672cPLC\u7a0b\u5e8f\u4fbf\u53ef\u5728RevPi Core 3\u4e0a\u904b\u884c\u4ee5\u63a7\u5236\u4ea4\u901a\u865f\u8a8c\u71c8\u3002\u5c07RevPi  [&hellip;]<\/p>","protected":false},"author":29,"featured_media":19196,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"minimal","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","iawp_total_views":105,"ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"off","ocean_gallery_id":[],"footnotes":""},"categories":[1824],"tags":[1339],"table_tags":[],"class_list":["post-19181","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-iiot","tag-1339","entry","has-media","owp-thumbs-layout-horizontal","owp-btn-normal","owp-tabs-layout-horizontal","has-no-thumbnails","has-product-nav"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/03\/640-2022-03-09T094227.465-1.jpg","_links":{"self":[{"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/posts\/19181","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/comments?post=19181"}],"version-history":[{"count":2,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/posts\/19181\/revisions"}],"predecessor-version":[{"id":19356,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/posts\/19181\/revisions\/19356"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/media\/19196"}],"wp:attachment":[{"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/media?parent=19181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/categories?post=19181"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/tags?post=19181"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/table_tags?post=19181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}