Epson TM-DT Series User Manual page 66

Server direct print
Table of Contents

Advertisement

Program Example
Refer to the programming below. (File name: Test_status.php)
<?php
header('Content-Type: text/xml; charset=UTF-8');
# Open the file to save status.
$fhandle = @fopen("ResultStatus.log", "wt");
# Update the printer status.
if (isset($_POST["Status"])) {
$status =
}
$xml = simplexml_load_string($status);
foreach ($xml->printerstatus as $printerstatus) {
if (($asb & 0x00000004) == 0x00000004)
{
}
if (($asb & 0x00000008) == 0x00000008)
{
}
if (($asb & 0x00000020) == 0x00000020)
{
$strmsg .= "
}
if (($asb & 0x00000040) == 0x00000040)
{
}
if (($asb & 0x00000100) == 0x00000100)
{
}
if (($asb & 0x00000200) == 0x00000200)
{
}
if (($asb & 0x00000400) == 0x00000400)
{
}
if (($asb & 0x00000800) == 0x00000800)
{
}
if (($asb & 0x00002000) == 0x00002000)
{
}
if (($asb & 0x00004000) == 0x00004000)
{
}
if (($asb & 0x00020000) == 0x00020000)
{
}
66
$_POST["Status"];
$asb = hexdec($printerstatus['asbstatus']);
$strmsg = "";
$strmsg .= "
Status of the drawer kick number 3 connector pin\n";
$strmsg .= "
Offline status \n";
Cover is open \n";
$strmsg .= "
During paper feeding by pressing paper feed switch \n";
$strmsg .= "
Waiting for online recovery \n";
$strmsg .="
Paper feed switch is being pressed (ON) \n";
$strmsg .= "
Mechanical error generated \n";
$strmsg .= "
Auto cutter error generated \n";
$strmsg .= "
Unrecoverable error generated \n";
$strmsg .= "
Auto recovery error generated \n";
$strmsg .= "
No paper in the roll paper near end detector \n";

Advertisement

Table of Contents
loading

Table of Contents