Difference between revisions of "Writing SerialPort"
From ArcoWiki
m (1 revision imported) |
|||
Line 1: | Line 1: | ||
It is possible to write data on a | It is possible to write data on a | ||
− | serial port through the DMIS code, for example: | + | serial port through the [[DMIS]] code, for example: |
− | + | <code> | |
+ | DECL/CHAR,10,my_var<br /> | ||
+ | DECL/INTGR,ii<br /> | ||
+ | my_var=[[Assign|ASSIGN]]/'Here the value assigned!'<br /> | ||
+ | DID(my_com_device)=DEVICE/COMM,'com3:9600,n,8,1'<br /> | ||
+ | OPEN/DID(my_com_device),DIRECT,INPUT<br /> | ||
+ | DO/ii,1,10,1<br /> | ||
+ | WRITE/DID_com_device),my_var<br /> | ||
+ | ENDDO<br /> | ||
+ | CLOSE/DID(my_com_device)<br /> | ||
+ | </code> | ||
− | + | [[Category:ReadMe3.5.100]] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | [[ |
Revision as of 16:56, 10 September 2016
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)