Welcome to Easyiew.kr

Q&A

¼ÒÇÁÆ®¿þ¾î
Çϵå¿þ¾î
[´äº¯]MT8070iH rs-485 Åë½Å °ü·Ã ¹®ÀÇ µå¸³´Ï´Ù.
±Û¾´ÀÌ admin
³¯Â¥ 2015-08-26 15:37:36
Á¶È¸¼ö 1332
admin´ÔÀÇ ±ÛÀÔ´Ï´Ù. > > > > >> >> >> >>

 02 34 04 9 ±îÁö 7 byte·Î ¼Û½Å µÉ ¼ö ÀÖÀ» °Íµµ °°½À´Ï´Ù. OUTPORTÀÇ length¸¦ ´Ã·Á¼­ Ãâ·ÂÇغ¸½Ê½Ã¿À. 

Free ProtocolÀº ASCIIÀÇ µ¥ÀÌÅÍ Çü½ÄÀ» °¡Áö°í ÀÖ½À´Ï´Ù. 

Á» ´õ »ó¼¼ÇÑ ³»¿ëÀ»  ÀüÈ­±â¼ú¹®ÀǸ¦ ÅëÇØ ¹®Àǹٶø´Ï´Ù. 

°¨»çÇÕ´Ï´Ù. 









>> >> ½Ã½ºÅÛÆĶó¹ÌÅÍ ¼³Á¤¿¡¼­´Â free protocol¿¡¼­ rs-485 2W ¼¼Æø¸ ÇÑ »óÅÂÀÌ°í ³ª¸ÓÁö ¼¼Æ¼Àº
       Ãʱ⠼¼ÆÃÀ¸·Î µÇ¾îÀÖ½À´Ï´Ù. 

test Äڵ带 ÀÌ¿ëÇÏ¿© HMI¿¡¼­ PC·Î ¼Û½ÅµÇ´Â µ¥ÀÌÅÍ°¡ Á¤È®ÇÑÁö È®ÀÎÇÏ·Á Çϴµ¥ ¹®Á¦°¡ ÇØ°áµÇÁö¾Ê¾Æ
       ¹®Àǵ帳´Ï´Ù.

     test codeÀÇ °æ¿ì
  
    macro_command main()

unsigned char test[7], response[7]

short return_value

test[0]=0x02
test[1]=0x34 // length 5 byte
test[2]=0x04
test[3]=9
test[4]=8
test[5]=7
test[6]=6 

OUTPORT(test[0], "Free Protocol", 7)

end macro_command

´ÙÀ½°ú °°ÀÌ coding ÇÏ¿´½À´Ï´Ù.

°á°úÀÇ °æ¿ì
 
02 34 04 9 ±îÁö´Â Á¤È®ÇÏ°Ô ¼Û½ÅµÇ¾î Ãâ·ÂµÇ´Âµ¥ 8 7 6 ÀÌ °ªÀÌ ÀÌ»óÇÑ °ªÀ¸·Î Ãâ·ÂµÇ¾îÁý´Ï´Ù.

                                - °Ô½Ã¹°ÀÌ °ü¸®ÀÚ¿¡ ÀÇÇØ À̵¿µÇ¾ú½À´Ï´Ù. -