Ö§³ÖÖÐÐÄ
USR-M300Á¬½ÓÔ¶³Ì·þÎñÆ÷Ï·¢Ö¸Áî¿ØÖÆDOʾÀý
2024-08-05



USR-M300Á¬½ÓÔ¶³Ì·þÎñÆ÷Ï·¢Ö¸Áî¿ØÖÆDOʾÀý


±¸×¢£º±¾°¸ÀýÊÇUSR-M300ÁªÍø£¬Á¬½ÓÔ¶³Ì·þÎñÆ÷£¬JSONÏ·¢¿ØÖÆDO1ºÍDO2¶Ï¿ªºÍ±ÕºÏ¡£

Ò»¡¢×ÊÁÏÏÂÔØ

USR-M300 ˵Ã÷Ê飺/Download/1332.html

USR-M300 ¹æ¸ñÊ飺/Download/1333.html

USR-M300 Ó¦ÓÃÖ¸µ¼£º/Download/1369.html

¡¾PC¶Ëµ÷ÊÔ¹¤¾ß¡¿ÍøÂçµ÷ÊÔÖúÊÖ ´®¿Úµ÷ÊÔÖúÊÖ¶þºÏÒ»/Download/27.html

¶þ¡¢Ó²¼þÁ¬½Ó

1¡¢ËùÐèÎïÆ·

USR-M300 ²úÆ· 1̨

12VµçÔ´ÊÊÅäÆ÷ 1¸ö

³¬ÎåÀàÍøÏß 1¸ù

±Ê¼Ç±¾µçÄÔ 1̨

2¡¢Ó²¼þÁ¬½Ó

USR-M300 ½ÓºÃ4GÌìÏߣ¬µçÔ´¶Ë×Ó½Ó12VµçÔ´ÊÊÅ䣬עÒâÕý¸º¼«²»Òª½Ó·´¡£

USR-M300 µÄLAN¿ÚÍøÏßÖ±Á¬µçÄÔ¡£

½ÓºÃÏßÖ®ºó£¬²úÆ·½Ó12VµçÔ´ÊÊÅäÆ÷Éϵ硣

Èý¡¢²úÆ·²ÎÊýÉèÖÃ

1¡¢µÇ½USR-M300ÍøÒ³

µçÄÔ´ò¿ªä¯ÀÀÆ÷£¬ÊäÈë192.168.1.1£¬µÇ½USR-M300ÄÚÖÃÍøÒ³£¬Óû§ÃûºÍÃÜÂ붼ÊÇadmin¡£

2¡¢Êý¾Ýµãλ£º²é¿´DOµãλÃû

µã¿ªÊý¾Ýµã룬µã»÷´Ó»úÏÂÃæµÄLocal_IO£¬ÔÚ´Ó»ú-µãλÁбí£¬²é¿´DO01µãλÃû³ÆÊÇDO01£¬DO02µãλÃû³ÆÊÇDO02¡£

3¡¢±ßÔµÍø¹Ø£ºÍ¨ÐÅÁ´Â·--Á´Â·1--Ô¶³Ì²ÎÊýÉèÖÃ

£¨1£©µã»÷Á´Â·1£¬´ò¿ªÁ´Â·1¿ª¹Ø¡£

£¨2£©»ù´¡ÉèÖÃ

ͨÐÅЭÒ飺TCP client

·þÎñÆ÷µØÖ·£ºÌîUSR-M300 Á¬½ÓµÄÔ¶³Ì·þÎñÆ÷µØÖ·IP

±¾µØ¶Ë¿Ú0£¬Ô¶³Ì¶Ë¿Ú8234£¨ºÍÔ¶³Ì·þÎñÆ÷¶Ë¿ÚºÅ±£³ÖÒ»Ö£¬ÓÃÓÚTCPÁ¬½Ó£©¡£

ÆäËû²ÎÊý±£³ÖĬÈÏ¡£

µã»÷Ó¦Óá£

4¡¢Ð­Òéת»»ÉèÖÃJson

£¨1£©µã»÷ЭÒéת»»£¬µã»÷Json,¿ªÆôJson

£¨2£©¿ªÆôJsonÖ®ºóµã»÷Ìí¼Ó

£¨3£©Á´Â·Ñ¡ÔñÁ´Â·1£¬µã»÷È·¶¨

£¨4£©µã»÷Ó¦ÓÃ

5¡¢×îºóÍøÒ³µã»÷ÖØÆô£¬µÈ´ýUSR-M300ÖØÆôÍê³É¡£

ËÄ¡¢Ô¶³Ì·þÎñÆ÷JSONÏ·¢¿ØÖÆDO

