da muss ich dir recht geben .
Danke für alle Hilfen bisher.
Sir Rufo wie bekomme ich deinen Code vernünftig eingebunden habe es versucht. Er zeigt mir aber Fehler
Delphi-Quellcode:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 =
class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
const
ESC = #27;
GS = #29;
{ Commands }
ESC_em = ESC + #33;
{ Select print mode }
ESC_p = ESC+#112;
{ Generate pulse }
GS_V = GS + #86;
{ Select cut mode and cut paper }
{ Parameter }
Lade1 = #48;
Lade2 = #49;
PulsDauer100ms = #050;
{* 2ms}
PulsDauer200ms = #100;
{* 2ms}
PulsDauer300ms = #150;
{* 2ms}
PulsDauer400ms = #200;
{* 2ms}
PulsDauer500ms = #250;
{* 2ms}
var
Form1: TForm1;
implementation
{$R *.dfm}
function GetGeneratePulseSequence( m, t1, t2 ): Ansistring);
//hier sagt er missing parameter type
begin
Result := Esc_p + m + t1 + t2;
//incompatible typen string und integer
end;
function GetDefaultGeneratePulseSequence : AnsiString;
begin
Result := GetGeneratePulseSequence(
{m} Lade1,
{t1} PulsDauer200ms,
{t2} PulsDauer200ms );
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
getDefaultGeneratePulseSequence;
end;