Ja so kann sie eingebunden werden.
Delphi-Quellcode:
function GetGeneratePulseSequence( m, t1, t2:ansistring ): 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;
Hiermit werden die Daten generiert die an den Drucker gehen.
also
Druckstring:=GetDefaultGeneratePulseSequence;
{1} Ja, hier kommt der Druckername rein
{2} Mit der Zeigerwurschtelei kenn ich mich nicht so gut aus, ich nehme an ein @Druckstring[1] könnte reichen, vllt auch ein pansichar(Druckstring);
{3}
length(Druckstring)
ggf. solltest Du Dir einmal die Daten anzeigen, die ankommen:
aus dem Programming Guide für den t798
Zitat:
Enable or disable data scope mode
The data scope mode test prints a hexadecimal dump of all data sent to the printer: “1” prints as hexadecimal 31, “A” as hexadecimal 41 and so on. This helps troubleshoot communication problems and runs during a normal application (after being enabled through printer configuration).
Note: Data scope mode is usually considered a level 1 diagnostic test.
Data scope mode is enabled and disabled by selecting the “Diagnostic Modes” sub-menu of the configuration menu.
Press the paper feed button as instructed on the “Diagnostic Modes Menu” to enable or disable the data scope mode test.
• Off, normal mode (Data scope mode disabled)
• Data scope mode (enabled)
Note: Press the paper feed button for at least one second to validate the selection.
To run the data scope mode:
1 After you have enabled the data scope mode, exit the configuration menu.
2 Run a transaction from the host computer.
All commands and data sent from the host computer will be printed as hexadecimal characters as shown in the illustration.
To exit the data scope mode:
1 Enter the configuration menu again.
See “Configuring the printer.”
2 Disable the data scope mode.
3 Exit the configuration menu.
The printer is on-line and can communicate normally with the host computer.
For more
Gruß
K-H