ich möchte meine Digitalwaage ansteuern. Ich bekomme aber leider keinen Verbindungsaufbau zustande.
Der COM-Port und die Initialisierung sollten richtig sein.
Code: Alles auswählen
ser:=TBlockSerial.Create;
ser.Purge;
ser.Connect('COM1');
Sleep (1000);
ser.config(19200, 8, 'N', SB1, True, False);
Anschließend versuche ich mit dem Command "Z" (Steht in der Bedienungsanleitung) die Digitalwaage zu Nullen. Leider macht dies die Digitalwaage aber nicht...
Code: Alles auswählen
ser.sendstring('Z'+chr(13));
2.1 Command formats
Commands sent to the balance comprise one or more characters of the ASCII character set.
Here, the following must be noted:
• Enter commands only in uppercase.
• The possible parameters of the command must be separated from one another and from
the command name by a space (ASCII 32 dec., in this description represented as /).
• The possible input for "text" is a sequence of characters of the 8-bit ASCII character set from
32 dec to 255 dec.
• Each command must be closed by CR
LF
(ASCII 13 dec., 10 dec.).
The characters CRLF, which can be inputted using the Enter or Return key of most entry
keypads, are not listed in this description, but it is essential they be included for communication
with the balance.
Hat jemand eine Ahnung was ich falsch mache?
Es handelt sich bei der Digitalwaage um eine Mettler Toledo PB 602.
Vielen Dank vorab!
Gruß l0lhaxx