Hi 8run0tti,
we implemented the support from version 1.16 on.
Find here some example code.
PROGRAM PLC_PRG
VAR
result : Syscom.RTS_IEC_RESULT;
handle : Syscom.RTS_IEC_HANDLE;
settings : Syscom.SysComSettings;
bDone : BOOL;
arByte : ARRAY[0..99] OF BYTE;
udiReturn : UDINT;
iState : INT := 0;
END_VAR
settings.sPort := SYS_COMPORT1;
settings.ulBaudrate := SYS_BR_4800;
settings.byParity := SYS_NOPARITY;
settings.byStopBits := SYS_ONESTOPBIT;
CASE iState OF
0:
IF NOT bDone THEN
handle := Syscom.SysComOpen2(
pSettings:= ADR(settings),
pSettingsEx:= 0,
pResult:= ADR(result));
bDone := TRUE;
iState:= 10;
END_IF
10:
udiReturn := Syscom.SysComRead(
hCom:= handle,
pbyBuffer:= ADR(arByte),
ulSize:= SIZEOF(arByte),
ulTimeout:= 0,
pResult:= ADR(result));
END_CASE
... View more