Epson TM-T20II-i Server Direct Print Users Manual for TM-i firmware ver.4.1 - Page 45
Status Notification, Refer to the programming below. File name: Test_status.php
![]() |
View all Epson TM-T20II-i manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 45 highlights
Chapter 4 Status Notification Program Example Refer to the programming below. (File name: Test_status.php)
![](/manual_guide/products/epson-tmh6000ivdt-server-direct-print-user-s-manual-tmi-firmware-ver41-d04f5e8/45.png)
45
Chapter 4
Status Notification
4
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 =
$_POST["Status"];
}
$xml = simplexml_load_string($status);
foreach ($xml->printerstatus as $printerstatus) {
$asb = hexdec($printerstatus['asbstatus']);
$strmsg = "";
if (($asb & 0x00000001) == 0x00000001)
{
$strmsg .= "
No TM printer response\n";
}
if (($asb & 0x00000002) == 0x00000002)
{
$strmsg .= "
Print completed \n";
}
if (($asb & 0x00000004) == 0x00000004)
{
$strmsg .= "
Status of the drawer kick number 3 connector pin\n";
}
if (($asb & 0x00000008) == 0x00000008)
{
$strmsg .= "
Offline status \n";
}
if (($asb & 0x00000020) == 0x00000020)
{
$strmsg .= "
Cover is open \n";
}
if (($asb & 0x00000040) == 0x00000040)
{
$strmsg .= "
During paper feeding by pressing paper feed switch \n";
}
if (($asb & 0x00000100) == 0x00000100)
{
$strmsg .= "
Waiting for online recovery \n";
}
if (($asb & 0x00000200) == 0x00000200)
{
$strmsg .="
Paper feed switch is being pressed (ON) \n";
}
if (($asb & 0x00000400) == 0x00000400)
{
$strmsg .= "
Mechanical error generated \n";
}
if (($asb & 0x00000800) == 0x00000800)
{
$strmsg .= "
Auto cutter error generated \n";
}