DEVICE DRIVERS |
---|
Links on this Page Overview Standard Format Commands Raw Output Formatting |
Overview |
The range of devices to which SELLmatix POS can output data is almost infinite. Almost all of these devices have different capabilities, and even where the devices have the same capabilities, they are often controlled using different commands. If SELLmatix POS tried to directly control devices in the "SELLmatix POS.cfg" file, almost the entire file would need to be changed for each different device. Instead, the "SELLmatix pos.cfg" file contains format commands which begin with a '<' symbol, and end with a '>' symbol. These format commands provide "hints" to the output routines about the type of feature desired, in a similar way to which HTML code provides "hints" to a Web Browser such as Internet Explorer or Netscape about how to display a web page. There are two entirely different approaches to controlling output devices which SELLmatix POS can use. The first of these is to provide raw output to the device with control characters. The second method can be used with printers which have a Windows printer driver available. As a general rule, if you are able to use a Windows printer driver, it is a good idea to do so. Interfacing to such devices is already done for you through the Windows driver, and often there are more features available using this driver than you could easily implement using raw output. One exception is with serial printers with a communication speed of 19200 baud or lower. With such devices, the overhead of the windows printer driver may cause the device to be unacceptably slow, particularly if graphics are used. With other devices such as Cash Drawers, Pole Displays, or printers for which no Windows Driver is available, there is no option but to use raw output to the device. On the other hand, if you are using a network printer connected to another machine over a LAN, or a device connected to a USB port, then you will need to use a Windows printer driver. |
Standard Format Commands |
<BEEP> CommandThe <BEEP> command sounds the buzzer on the device.
<BR> CommandAfter executing the <BR> output continues on the next line of the device starting from the left hand column. Normally this command performs a carriage return/line feed combination.
<B> and </B> CommandsThe <B> and </B> Commands turn bold print on and off respectively.
<HALFCUT> CommandThis command performs a partial paper cut on the device at the current printing position.<FULLCUT> CommandThis command performs a full paper cut on the device at the current printing position.<I> and </I> CommandsThe <I> and </I> Commands turn inverted (upside down) print on and off respectively.
<U> and </U> CommandsThe <U> and </U> Commands turn underlined print on and off respectively.
<CENTER> and </CENTER> CommandsAfter executing The <CENTER> command, text output will be centered horizontally on the paper. This command can be cancelled by a <LEFT> command , a <RIGHT> command or an </CENTER> command.
<RIGHT> and </RIGHT> CommandsAfter executing The <RIGHT> command, text output will be right aligned horizontally on the paper. This command can be cancelled by a <LEFT> command , a <CENTER> command or an </RIGHT> command.
<RESET> CommandThis command restores the device to power on defaults. |
Raw Output Formatting |
Devices which use Raw Output Formatting are normally controlled via a serial or parallel port, and have a "Filter=" entry in the device section of the "SELLmatix pos.cfg" file. The filter is the name of a file which normally resides in the drivers subdirectory where the SELLmatix POS programs are installed. By default this is C:\Program Files\himatix\SELLmatix\POS\drivers These files usually have a .drv file extension, however they are text files which can be edited using Notepad. Excerpts from an example driver file are as follows:-
When SELLmatix POS encounters a formatting command such as <INVERT> or <RED> which begins with a '<' symbol and ends with a '>' symbol, it looks for this command in the appropriate driver file and replaces this code with the associated string which appears after the equals sign. If the code enclosed in '<' and '>' symbols is not found in the driver file, then this code is removed from the output which SELLmatix POS sends to the device. Hence, SELLmatix POS ignores codes it is unable to handle, in the same way that a HTML browser like Internet Explorer or Firefox ignores HTML tags which they are not aware of. It is possible to create any new formatting code that you may wish by creating the code, and including a corresponding code in the driver file that handles this feature. You should however avoid using the <BR>, <CENTER>, </CENTER>, <RIGHT> and </RIGHT> symbols, because these are used by SELLmatix POS to control horizontal positioning on the device, and SELLmatix POS will try to perform these functions if possible by calculating the printable width on the paper, even if the device does not directly support these features. The codes following the equals sign in the driver file, are intended to be a backslash character '\' followed by a 3 digit decimal representation of the ASCII control code which the device requires to perform that function. These codes can normally be found in the technical reference manual for the particular device. It is possible to put these decimal control codes directly into the output strings in the "SELLmatix pos.cfg" file, however this should be avoided, because it will cause unpredictable results on devices that do not handle these control codes in the same manner. It also makes use of other devices much more difficult. If you are creating a new driver file for a new device, we would suggest that you copy an existing driver file and make modifications as required. Wherever possible, please use the same names as are used in existing driver files for the same feature. Saving a new driver file in the same location as the other drivers shipped with SELLmatix POS will mean that this driver will be able to be selected in the appropriate drop down list selections on the Tools Menu of SELLmatix POS. If you create a new driver for a device that may be useful for others, we would appreciate you sending a copy via email, so that it can be made available for download, or included with other drivers in later releases of SELLmatix POS. |