編寫SerialPort

從 ArcoWiki
於 2018年6月29日 (五) 10:19 由 Slia (對話 | 貢獻) 所做的修訂 (创建页面,内容为“ It is possible to write data on a serial port through the DMIS code, for example: DECL/CHAR,10,my_var DECL/INTGR,ii my_var=ASSIGN/'Here the…”)
(差異) ←上個修訂 | 最新修訂 (差異) | 下個修訂→ (差異)
跳到: 導覽搜尋

 It is possible to write data on a serial port through the DMIS code, for example:


DECL/CHAR,10,my_var
DECL/INTGR,ii
my_var=ASSIGN/'Here the value assigned!'
DID(my_com_device)=DEVICE/COMM,'com3:9600,n,8,1'
OPEN/DID(my_com_device),DIRECT,INPUT
  DO/ii,1,10,1
    WRITE/DID_com_device),my_var
  ENDDO
CLOSE/DID(my_com_device)