差别
这里会显示出您选择的修订版和当前版本之间的差别。
后一修订版 | 前一修订版 | ||
wm_wiki:relay_module:manual [2019/02/14 10:54] wangyueyu 创建 |
wm_wiki:relay_module:manual [2020/05/12 15:38] (当前版本) juneral [3.1. 模块功能及图形化编程指南] |
||
---|---|---|---|
行 1: | 行 1: | ||
====== 继电器模块 ====== | ====== 继电器模块 ====== | ||
+ | |||
+ | ===== 1. 模块介绍 ===== | ||
+ | |||
+ | <html><body> | ||
+ | <p class=MsoNormal style='text-indent:21.0pt'><span style='font-size:16.0pt; | ||
+ | font-family:等线'>继电器模块板载固定继电器元器件,它是一种可用小电流控制大电流运作的一种“自动开关<span lang=EN-US>”</span>,</span><span | ||
+ | style='font-size:10.5pt;font-family:"Arial",sans-serif;color:#333333; | ||
+ | background:white'> </span><span style='font-size:16.0pt;font-family:等线'>故在电路中起着自动调节、安全保护、转换电路等作用。</span></p> | ||
+ | |||
+ | </body></html> | ||
+ | |||
+ | ===== 2. 模块参数 ===== | ||
+ | <html><body> | ||
+ | <div align=center> | ||
+ | |||
+ | <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 | ||
+ | style='border-collapse:collapse;border:none;mso-border-alt:solid #5B9BD5 3.0pt; | ||
+ | mso-border-themecolor:accent5;mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 5.4pt'> | ||
+ | <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'> | ||
+ | <td width=170 valign=top style='width:127.4pt;border-top:solid #5B9BD5 3.0pt; | ||
+ | mso-border-top-themecolor:accent5;border-left:solid #5B9BD5 3.0pt;mso-border-left-themecolor: | ||
+ | accent5;border-bottom:solid white 2.25pt;mso-border-bottom-themecolor:background1; | ||
+ | border-right:none;background:#5B9BD5;mso-background-themecolor:accent5; | ||
+ | padding:0cm 5.4pt 0cm 5.4pt'> | ||
+ | <p class=MsoNormal align=center style='mso-margin-top-alt:auto;text-align: | ||
+ | center'><span style='font-size:18.0pt;color:white;mso-themecolor:background1'>参数</span><span | ||
+ | lang=EN-US style='color:black;mso-color-alt:windowtext'><u1:p></u1:p></span></p> | ||
+ | </td> | ||
+ | <td width=386 valign=top style='width:289.6pt;border-top:solid #5B9BD5 3.0pt; | ||
+ | mso-border-top-themecolor:accent5;border-left:none;border-bottom:solid white 2.25pt; | ||
+ | mso-border-bottom-themecolor:background1;border-right:solid #5B9BD5 3.0pt; | ||
+ | mso-border-right-themecolor:accent5;background:#5B9BD5;mso-background-themecolor: | ||
+ | accent5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
+ | <p class=MsoNormal align=center style='mso-margin-top-alt:auto;text-align: | ||
+ | center'><span style='font-size:18.0pt;color:white;mso-themecolor:background1'>值<span | ||
+ | lang=EN-US>/</span>描述</span><span lang=EN-US style='color:black;mso-color-alt: | ||
+ | windowtext'><u1:p></u1:p></span></p> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <tr style='mso-yfti-irow:1'> | ||
+ | <td width=170 valign=top style='width:127.4pt;border-top:none;border-left: | ||
+ | solid #5B9BD5 3.0pt;mso-border-left-themecolor:accent5;border-bottom:solid white 1.0pt; | ||
+ | mso-border-bottom-themecolor:background1;border-right:solid white 1.0pt; | ||
+ | mso-border-right-themecolor:background1;mso-border-top-alt:solid white .5pt; | ||
+ | mso-border-top-themecolor:background1;mso-border-alt:solid white .5pt; | ||
+ | mso-border-themecolor:background1;mso-border-left-alt:solid #5B9BD5 3.0pt; | ||
+ | mso-border-left-themecolor:accent5;background:#5B9BD5;mso-background-themecolor: | ||
+ | accent5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
+ | <p class=MsoNormal align=center style='mso-margin-top-alt:auto;text-align: | ||
+ | center'><b><span style='font-size:16.0pt;color:white;mso-themecolor:background1'>工作电压</span></b><span | ||
+ | lang=EN-US style='color:black;mso-color-alt:windowtext'><u1:p></u1:p></span></p> | ||
+ | </td> | ||
+ | <td width=386 valign=top style='width:289.6pt;border-top:none;border-left: | ||
+ | none;border-bottom:solid white 1.0pt;mso-border-bottom-themecolor:background1; | ||
+ | border-right:solid #5B9BD5 3.0pt;mso-border-right-themecolor:accent5; | ||
+ | mso-border-top-alt:solid white .5pt;mso-border-top-themecolor:background1; | ||
+ | mso-border-top-alt:solid white .5pt;mso-border-top-themecolor:background1; | ||
+ | mso-border-bottom-alt:solid white .5pt;mso-border-bottom-themecolor:background1; | ||
+ | mso-border-right-alt:solid #5B9BD5 3.0pt;mso-border-right-themecolor:accent5; | ||
+ | background:#5B9BD5;mso-background-themecolor:accent5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
+ | <p class=MsoNormal align=center style='mso-margin-top-alt:auto;text-align: | ||
+ | center'><span lang=EN-US style='font-size:16.0pt;color:white;mso-themecolor: | ||
+ | background1'>5V<u1:p></u1:p>DC</span></p> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <tr style='mso-yfti-irow:2'> | ||
+ | <td width=170 valign=top style='width:127.4pt;border-top:none;border-left: | ||
+ | solid #5B9BD5 3.0pt;mso-border-left-themecolor:accent5;border-bottom:none; | ||
+ | border-right:solid white 1.0pt;mso-border-right-themecolor:background1; | ||
+ | mso-border-left-alt:solid #5B9BD5 3.0pt;mso-border-left-themecolor:accent5; | ||
+ | mso-border-right-alt:solid white .5pt;mso-border-right-themecolor:background1; | ||
+ | background:#5B9BD5;mso-background-themecolor:accent5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
+ | <p class=MsoNormal align=center style='mso-margin-top-alt:auto;text-align: | ||
+ | center'><b><span style='font-size:16.0pt;color:white;mso-themecolor:background1'>通信方式</span></b><span | ||
+ | lang=EN-US style='color:black;mso-color-alt:windowtext'><u1:p></u1:p></span></p> | ||
+ | </td> | ||
+ | <td width=386 valign=top style='width:289.6pt;border:none;border-right:solid #5B9BD5 3.0pt; | ||
+ | mso-border-right-themecolor:accent5;background:#5B9BD5;mso-background-themecolor: | ||
+ | accent5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
+ | <p class=MsoNormal align=center style='mso-margin-top-alt:auto;text-align: | ||
+ | center'><span lang=EN-US style='font-size:16.0pt;color:white;mso-themecolor: | ||
+ | background1'>WM</span><span style='font-size:16.0pt;color:white;mso-themecolor: | ||
+ | background1'>单总线</span><span lang=EN-US style='color:black;mso-color-alt: | ||
+ | windowtext'><u1:p></u1:p></span></p> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <tr style='mso-yfti-irow:3'> | ||
+ | <td width=170 valign=top style='width:127.4pt;border:solid white 1.0pt; | ||
+ | mso-border-themecolor:background1;border-left:solid #5B9BD5 3.0pt;mso-border-left-themecolor: | ||
+ | accent5;mso-border-alt:solid white .5pt;mso-border-themecolor:background1; | ||
+ | mso-border-left-alt:solid #5B9BD5 3.0pt;mso-border-left-themecolor:accent5; | ||
+ | background:#5B9BD5;mso-background-themecolor:accent5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
+ | <p class=MsoNormal align=center style='mso-margin-top-alt:auto;text-align: | ||
+ | center'><b><span style='font-size:16.0pt;color:white;mso-themecolor:background1'>通道数</span></b></p> | ||
+ | </td> | ||
+ | <td width=386 valign=top style='width:289.6pt;border-top:solid white 1.0pt; | ||
+ | mso-border-top-themecolor:background1;border-left:none;border-bottom:solid white 1.0pt; | ||
+ | mso-border-bottom-themecolor:background1;border-right:solid #5B9BD5 3.0pt; | ||
+ | mso-border-right-themecolor:accent5;mso-border-top-alt:solid white .5pt; | ||
+ | mso-border-top-themecolor:background1;mso-border-bottom-alt:solid white .5pt; | ||
+ | mso-border-bottom-themecolor:background1;mso-border-right-alt:solid #5B9BD5 3.0pt; | ||
+ | mso-border-right-themecolor:accent5;background:#5B9BD5;mso-background-themecolor: | ||
+ | accent5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
+ | <p class=MsoNormal align=center style='mso-margin-top-alt:auto;text-align: | ||
+ | center'><span lang=EN-US style='font-size:16.0pt;color:white;mso-themecolor: | ||
+ | background1'>1<o:p></o:p></span></p> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <tr style='mso-yfti-irow:4'> | ||
+ | <td width=170 valign=top style='width:127.4pt;border-top:none;border-left: | ||
+ | solid #5B9BD5 3.0pt;mso-border-left-themecolor:accent5;border-bottom:solid white 1.0pt; | ||
+ | mso-border-bottom-themecolor:background1;border-right:solid white 1.0pt; | ||
+ | mso-border-right-themecolor:background1;mso-border-top-alt:solid white .5pt; | ||
+ | mso-border-top-themecolor:background1;mso-border-alt:solid white .5pt; | ||
+ | mso-border-themecolor:background1;mso-border-left-alt:solid #5B9BD5 3.0pt; | ||
+ | mso-border-left-themecolor:accent5;background:#5B9BD5;mso-background-themecolor: | ||
+ | accent5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
+ | <p class=MsoNormal align=center style='mso-margin-top-alt:auto;text-align: | ||
+ | center'><b><span style='font-size:16.0pt;color:white;mso-themecolor:background1'>额定通过电流<span | ||
+ | lang=EN-US><o:p></o:p></span></span></b></p> | ||
+ | </td> | ||
+ | <td width=386 valign=top style='width:289.6pt;border-top:none;border-left: | ||
+ | none;border-bottom:solid white 1.0pt;mso-border-bottom-themecolor:background1; | ||
+ | border-right:solid #5B9BD5 3.0pt;mso-border-right-themecolor:accent5; | ||
+ | mso-border-top-alt:solid white .5pt;mso-border-top-themecolor:background1; | ||
+ | mso-border-top-alt:solid white .5pt;mso-border-top-themecolor:background1; | ||
+ | mso-border-bottom-alt:solid white .5pt;mso-border-bottom-themecolor:background1; | ||
+ | mso-border-right-alt:solid #5B9BD5 3.0pt;mso-border-right-themecolor:accent5; | ||
+ | background:#5B9BD5;mso-background-themecolor:accent5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
+ | <p class=MsoNormal align=center style='mso-margin-top-alt:auto;text-align: | ||
+ | center'><span lang=EN-US style='font-size:16.0pt;color:white;mso-themecolor: | ||
+ | background1'>10A<o:p></o:p></span></p> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <tr style='mso-yfti-irow:5'> | ||
+ | <td width=170 valign=top style='width:127.4pt;border-top:none;border-left: | ||
+ | solid #5B9BD5 3.0pt;mso-border-left-themecolor:accent5;border-bottom:solid white 1.0pt; | ||
+ | mso-border-bottom-themecolor:background1;border-right:solid white 1.0pt; | ||
+ | mso-border-right-themecolor:background1;mso-border-top-alt:solid white .5pt; | ||
+ | mso-border-top-themecolor:background1;mso-border-alt:solid white .5pt; | ||
+ | mso-border-themecolor:background1;mso-border-left-alt:solid #5B9BD5 3.0pt; | ||
+ | mso-border-left-themecolor:accent5;background:#5B9BD5;mso-background-themecolor: | ||
+ | accent5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
+ | <p class=MsoNormal align=center style='mso-margin-top-alt:auto;text-align: | ||
+ | center'><b><span style='font-size:16.0pt;color:white;mso-themecolor:background1'>最大切换电压<span | ||
+ | lang=EN-US><o:p></o:p></span></span></b></p> | ||
+ | </td> | ||
+ | <td width=386 valign=top style='width:289.6pt;border-top:none;border-left: | ||
+ | none;border-bottom:solid white 1.0pt;mso-border-bottom-themecolor:background1; | ||
+ | border-right:solid #5B9BD5 3.0pt;mso-border-right-themecolor:accent5; | ||
+ | mso-border-top-alt:solid white .5pt;mso-border-top-themecolor:background1; | ||
+ | mso-border-top-alt:solid white .5pt;mso-border-top-themecolor:background1; | ||
+ | mso-border-bottom-alt:solid white .5pt;mso-border-bottom-themecolor:background1; | ||
+ | mso-border-right-alt:solid #5B9BD5 3.0pt;mso-border-right-themecolor:accent5; | ||
+ | background:#5B9BD5;mso-background-themecolor:accent5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
+ | <p class=MsoNormal align=center style='mso-margin-top-alt:auto;text-align: | ||
+ | center'><span lang=EN-US style='font-size:16.0pt;color:white;mso-themecolor: | ||
+ | background1'>250VAC 30VDC<o:p></o:p></span></p> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <tr style='mso-yfti-irow:6'> | ||
+ | <td width=170 valign=top style='width:127.4pt;border-top:none;border-left: | ||
+ | solid #5B9BD5 3.0pt;mso-border-left-themecolor:accent5;border-bottom:solid white 1.0pt; | ||
+ | mso-border-bottom-themecolor:background1;border-right:solid white 1.0pt; | ||
+ | mso-border-right-themecolor:background1;mso-border-top-alt:solid white .5pt; | ||
+ | mso-border-top-themecolor:background1;mso-border-alt:solid white .5pt; | ||
+ | mso-border-themecolor:background1;mso-border-left-alt:solid #5B9BD5 3.0pt; | ||
+ | mso-border-left-themecolor:accent5;background:#5B9BD5;mso-background-themecolor: | ||
+ | accent5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
+ | <p class=MsoNormal align=center style='mso-margin-top-alt:auto;text-align: | ||
+ | center'><b><span style='font-size:16.0pt;color:white;mso-themecolor:background1'>额定负载<span | ||
+ | lang=EN-US><o:p></o:p></span></span></b></p> | ||
+ | </td> | ||
+ | <td width=386 valign=top style='width:289.6pt;border-top:none;border-left: | ||
+ | none;border-bottom:solid white 1.0pt;mso-border-bottom-themecolor:background1; | ||
+ | border-right:solid #5B9BD5 3.0pt;mso-border-right-themecolor:accent5; | ||
+ | mso-border-top-alt:solid white .5pt;mso-border-top-themecolor:background1; | ||
+ | mso-border-top-alt:solid white .5pt;mso-border-top-themecolor:background1; | ||
+ | mso-border-bottom-alt:solid white .5pt;mso-border-bottom-themecolor:background1; | ||
+ | mso-border-right-alt:solid #5B9BD5 3.0pt;mso-border-right-themecolor:accent5; | ||
+ | background:#5B9BD5;mso-background-themecolor:accent5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
+ | <p class=MsoNormal align=center style='mso-margin-top-alt:auto;text-align: | ||
+ | center'><span lang=EN-US style='font-size:16.0pt;color:white;mso-themecolor: | ||
+ | background1'>10A 250VAC/24VDC<o:p></o:p></span></p> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <tr style='mso-yfti-irow:7'> | ||
+ | <td width=170 valign=top style='width:127.4pt;border-top:none;border-left: | ||
+ | solid #5B9BD5 3.0pt;mso-border-left-themecolor:accent5;border-bottom:solid white 1.0pt; | ||
+ | mso-border-bottom-themecolor:background1;border-right:solid white 1.0pt; | ||
+ | mso-border-right-themecolor:background1;mso-border-top-alt:solid white .5pt; | ||
+ | mso-border-top-themecolor:background1;mso-border-alt:solid white .5pt; | ||
+ | mso-border-themecolor:background1;mso-border-left-alt:solid #5B9BD5 3.0pt; | ||
+ | mso-border-left-themecolor:accent5;background:#5B9BD5;mso-background-themecolor: | ||
+ | accent5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
+ | <p class=MsoNormal align=center style='mso-margin-top-alt:auto;text-align: | ||
+ | center'><b><span style='font-size:16.0pt;color:white;mso-themecolor:background1'>指示灯<span | ||
+ | lang=EN-US><o:p></o:p></span></span></b></p> | ||
+ | </td> | ||
+ | <td width=386 valign=top style='width:289.6pt;border-top:none;border-left: | ||
+ | none;border-bottom:solid white 1.0pt;mso-border-bottom-themecolor:background1; | ||
+ | border-right:solid #5B9BD5 3.0pt;mso-border-right-themecolor:accent5; | ||
+ | mso-border-top-alt:solid white .5pt;mso-border-top-themecolor:background1; | ||
+ | mso-border-top-alt:solid white .5pt;mso-border-top-themecolor:background1; | ||
+ | mso-border-bottom-alt:solid white .5pt;mso-border-bottom-themecolor:background1; | ||
+ | mso-border-right-alt:solid #5B9BD5 3.0pt;mso-border-right-themecolor:accent5; | ||
+ | background:#5B9BD5;mso-background-themecolor:accent5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
+ | <p class=MsoNormal align=center style='mso-margin-top-alt:auto;text-align: | ||
+ | center'><span lang=EN-US style='font-size:16.0pt;color:white;mso-themecolor: | ||
+ | background1'>2</span><span style='font-size:16.0pt;color:white;mso-themecolor: | ||
+ | background1'>个蓝色<span lang=EN-US>LED</span>指示状态<span lang=EN-US><o:p></o:p></span></span></p> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <tr style='mso-yfti-irow:8;mso-yfti-lastrow:yes'> | ||
+ | <td width=170 valign=top style='width:127.4pt;border-top:none;border-left: | ||
+ | solid #5B9BD5 3.0pt;mso-border-left-themecolor:accent5;border-bottom:solid white 1.0pt; | ||
+ | mso-border-bottom-themecolor:background1;border-right:solid white 1.0pt; | ||
+ | mso-border-right-themecolor:background1;mso-border-top-alt:solid white .5pt; | ||
+ | mso-border-top-themecolor:background1;mso-border-alt:solid white .5pt; | ||
+ | mso-border-themecolor:background1;mso-border-left-alt:solid #5B9BD5 3.0pt; | ||
+ | mso-border-left-themecolor:accent5;background:#5B9BD5;mso-background-themecolor: | ||
+ | accent5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
+ | <p class=MsoNormal align=center style='mso-margin-top-alt:auto;text-align: | ||
+ | center'><b><span style='font-size:16.0pt;color:white;mso-themecolor:background1'>尺寸大小<span | ||
+ | lang=EN-US><u1:p></u1:p><o:p></o:p></span></span></b></p> | ||
+ | </td> | ||
+ | <td width=386 valign=top style='width:289.6pt;border-top:none;border-left: | ||
+ | none;border-bottom:solid white 1.0pt;mso-border-bottom-themecolor:background1; | ||
+ | border-right:solid #5B9BD5 3.0pt;mso-border-right-themecolor:accent5; | ||
+ | mso-border-top-alt:solid white .5pt;mso-border-top-themecolor:background1; | ||
+ | mso-border-top-alt:solid white .5pt;mso-border-top-themecolor:background1; | ||
+ | mso-border-bottom-alt:solid white .5pt;mso-border-bottom-themecolor:background1; | ||
+ | mso-border-right-alt:solid #5B9BD5 3.0pt;mso-border-right-themecolor:accent5; | ||
+ | background:#5B9BD5;mso-background-themecolor:accent5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
+ | <p class=MsoNormal align=center style='mso-margin-top-alt:auto;text-align: | ||
+ | center'><span lang=EN-US style='font-size:16.0pt;color:white;mso-themecolor: | ||
+ | background1'>55mm * 24mm * 18.5mm</span><span style='font-size:16.0pt; | ||
+ | color:white;mso-themecolor:background1'>(长<span lang=EN-US>*</span>宽<span | ||
+ | lang=EN-US>*</span>高)<span lang=EN-US><u1:p></u1:p><o:p></o:p></span></span></p> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | |||
+ | </div> | ||
+ | </body></html> | ||
+ | |||
+ | |||
+ | |||
+ | ===== 3. 编程指南 ===== | ||
+ | |||
+ | ==== 3.1. 模块功能及图形化编程指南 ==== | ||
+ | |||
+ | <html><body> | ||
+ | |||
+ | <p class=MsoNormal style='text-indent:36.0pt'><span style='font-size:16.0pt; | ||
+ | font-family:等线'>该模块支持的图形化编程平台有</span><span lang=EN-US style='font-size:16.0pt'>WeeeCode</span><span | ||
+ | style='font-size:16.0pt;font-family:等线'>、编程猫平台、</span><span lang=EN-US | ||
+ | style='font-size:16.0pt'>Mixly_Arduino</span><span style='font-size:16.0pt; | ||
+ | font-family:等线'>、</span><span lang=EN-US style='font-size:16.0pt'>MakeCode</span><span | ||
+ | style='font-size:16.0pt;font-family:等线'>等,其图形化编程大同小异,区别不会很大。</span></p> | ||
+ | |||
+ | <div align=center> | ||
+ | |||
+ | <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 | ||
+ | style='border-collapse:collapse'> | ||
+ | <tr style='height:24.7pt'> | ||
+ | <td width=244 valign=top style='width:183.3pt;border:solid windowtext 1.0pt; | ||
+ | padding:0cm 5.4pt 0cm 5.4pt;height:24.7pt'> | ||
+ | <p class=MsoNormal align=center style='text-align:center'><b><span | ||
+ | style='font-size:14.0pt;font-family:等线;color:black;background:white'>模块功能</span></b></p> | ||
+ | </td> | ||
+ | <td width=189 valign=top style='width:142.05pt;border:solid windowtext 1.0pt; | ||
+ | border-left:none;padding:0cm 5.4pt 0cm 5.4pt;height:24.7pt'> | ||
+ | <p class=MsoNormal align=center style='text-align:center'><span class=grame><b><span | ||
+ | style='font-size:14.0pt;font-family:等线;color:black;background:white'>需传参数</span></b></span></p> | ||
+ | </td> | ||
+ | <td width=455 valign=top style='width:341.05pt;border:solid windowtext 1.0pt; | ||
+ | border-left:none;padding:0cm 5.4pt 0cm 5.4pt;height:24.7pt'> | ||
+ | <p class=MsoNormal align=center style='text-align:center'><b><span | ||
+ | style='font-size:14.0pt;font-family:等线;color:black;background:white'>图形化编程块举例</span></b><b | ||
+ | style='box-sizing: border-box;font-variant-ligatures: normal;font-variant-caps: normal; | ||
+ | orphans: 2;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-style: initial; | ||
+ | text-decoration-color: initial;word-spacing:0px'><span style='box-sizing: border-box'><span | ||
+ | lang=EN-US style='font-size:14.0pt;font-family:"Helvetica",sans-serif; | ||
+ | color:black;background:white'>(</span></span></b><b style='box-sizing: border-box; | ||
+ | font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2; | ||
+ | widows: 2;-webkit-text-stroke-width: 0px;text-decoration-style: initial; | ||
+ | text-decoration-color: initial;word-spacing:0px'><span style='box-sizing: border-box'><span | ||
+ | style='font-size:14.0pt;font-family:等线;color:black;background:white'>其他平台图形化编程块大同小异</span></span></b><b | ||
+ | style='box-sizing: border-box;font-variant-ligatures: normal;font-variant-caps: normal; | ||
+ | orphans: 2;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-style: initial; | ||
+ | text-decoration-color: initial;word-spacing:0px'><span style='box-sizing: border-box'><span | ||
+ | lang=EN-US style='font-size:14.0pt;font-family:"Helvetica",sans-serif; | ||
+ | color:black;background:white'>)</span></span></b></p> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <tr style='height:54.4pt'> | ||
+ | <td width=244 style='width:183.3pt;border:solid windowtext 1.0pt;border-top: | ||
+ | none;padding:0cm 5.4pt 0cm 5.4pt;height:54.4pt'> | ||
+ | <p class=MsoNormal align=center style='text-align:center'><span | ||
+ | style='font-size:14.0pt;font-family:等线;color:black;background:white'>设置继电器导通状态</span></p> | ||
+ | <p class=MsoNormal align=center style='text-align:center'><span lang=EN-US | ||
+ | style='font-size:14.0pt;font-family:等线;color:black;background:white'>NC</span><span | ||
+ | style='font-size:14.0pt;font-family:等线;color:black;background:white'>打开:<span | ||
+ | lang=EN-US>COM</span>与<span lang=EN-US>NC</span>通</span></p> | ||
+ | <p class=MsoNormal align=center style='text-align:center'><span lang=EN-US | ||
+ | style='font-size:14.0pt;font-family:等线;color:black;background:white'>NC</span><span | ||
+ | style='font-size:14.0pt;font-family:等线;color:black;background:white'>关闭:<span | ||
+ | lang=EN-US>COM</span>与<span lang=EN-US>NO</span>通</span></p> | ||
+ | </td> | ||
+ | <td width=189 style='width:142.05pt;border-top:none;border-left:none; | ||
+ | border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; | ||
+ | padding:0cm 5.4pt 0cm 5.4pt;height:54.4pt'> | ||
+ | <p class=MsoNormal><span style='font-size:14.0pt;color:black;background:white'>(</span><span | ||
+ | lang=EN-US style='font-size:14.0pt;font-family:"Helvetica",sans-serif; | ||
+ | color:black;background:white'>2</span><span style='font-size:14.0pt; | ||
+ | color:black;background:white'>个参数)端口、状态</span></p> | ||
+ | </td> | ||
+ | <td width=455 valign=top style='width:341.05pt;border-top:none;border-left: | ||
+ | none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; | ||
+ | padding:0cm 5.4pt 0cm 5.4pt;height:54.4pt'> | ||
+ | <p class=MsoNormal align=center style='text-align:center'><span lang=EN-US><img | ||
+ | width=543 height=207 id="图片 1" src="lib/exe/fetch.php?media=wm_wiki:relay_module:pasted:20200302-121113.png"></span></p> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | |||
+ | </div> | ||
+ | |||
+ | <p class=MsoNormal><span lang=EN-US style='color:white'> </span></p> | ||
+ | |||
+ | <p class=MsoNormal style='text-indent:32.0pt'><span style='font-size:16.0pt; | ||
+ | font-family:等线'>图形化编程示例:</span></p> | ||
+ | </body></html> | ||
+ | |||
+ | {{ :wm_wiki:relay_module:pasted:20200302-121807.png }} | ||
+ | ==== 3.2. 文本代码编程指南 ==== | ||
+ | |||
+ | <html><body> | ||
+ | <p class=MsoNormal style='text-indent:32.0pt'><span style='font-size:16.0pt; | ||
+ | font-family:等线'>Arduino编程示例:</span></p> | ||
+ | </body></html> | ||
+ | |||
+ | <sxh cpp; first-line: 1;highlight: [3,10,12]; title: we_relay_test.ino> | ||
+ | |||
+ | #include "WeELF328P.h" | ||
+ | |||
+ | WeRelay relay(PORT_A); | ||
+ | |||
+ | void setup() | ||
+ | { | ||
+ | } | ||
+ | void loop() | ||
+ | { | ||
+ | relay.openNC(); | ||
+ | delay(2000); | ||
+ | relay.closeNC(); | ||
+ | delay(2000); | ||
+ | } | ||
+ | </sxh> | ||