0

we are using the CUSTOM VKP80III Printer. We want to send a command with the DirectIO Method of the PosCommon base clase. But I'm a little bit stumped on how to do that, in the command manual of the printer I found the following page:

VKP80III Commands Manual

What we want to is send n = 5 to eject the ticket. My question is, if the definition of our DirectIO() looks like this:

object DirectIO(int command, int data, object obj);

Which values do the different parameters need and can I send this all in one command or do I need to send multiple?

1
  • Presumably, one "Ejector command" corresponds to 4 byte-values that are all mapped to the int command, with the first two bytes constant, and the third/forth bytes according to the list. Check the documentation if it uses little or big endian byte order. data and obj should probably be zero/null. But this is just guesses, I have never used DirectIO. Commented Aug 21, 2023 at 12:04

2 Answers 2

0

The description of Used to communicate directly with the Service Object. in the description written on the DirectIO page you presented is for convenience only, and its implementation or non-implementation and specification details depend on the vendor.
Also, it communicates with the service object as written, and does not say that it communicates with the device (printer in case of question).

The underlying specifications are described in the UnifiedPOS specifications, which can be downloaded from here.
UNIFIEDPOS

Communicates directly with the UnifiedPOS Service.

This method provides a means for a UnifiedPOS Service to provide functionality to the application that is not otherwise supported by the standard UnifiedPOS Control for its device category. Depending upon the UnifiedPOS Service’s definition of the command, this method may be asynchronous or synchronous.

Use of this method will make an application non-portable. The application may, however, maintain portability by performing directIO calls within conditional code. This code may be based upon the value of the DeviceServiceDescription, PhysicalDeviceDescription, or PhysicalDeviceName property.

In addition, the ticket ejector ESC/POS command specification presented in the question is supported by the printer hardware and is not directly related to the POS for.NET software specification.

The POS for.NET or OPOS manual provided by the vendor should have a description of what functions the DirectIO method has, so please refer to that, or contact the vendor if there is no such description.

Sign up to request clarification or add additional context in comments.

Comments

0

After contacting the vendor we got the following answer:

To have the printer eject a ticket, you can send the Eject command by using DirectIO method and the 1D6505 command.

So we tried the following:

printer.DirectIO(0, 0, "1D6505");

But this didn't do anything. After some digging we found some sourcecode for the sample application where we found some code. After inspecting the code we found that we have to convert the Hex values to ASCII and use this as a parameter for the DirectIO method. In the end it looked like this:

string buffer = ConvertHex("1D6505", _logger);
printer.DirectIO(0, buffer.Length, buffer);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.