1¡¢µÇ¼Զ³Ì×ÀÃæ

Ô¶³Ì·þÎñÆ÷£¬´ò¿ªÍøÂçÖúÊÖ£¬Ð­ÒéÀàÐÍTCP server£¬±¾µØÖ÷»ú¶Ë¿ÚÌî8234¡£µã»÷´ò¿ª¡£

2¡¢µÇ½USR-M300ÍøÒ³£¬IO¹ÜÀí£¬IO״̬£¬¿ÉÒԲ鿴DO01¡¢DO02µÄ״̬¡£

±¸×¢£º2·DO£¬3 ÏßÖÆ£¬Ä¬Èϳ£±Õµã£¨NC£©±ÕºÏ£¬³£¿ªµã£¨NO£©¶Ï¿ª¡£

3¡¢Ô¶³Ì·þÎñÆ÷JSONÏ·¢¿ØÖÆDO¶Ï¿ª

£¨1£©Ô¶³Ì·þÎñÆ÷JSONÏ·¢¿ØÖÆDO1¡¢DO2¶Ï¿ª

·¢ËÍÇø°´ÕÕ¸ñʽÊäÈëÏ·¢JSON¸ñʽÃüÁдDO01²ÎÊý1£¬Ð´DO02²ÎÊý1£¬¿ØÖÆDO¶Ï¿ª¡£

{

"rw_prot": {

"Ver": "1.0.1",

"dir": "down",

"id": "12345",

"r_data": [{

"name": "DO01"

},

{

"name": "DO02"

} ] ,

"w_data": [{

"name": "DO01",

"value": "1"

},

{

"name": "DO02",

"value": "1"

} ]

}

}

£¨2£©Ô¶³Ì·þÎñÆ÷JSONÏ·¢¿ØÖÆDO1¡¢DO2¶Ï¿ª£¬Ô¶³Ì·þÎñÆ÷ÊÕµ½»Ø¸´

»Ø¸´JSON¸ñʽÄÚÈÝ£º

{

"rw_prot": {

"dir": "up",

"Ver": "1.0.1",

"id": "12345",

"w_data": [{

"name": "DO01",

"value": "1",

"err": "0"

}, {

"name": "DO02",

"value": "1",

"err": "0"

}],

"r_data": [{

"name": "DO01",

"value": "1",

"err": "0"

}, {

"name": "DO02",

"value": "1",

"err": "0"

}]

}

}

4¡¢Ô¶³Ì·þÎñÆ÷JSONÏ·¢¿ØÖÆDO±ÕºÏ

£¨1£©Ô¶³Ì·þÎñÆ÷JSONÏ·¢¿ØÖÆDO1¡¢DO2±ÕºÏ

·¢ËÍÇø°´ÕÕ¸ñʽÊäÈëÏ·¢JSON¸ñʽÃüÁдDO01²ÎÊý0£¬Ð´DO02²ÎÊý0£¬¿ØÖÆDO±ÕºÏ¡£

{

"rw_prot": {

"Ver": "1.0.1",

"dir": "down",

"id": "12345",

"r_data": [{

"name": "DO01"

},

{

"name": "DO02"

} ] ,

"w_data": [{

"name": "DO01",

"value": "0"

},

{

"name": "DO02",

"value": "0"

} ]

}

}

£¨2£©Ô¶³Ì·þÎñÆ÷JSONÏ·¢¿ØÖÆDO1¡¢DO2±ÕºÏ£¬Ô¶³Ì·þÎñÆ÷ÊÕµ½»Ø¸´

»Ø¸´JSON¸ñʽÄÚÈÝ£º

{

"rw_prot": {

"dir": "up",

"Ver": "1.0.1",

"id": "12345",

"w_data": [{

"name": "DO01",

"value": "0",

"err": "0"

}, {

"name": "DO02",

"value": "0",

"err": "0"

}],

"r_data": [{

"name": "DO01",

"value": "0",

"err": "0"

}, {

"name": "DO02",

"value": "0",

"err": "0"

}]

}

}




±àдÈË£º½ðÖ¾·½ ±àдÈÕÆÚ£º2024-08-05

ÉóºËÈË£º½ðÖ¾·½ ÉóºËÈÕÆÚ£º2024-08-05

¶©Õý°æ±¾£ºV1.0 ¶©ÕýÄÚÈÝ£º³õ¸å   



¹Ø×¢¿­·¢¡¤k8¹ú¼Ê΢ÐŹ«ÖÚºÅ
Á˽â¸ü¶àÐÅÏ¢

sitemap¡¢µØͼ