Hallo zusammen,
habe immer noch das Problem mit dem verzögerten Empfangen von Daten vom
Controller zum PC. Ich möchte Handshake ausschalten. Kann mir jemand
sagen, ob das mit diesen Einstellungen klappt:
1 | // Initialize the DCBlength member.
|
2 | PortDCB.DCBlength = sizeof (DCB);
|
3 |
|
4 | // Get the default port setting information.
|
5 | GetCommState (hPort, &PortDCB);
|
6 |
|
7 | // Change the DCB structure settings.
|
8 | PortDCB.BaudRate = 9600; // Current baud
|
9 | PortDCB.fBinary = TRUE; // Binary mode; no EOF check
|
10 | PortDCB.fParity = TRUE; // Enable parity checking
|
11 | PortDCB.fOutxCtsFlow = FALSE; // No CTS output flow control
|
12 | PortDCB.fOutxDsrFlow = FALSE; // No DSR output flow control
|
13 | PortDCB.fDtrControl = DTR_CONTROL_ENABLE;
|
14 | // DTR flow control type
|
15 | PortDCB.fDsrSensitivity = FALSE; // DSR sensitivity
|
16 | PortDCB.fTXContinueOnXoff = TRUE; // XOFF continues Tx
|
17 | PortDCB.fOutX = FALSE; // No XON/XOFF out flow control
|
18 | PortDCB.fInX = FALSE; // No XON/XOFF in flow control
|
19 | PortDCB.fErrorChar = FALSE; // Disable error replacement
|
20 | PortDCB.fNull = FALSE; // Disable null stripping
|
21 | PortDCB.fRtsControl = RTS_CONTROL_ENABLE;
|
22 | // RTS flow control
|
23 | PortDCB.fAbortOnError = FALSE; // Do not abort reads/writes on
|
24 | // error
|
25 | PortDCB.ByteSize = 8; // Number of bits/byte, 4-8
|
26 | PortDCB.Parity = NOPARITY; // 0-4=no,odd,even,mark,space
|
27 | PortDCB.StopBits = ONESTOPBIT; // 0,1,2 = 1, 1.5, 2
|
Vielen Dank.
Grüße
datatom