[DC2+PN] Request to Return Label Pitch Size
Hexadecimal code
| DC2 | <12>16 |
|---|---|
| PN |
<50>16<4E>16 |
Parameter
None
Initial value
None
Valid range and term of command
| When power switch is OFF | - |
| Valid range | - |
| When printer is working | Command is accepted when printer is working |
| During an error | Command is accepted during an error occurs |
| Unauthentication | Commands can be received even if authentication is not in progress using the [DC2+PS] command. |
| Others | NAK is returned for PW208 |
Command Valid Range and Period [CL4-SXR/CL6-SXR]
| When turning off the power switch | - |
| Valid range | - |
| Printer operation in progress | The command can be received during printing operation. |
| Error | The command can be received even if an error is occurring. |
| When the settings screen is displayed | The command cannot be received when the settings screen is displayed. |
| Unauthentication | Commands can be received even if authentication is not in progress using the [DC2+PS] command. |
Function
Returns the result of label pitch measurement by each label by request from host.
This command is not available for PW208.
Format
[DC2]PN
Format of return data (normal case)
[STX]a...a,bbb,cccccc[ETX]
Data sample)
[STX]10,203,002172[ETX]
| Parameter | Details | Valid range |
|---|---|---|
| a |
Total number of data in bytes * This is the total number of bytes from parameter b and beyond. The delimiter (comma ,) between parameters "a" and "b" and ETX are not counted. |
Size of data from b to before [ETX] |
| b | Head resolution |
203: 203 dpi 305: 305 dpi 609: 609 dpi |
| c | Label pitch size (dots) | A fixed 6-digit |
Return data format (when command error occurs)
[NAK]<15>16
Supplementary explanation
-
I-Mark and Gap needs to pass over the sensor twice in order to measure the length of label gap. See below for the conditions to detect:
- Feed 2 labels by running <IK>0 command more than 2 times.
- Press FEED key on the printer twice to feed 2 labels.
- 000000 (0x30, 0x30, 0x30, 0x30, 0x30, 0x30) is returned if the label pitch size for invalid sensor is not finalized for the 1st feed right after power on, right after head open/close and after sensor type switching.
- The label length to be returned includes the gap between labels.
- The label pitch size to be returned will show the value of last label that passes over the sensor. Therefore label will exist in between head and sensor with a short pitch label, and it may not be equal to the printed/ejected label's pitch size. The minimum label length would be 70 mm.
- This is available only when sensor is enabled. Returns "000000" when sensor is disabled.
- If there is a missing label in the roll in using gap sensor, the valid label length and the distance for the missing label are added together to be returned depending on sensor level.
- The label length detected by the printer includes around the same amount of tolerance as print precision.
- Print speed and print darkness gives little or no affect to the detected label length. However it may vary if you change print speed depending on the sensitivity of the sensor.
- Label length is measured once again at FEED when the sensor type is switched from LCD menu. When you send DC2+PN command the label length before switching is returned. Then, printer returns the unfinalized 0 dot in the first FEED, followed by the re-measured label length at the 2nd FEED. And label length may vary depending on the characteristic of the sensor.
Supplementary explanation: CL4-SXR/CL6-SXR
- 000000 (0x30, 0x30, 0x30, 0x30, 0x30, 0x30) is returned if the label pitch size for invalid sensor is not finalized for the 1st feed right after power on, while the head is open, right after head open/close and after sensor type switching.
Coding Example
Get label length by feeding 2 labels
| <A> | |
| <IK>0 | Feed 1st label |
| <Z> | |
| <A> | |
| <IK>0 | Feed 2nd label |
| <Z> | |
| Feed completed ←label length is finalized here | |
| DC2+PN | Request label length |
| Feeding necessary number of labels has been completed ←Label length is measured by each label and then finalized | |
| DC2+PN | Request for label length ←You can get the latest label length |
The correct label length is returned if you feed twice manually and request with DC2+PN after setting label, even without using <IK>0 command.