Einzelnen Beitrag anzeigen

King555
(Gast)

n/a Beiträge
 
#13

Re: Serielle Kassenschublade ansteuern: Was bedeutet z.B &am

  Alt 20. Dez 2005, 09:32
Ich habe im Handbuch nochwas gefunden:

Zitat:
ESC p m t1 t2
[Name] Generate pulse.
[Format] ASCII ESC p m t1 t2
Hex 1B 70 m t1 t2
Decimal 27 112 m t1 t2
[Range] m = 0, 48
0 £ t1, t2 £ 255
[Description] Outputs the pulse specified by t1 and t2 to connector pin m as follows :
m Connector Pin
0, 48 Drawer kick-out connector pin 2
[Notes] · The pulse ON time is [ t1 ´ 2 ms ] and the OFF time is [ t2 ´ 2 ms ].
· If t2 < t1, the OFF time is [ t1 ´ 2 ms ].
[Default]
[Reference] See Drawer kick-out connector described in the Chapter 1 of this manual.
[Example]
Mein aktueller Code, der noch nicht funktioniert, sieht so aus:

Delphi-Quellcode:
  function KasseOeffnen: Boolean;
  begin
    Result := False;
    try
      if SerialOpen(FSerialConn) = SER_OK then
      begin
        Result := (SerialXmit(FSerialConn, #27) = SER_OK);
        Result := Result and (SerialXmit(FSerialConn, #112) = SER_OK);
        Result := Result and (SerialXmit(FSerialConn, #0) = SER_OK);
        Result := Result and (SerialXmit(FSerialConn, #48) = SER_OK);
        Result := Result and (SerialXmit(FSerialConn, #0) = SER_OK);
        Result := Result and (SerialXmit(FSerialConn, #255) = SER_OK);
        SerialStop(FSerialConn);
      end; {IF}
    except
      Result := False;
    end; {TRY}
  end;
  Mit Zitat antworten Zitat