k8¿­·¢ÌìÉúÓ®¼ÒÒ»´¥¼´·¢

Ê×Ò³
²úÆ·
׿Խ ? Ò×Óà ? ¿É¿¿
ËÑË÷
ÀúÊ·ËÑË÷
ËÑË÷·¢ÏÖ
HOME > SERVICE > Problem > I/O

How to parse DI return instructions

2022-03-31 10:35:49| ´Î| 0´Î

¡¡¡¡Demonstrate with DAM0404 instruction

¡¡¡¡Query optocoupler (4-way optocoupler)

¡¡¡¡Send command code: FE 02 00 00 00 04 6D C6

¡¡

QQ½Øͼ20220325145127.png

¡¡¡¡Optocoupler return information:

¡¡¡¡Return code: FE 02 01 00 91 9C

¡¡QQ½Øͼ20220325145150.png


¡¡¡¡For example, the return command query status is FE 02 01 03 D1 9D

¡¡¡¡FE is the device address, 02 is the query command, 01 is the number of bytes returned, 03 is the current state, and the last is the check digit.

¡¡¡¡03 is the current state:

¡¡¡¡03 is hexadecimal data and needs to be converted to binary as 0011

¡¡¡¡The state needs to be viewed from right to left,

¡¡¡¡0 0 1 1

      Í¼Æ¬7.png

¡¡¡¡That is, the first channel and the second channel are currently open.


ÁªÏµÏúÊÛ
ÏúÊÛÍõ¾­Àí΢ÐÅ ÏúÊÛÍõ¾­Àí
΢ÐŹ«ÖںŠ΢ÐŹ«ÖÚºÅ
·þÎñÈÈÏß
400-6688-400

k8¿­·¢ÌìÉúÓ®¼ÒÒ»´¥¼´·¢