2. April 2013 17:28
4. April 2013 15:58
Te_SettingsString := Te_Baudrate + ',' + Te_Paritaet + ',' + Te_DataBits + ',' + Te_StopBits;
MSCOMM32.CommPort(COMPort);
MSCOMM32.Settings(Te_SettingsString); //Parameter
MSCOMM32.InputLen(0); //Sofort senden
MSCOMM32.InBufferCount(0); //Init
MSCOMM32.InputMode(0); //Textmode
//...
CharESC := 27;
CharCR := 13;
CharLF := 10;
TeSendBefehl := FORMAT(CharESC) + 'P' + FORMAT(CharCR) + FORMAT(CharLF);
//...
IF NOT MSCOMM32.PortOpen THEN
MSCOMM32.PortOpen(TRUE); //öffnen
MSCOMM32.Output(TeSendBefehl);
TeWert := FORMAT(MSCOMM32.Input());
4. April 2013 16:01