Remark 3: Telegram ending identifier¶
See remark 3 under “ASCII” protocol settings AC500 PLC Configuration.
Because the receive function SysComRead() interrupts the processing of the user program until the ending criteria (telegram ending selection or timeout) is detected, it is recommended to set the telegram ending selection only to the following values:
- None
- Character timeout
During processing of the user program, the following parameters can be changed using the function SysComSetSettings():
- Baudrate
- Number of stop bits
- Parity
This is done by adding the parameters to the structure COMSETTINGS. The structure is as follows:
Parameter | Type | Default value | Meaning / valid values |
---|---|---|---|
dwBaudRate | DWORD | none | Baudrate 300, 1200, 4800, 9600, 14400, 19200, 38400 57600, 115200, 125000, 187500 Warning: The structure must have a valid value assigned to it. The function reports an error for any invalid values (also 0). |
byStopBits | BYTE | 0 | Number of stop bits 0=1, 1=1,5, 2=2 stop bits |
byParity | BYTE | 0 | Parity 0=No, 1=odd, 2=even, 3=mark, 4=space |
dwTimeout | DWORD | 0 | Currently not supported! Specified values are ignored. |
dwBufferSize | DWORD | 0 | |
dwScan | DWORD | 0 |