HP Pcl 5 Manual
Have a look at the manual HP Pcl 5 Manual online for free. It’s possible to download the document as PDF or print. UserManuals.tech offer 1114 HP manuals and user’s guides for free. Share the user manual or guide on Facebook, Twitter or Google+.
ENEntity Error Codes 16-19 Entity Error Codes If you request out-of-range values in the command value fields, or if the entity is unsupported or does not exist, or if the request is inappropriate, the printer responds with one of four possible errors: zInvalid Entity zInvalid Location zNone zInternal Error ERROR=INVALID ENTITY If the entity type specified in the escape sequence is out of range or unsupported, an invalid entity error is returned. For example, if the Inquire Entity command contained an out of range value of 8 ( E C*s8I), the following error response would be generated. PCL INFO ENTITY ERROR=INVALID ENTITY ERROR=INVALID LOCATION If the entity type is valid but the location (either the type, the unit, or the combination) is invalid or if the specified device is not installed, an invalid location error is returned. For example, if you requested a status for a car tridge type but identified an out of range location unit of 9 ( E C*s5t9U), the following error response would be generated: PCL INFO FONTS ERROR=INVALID LOCATION
16-20 Status ReadbackEN ERROR=NONE If the entity type and location are valid, but there are no entities of the specified type in that location, or if the type is inappropriate for the specified entity (internal user-defined pattern or currently selected macro), then an error response is generated. For example, if you request the downloaded symbol sets and there are no downloaded symbol sets, the following error response would be generated: PCL INFO SYMBOLSETS ERROR=NONE ERROR=INTERNAL ERROR The status response for some requests can be fairly large (such as for fonts). In processing status responses, if the printer runs out of memory, an internal error is returned, as shown below: PCL INFO SYMBOLSETS ERROR=INTERNAL ERROR NoteThe error conditions described above are the only conditions for which an error response is generated. If you make a syntax error in the escape sequence, or send a command which the printer cannot interpret, the printer ignores the command and no error response is given.
ENFree Space Command 16-21 Free Space Command The Free Space command returns the amount of available memory. This response returns two values: the total available memory, and the largest available block of memory (refer to the “Memory Status Response” section later in this chapter for additional information). E C * s 1 M If a value other than 1 is sent, this command returns an error (“ERROR = INVALID UNIT,” refer to “Memory Error Response” section later in this chapter for additional information). To identify whether the printer has enough memory available for a job, you can send the Free Space command to compare the space available with that needed. You can also identify how much memory an entity or any other data uses by checking the amount of free memory prior to downloading the data, then downloading the data, and checking memory again. The difference in these values represents the approximate memory needed. NoteMany conditions can cause the available memory to change or appear different. Some of these conditions are listed below. The actual printer memory required to store an item varies slightly based on printer memory fragmentation and other internal printer conditions. Different printer models use different methods to store data. Thus, the amount of memory required to store the same amount of data may be slightly different in different printers. While the printer is processing page data, the available memory is constantly changing due to the printer receiving new data, processing existing data, and adding new characters to the font cache, etc. Under these conditions, the available memory may change by the time the memory response is returned. If a PostScript SIMM is installed in the printer, some memory is not repor ted for a Free Space command response. This memory is not repor ted as part of the free memory for a PCL status readback response, however, this memory is available for PCL use. Thus, it is possible for all or part of the downloaded data to be stored in this section of unreported memory and not change the memory response size.
16-22 Status ReadbackEN If you determine there is insufficient memory to hold the data to be downloaded, some action is required. One method to make more memory available is to send the Flush All Pages command. This causes the printer to clear (process) the current page data from memory without accepting any new data for processing (refer to the “Flush All Pages Command” described later in this section). Another, more comprehensive method to clear memory is to send the Printer Reset ( E CE) command. This not only removes data (deletes all temporary entities and the font cache) but also restores the User Default Environment settings (refer to the Printer Reset command in Chapter 4, “Job Control Commands”). NoteTo print characters from a scalable font, the printer conver ts the scalable character outlines into sized bitmaps. These bitmapped characters are created on a character-by-character basis as they are needed for printing and are stored in memory. As more pages are printed using more fonts, the bitmaps consume more memory. The bitmap characters used on the first page of a job can remain in memory until the end of a job. These stored bitmap characters are referred to as the font cache. NoteWhen an HP LaserJet 4 printer (or later) reaches a memory low condition it automatically deletes all of the font cache. It is possible to delete the cache immediately using a Printer Reset command. A Printer Reset clears the font cache, clears temporary entities, and restores the user default environment. Memory Status Response A Free Space status response returns two values: TOTAL= LARGEST= “TOTAL=” identifies the total available user memory (in bytes). This value includes the largest block available and all smaller blocks. NoteData downloaded to the printer is stored in a block (continuous section of free memory). If the printer does not have a large enough block to store the data, then the data is discarded and a memory error results.
ENFree Space Command 16-23 “LARGEST=” identifies the largest continuous block of available memory (in bytes). An example response is shown below: PCL INFO MEMORY TOTAL=100000 LARGEST=25000 The above example indicates that the printer has 100,000 bytes of available memory and the largest continuous block is 25,000 bytes. Memory Error Response If the Free Memory command value field is out of range (not 1), then the memory status response returns an invalid unit error. For example, if the Free Space command with a value of 2 ( E C*s2M) were sent, the following error would be returned: PCL INFO MEMORY ERROR=INVALID UNIT
16-24 Status ReadbackEN Flush All Pages Command The Flush All Pages command suspends accepting input data until all pages currently in the printer are printed. This gives the printer time to clear some memory. E C & r # F # =0- Flush all complete pages 1 - Flush all pages Default =0 Range =0 - 1 A value of 0 indicates that only complete pages are to be processed. If a partial page exists, it is not processed. A value of 1 indicates that all page data including the partial page will be processed. For example, if the printer contains two complete pages (page “A” and page “B”) and one partial page (page “C”), and receives a Flush All Pages command (value field 0 - all complete pages), it ejects pages “A” and “B” and retains page “C.” If the printer received the flush all pages (value field 1) it processes and ejects pages “A,” “B,” and “C.” The printer resumes receiving (processing) data when the last page is processed and ejected from the paper path. NotesUsing the Flush All Pages command significantly reduces printing performance. If possible, applications should use the Free Space command to check for available memory without using the Flush All Pages command. If the memory status readback response indicates sufficient memory available to process a job, the Flush All Pages command does need not be used. If the memory response indicates insufficient memory available to run the job, then the application should use the Flush All Pages command to make memory available, and then check available memory a second time. When possible, use the Flush All Pages command only at the beginning of a print job, prior to the receipt and processing of any data. This minimized, to minimize performance reduction.
ENEcho Command 16-25 Echo Command The Echo command echoes its value field (in ASCII format) back to the host. E C * s # X # =Echo value (ASCII) Default =0 Range =–32767 to 32767 If multiple users are requesting status, it can be difficult to distinguish one user’s status response from another. The Echo command provides the means to label status responses. Since the user-selected value for the value field is returned, this command can be used as a user identification mark or “place holder.” Sending the Echo command, with a specific user-selected value, at the beginning of a status request enables users to identify their status response data. NotesStatus readback requests are processed in the order they are received. Status readback responses are returned to the printer port from which they were received. When selecting an echo value, it is impor tant to select a number which is not likely to be used by another user, such as a random number. This example illustrates why using the Echo command with a random number is important. Assume an application uses a fixed number each time the Echo command is sent. Further, assume the printer running the application was turned off after the application sent the Echo command followed by a Free Space command. The printer generates the status readback responses to the Echo command and Free Space commands. Since the host is not accepting data, the data will be in the printer waiting for the host to accept it. Now, assume the host computer is turned on and the application is again executed.
16-26 Status ReadbackEN If the application sends the Echo command and Free Space command, the printer returns the response to the first Echo command and Free Space command, along with the response to the second request. The application will assume that the response received is the response to its last request. If the application uses random numbers in the Echo command, this type of mix-up will not occur. Echo Response The Echo command returns the following response: PCL ECHO ValueField where “ ValueField” is the Echo command value field value that was selected (within the range –32767 to 32767). For example, if the Echo command, E C*s–999X was sent the status response would be: PCL ECHO –999
ENStatus Readback Programming Hints 16-27 Status Readback Programming Hints The following hints can assist in using the status readback feature. zPCL status readback is useful during the development of applications. Status readback allows you to determine that fonts, macros, user-defined patterns, and symbol set resources you have downloaded were accepted by the printer. zIf the printer does not contain sufficient memory to accept a downloaded entity, the printer discards the data. Status readback can be used to determine if the printer accepted a downloaded entity. zStatus responses are directed to the printer’s I/O port from which the request is received. If the status is not read and the printer switches to another I/O port, the status response is not directed to that port. The status response returns if the printer switches back to the original port (see note on following page). zYour application should work correctly when an unexpected status response is received. For example, when requesting a PCL status, it is possible that PJL could return an unsolicited status response, if PJL is enabled. All PCL status responses begin with the “PCL” header and end with the control code. When reading PCL status responses, your application should be able to read all the data between the “PCL” header and the control code. It should ignore any other status response syntax. Lines within the PCL status response begin with a specific keyword (those described in this chapter) and end with the and control codes. Future printers may suppor t new keywords in the PCL status response. Your application should be designed to ignore those lines which it does not understand. zThe first PCL status readback command an application should send is the PCL Echo command. A random number should be generated for the value field each time the command is sent. Your application should ignore all printer status readback data until the PCL Echo status readback response is received, echoing the number the application sent. zTo clear any possible unread status responses from previous applications, an application, upon starting up, may want to read any pending responses until they are cleared from the printer.