CITIZEN OPOS DRIVER 1.8 Application Development Guide '07/07/26 Ver1.
CITIZEN OPOS DRIVER 1.8 Application Development Guide Revision Record Date 07/07/26 2 Version V1.
CITIZEN OPOS DRIVER 1.8 Application Development Guide Notes 1. Unauthorized use of all or any part of this document is prohibited. 2. The information in this document is subject to change without prior notice. 3. This document has been created with full attention. If, however, you find an error or question, please contact us. 4. We shall not be liable for any effect resulting from operation regardless of the above item 3. 5.
CITIZEN OPOS DRIVER 1.8 Application Development Guide 1. INTRODUCTION ........................................................................................................................................... 6 1.2. CITIZEN OPOS DRIVER ..............................................................................................................................6 1.3. OPERATING ENVIRONMENT .......................................................................................................................
CITIZEN OPOS DRIVER 1.8 Application Development Guide 3.3. CASH DRAWER SERVICE OBJECT AND PROPERTY RELATIONS....................................................................53 CBM-1000TypeII ...........................................................................................................................................53 CT-S300/CT-S310..........................................................................................................................................54 CT-S2000..........
CITIZEN OPOS DRIVER 1.8 Application Development Guide 1. Introduction The OPOS Driver complies with OPOS1.8. This document provides the explanation of device (POS printer)-dependent specifications and precautions. When you want to develop applications by using this driver, refer to “OpenPOS for OLE Application Programmer’s Guide, Japanese Edition, Version 1.8” beforehand. Reference link (as of July 17, 2007) https://www.microsoft.com/japan/business/industry/retail/opos/download.mspx 1.2.
CITIZEN OPOS DRIVER 1.8 Application Development Guide 1.4. Application Developer Application developer who wants to use this driver must be familiar with the following items. ・ OPOS1.8 specifications ・ General characteristics of CITIZEN POS printer ・ Terms and structure of ActiveX control and OLE automation ・ ActiveX control container development environment such as Microsoft Visual Basic and Microsoft Visual C++, etc. 1.5.
CITIZEN OPOS DRIVER 1.8 Application Development Guide Service Object (SO) Service Object is called by Control Object and executes the function specified by OPOS for each device. It is implemented as automation server and provides the set of methods called by CO. This driver provides the processing dependent on the CITIZEN POS printer and cash drawer connected to the printer. 1.6.
CITIZEN OPOS DRIVER 1.8 Application Development Guide [HKEY_LOCAL_MACHINE\SOFTWARE\OLEforRetail\ServiceOPOS\POSPrinter] @="" "PRN001"="CT-S2000_1" [HKEY_LOCAL_MACHINE\SOFTWARE\OLEforRetail\ServiceOPOS\POSPrinter\CT-S2000_1] @="CBM.Thermal.POSPrinter" "PhysicalDeviceID"="CITIZENCT-S2000" "Version"="1008009" "WriteTimeout"="5000" "Pin3"="001" "StatusBackInterval"="200" "Service"="C:\\Program Files\\CITIZEN\\CITIZEN Service Objects\\CBMTSO.
CITIZEN OPOS DRIVER 1.8 Application Development Guide 1.7. CITIZEN OPOS Driver Precautions ・ If the printer power is turned off/on while connection to the printer is being established, acquiring status of printer or cash drawer may become unsuccessful. In this case, close SO once and then open SO again. ・ Though cash drawer SO can be opened singly without opening the corresponding printer SO, opening/closing the corresponding printer SO thereafter impossibility in acquiring cash drawer status may result.
CITIZEN OPOS DRIVER 1.8 Application Development Guide 2. CITIZEN OPOS Printer Service Object For the details, method of use, etc. of property, method and event, refer to “OpenPOS for OLE Application Programmer's Guide, Japanese Edition, Version 1.8”. 2.2. POS Printer Service Object and Method Relations CBM-1000TypeII Method Open Close ClaimDevice { { Notes on Serial I/F connection (Refer to RotatePrint in 2.6 POS Printer Service Object and Precautions.
CITIZEN OPOS DRIVER 1.8 Application Development Guide CT-S300/CT-S310 Method Open Close ClaimDevice { { Notes on Serial I/F connection (Refer to ClaimDevice in 2.6. POS Printer Service Object and Precautions.) 7 ReleaseDevice CheckHealth ClearInput ClearOutput Supporting status (CT-S300_*/CT-S310_*) Notes { { OPOS_CH_EXTERNAL Only (self diagnostic printing) is supported. Not applicable with OPOSPrinter Data being transmitted cannot be stopped.
CITIZEN OPOS DRIVER 1.8 Application Development Guide CT-S2000 Method Open Close ClaimDevice { { Notes on Serial I/F connection (Refer to ClaimDevice in 2.6. POS Printer Service Object and Precautions.) 8 ReleaseDevice CheckHealth ClearInput ClearOutput Supporting status (CT-S200_*) Notes { { OPOS_CH_EXTERNAL Only (self diagnostic printing) is supported. Not applicable with OPOSPrinter Data being transmitted cannot be stopped. U OPOS_CH_EXTERNAL × Not applied because no input device is used.
CITIZEN OPOS DRIVER 1.8 Application Development Guide CT-S4000 Method Open Close ClaimDevice { { Notes on Serial I/F connection (Refer to ClaimDevice in 2.6. POS Printer Service Object and Precautions.) 9 ReleaseDevice CheckHealth ClearInput ClearOutput Supporting status (CT-S4000_*) Notes { { OPOS_CH_EXTERNAL Only (self diagnostic printing) is supported. Not applicable with OPOSPrinter Data being transmitted cannot be stopped. U OPOS_CH_EXTERNAL × Not applied because no input device is used.
CITIZEN OPOS DRIVER 1.8 Application Development Guide CD-S500 Method Open Close ClaimDevice { { Notes on Serial I/F connection (Refer to ClaimDevice in 2.6. POS Printer Service Object and Precautions.) 9 ReleaseDevice CheckHealth ClearInput ClearOutput Supporting status (CD-S500_*) Notes { { OPOS_CH_EXTERNAL Only (self diagnostic printing) is supported. Not applicable with OPOSPrinter Data being transmitted cannot be stopped. U OPOS_CH_EXTERNAL × Not applied because no input device is used.
CITIZEN OPOS DRIVER 1.8 Application Development Guide 2.3.
CITIZEN OPOS DRIVER 1.
CITIZEN OPOS DRIVER 1.
CITIZEN OPOS DRIVER 1.8 Application Development Guide Property RecLineChars RecLineCharsList RecLineHeight RecLineSpacing Notes The Font size is changed depending on the set value. Select the value from RecLineCharsList property. (Refer to RecLineChars/ RecLineCharsLis Property in 2.6 POS Printer Service Object and Precautions.) (Refer to RecLineChars/ RecLineCharsLis Property in 2.6 POS Printer Service Object and Precautions.) 1 The value is changed according to the RecLineChars property.
CITIZEN OPOS DRIVER 1.
CITIZEN OPOS DRIVER 1.
CITIZEN OPOS DRIVER 1.
CITIZEN OPOS DRIVER 1.8 Application Development Guide Property JrnCurrentCartridge RecLineChars Notes According to the value, the Font size is changed. Value should be chosen from RecLineCharsList property. (Refer to RecLineChars/ RecLineCharsLis Property in 2.6 POS Printer Service Object and Precautions.) (Refer to RecLineChars/ RecLineCharsLis Property in 2.6 POS Printer Service Object and Precautions.
CITIZEN OPOS DRIVER 1.
CITIZEN OPOS DRIVER 1.
CITIZEN OPOS DRIVER 1.
CITIZEN OPOS DRIVER 1.8 Application Development Guide Property RecLineChars Notes According to the value, the Font size is changed. Value should be chosen from RecLineCharsList property. (Refer to RecLineChars/ RecLineCharsLis Property in 2.6 POS Printer Service Object and Precautions.) (Refer to RecLineChars/ RecLineCharsLis Property in 2.6 POS Printer Service Object and Precautions.
CITIZEN OPOS DRIVER 1.
CITIZEN OPOS DRIVER 1.
CITIZEN OPOS DRIVER 1.
CITIZEN OPOS DRIVER 1.8 Application Development Guide Property Notes RecLineCharsList RecLineHeight RecLineSpacing (Refer to RecLineChars/ RecLineCharsLis Property in 2.6 POS Printer Service Object and Precautions.) 1 The value is changed according to the RecLineChars property. If the value is smaller than RecLineHeight, the value is changed according to the RecLineHeight property. RecLineWidth RecLetterQuality RecEmpty RecNearEnd RecSidewaysMaxLines (Refer to RecEmpty Property in 2.
CITIZEN OPOS DRIVER 1.
CITIZEN OPOS DRIVER 1.
CITIZEN OPOS DRIVER 1.
CITIZEN OPOS DRIVER 1.8 Application Development Guide Property RecLineChars Notes According to the value, the Font size is changed. Value should be chosen from RecLineCharsList property. (Refer to RecLineChars/ RecLineCharsLis Property in 2.6 POS Printer Service Object and Precautions.) (Refer to RecLineChars/ RecLineCharsLis Property in 2.6 POS Printer Service Object and Precautions.
CITIZEN OPOS DRIVER 1.8 Application Development Guide 2.4. POS Printer Service Object and OPOS Escape Sequence Relations CBM-1000TypeII Escape Sequence Notes Paper cut ESC|#P { Feed and paper cut ESC|#fP { Feed, cut, and stamp print Bitmap print ESC|#sP ESC|#B After Bitmap printing, print position returns to the initial state (leftjustified). (Refer to SetBitmap Method/ESC|#B Escape Sequence in 2.6 POS Printer Service Object and Precautions.
CITIZEN OPOS DRIVER 1.8 Application Development Guide CT-S3000/CT-S310 Escape Sequence Paper cut Feed and paper cut Feed, cut, and stamp print Bitmap print Supporting status (CT-S300_*/CT-S310_*) Notes ESC|#P ESC|#fP ESC|#sP ESC|#B After Bitmap printing, print position returns to the initial state (leftjustified). (Refer to SetBitmap Method/ESC|#B Escape Sequence in 2.6 POS Printer Service Object and Precautions.
CITIZEN OPOS DRIVER 1.8 Application Development Guide CT-S2000 Escape Sequence Paper cut Feed and paper cut Feed, cut, and stamp print Bitmap print Supporting status (CT-S2000_*) Notes ESC|#P ESC|#fP ESC|#sP ESC|#B After Bitmap printing, print position returns to the initial state (leftjustified). (Refer to SetBitmap Method/ESC|#B Escape Sequence in 2.6 POS Printer Service Object and Precautions.
CITIZEN OPOS DRIVER 1.8 Application Development Guide CT-S4000 Escape Sequence Paper cut Feed and paper cut Feed, cut, and stamp print Bitmap print Supporting status (CT-S4000_*) Notes ESC|#P ESC|#fP ESC|#sP ESC|#B After Bitmap printing, print position returns to the initial state (leftjustified). (Refer to SetBitmap Method/ESC|#B Escape Sequence in 2.6 POS Printer Service Object and Precautions.
CITIZEN OPOS DRIVER 1.8 Application Development Guide CD-S500 Escape Sequence Supporting status (CD-S500_*) Notes ESC|#P ESC|#fP ESC|#sP ESC|#B After Bitmap printing, print position returns to the initial state (leftjustified). (Refer to SetBitmap Method/ESC|#B Escape Sequence in 2.6 POS Printer Service Object and Precautions.) ESC|tL ESC|bL ESC|sL ESC|#lF ESC|#uF ESC|#rF ESC|#fT ESC|bC ESC|#u C ESC|iC ESC|#rC Effective only when dedicated 2color paper is used.
CITIZEN OPOS DRIVER 1.8 Application Development Guide 2.5. POS Printer Service Object and Event Relations CBM-1000TypeII Event Notes DataEvent DirectIOEvent ErrorEvent OutputCompleteEvent Not applicable with OPOSPrinter (Refer to OutPutID property/ OutputCompleteEvent event in 2.6 POS Printer Service Object and Precautions.) 2 ResetStatistics RetrieveStatistics UpdateStatistics StatusUpdateEvent (Refer to 1.7. CITIZEN OPOS Driver Precautions.
CITIZEN OPOS DRIVER 1.8 Application Development Guide CT-S4000 Event Notes DataEvent DirectIOEvent ErrorEvent OutputCompleteEvent Not applicable with OPOSPrinter (Refer to OutPutID property/ OutputCompleteEvent event in 2.6 POS Printer Service Object and Precautions.) 2 ResetStatistics RetrieveStatistics UpdateStatistics StatusUpdateEvent (Refer to 1.7. CITIZEN OPOS Driver Precautions.
CITIZEN OPOS DRIVER 1.8 Application Development Guide 2.6. POS Printer Service Object and Precautions ClaimDevice Method No identical serial port (COM*) specified by the Windows driver is not usable in the connection of serial interface. When this method is executed in this connection, “OPOS_E_TIMEOUT” is returned.
CITIZEN OPOS DRIVER 1.8 Application Development Guide SetBitmap Method/ESC|#B Escape Sequence Bitmap is registered by specifying Bitmap number (1 - 20) using the SetBitmap method and bitmap printing is carried out by specifying the registered number in the ESC|#B escape sequence. This driver has two modes, raster bit image mode and NV bit image mode. Specification of each mode is as shown below. ・ Raster bit image mode SO stores own bitmap using the SetBitmap method.
CITIZEN OPOS DRIVER 1.8 Application Development Guide AsyncMode Property ・ TRUE Output method (PrintNormal, PrintTwoNormal, CutPaper, RotatePrint, PrintBarCode, and PrintBitmap) is executed asynchronously. ・ FALSE Output method is printed synchronously. When error occurs at the asynchronous output, error event is reported at about 0.5-s intervals. ErrorLevel Property ・ PTR_EL_NONE Indicated when error is not detected. ・ PTR_EL_RECOVERABLE Indicated as Recoverable error at Paper Out/Cover Open.
CITIZEN OPOS DRIVER 1.8 Application Development Guide + + + + + + + + Chr$(&H33) + Chr$(&H33) _ Chr$(&H30) + Chr$(&H3D) _ Chr$(&H30) + Chr$(&H3A) _ Chr$(&H34) + Chr$(&H31) _ Chr$(&H34) + Chr$(&H32) _ Chr$(&H34) + Chr$(&H33) _ Chr$(&H30) + Chr$(&H3D) _ Chr$(&H30) + Chr$(&H3A) result = OPOSPrinter.PrintNormal(PrintStation, pString) ・ OPOS_BC_DECIMAL Each byte is converted to three characters. Val (String) is used by three characters each in order to convert ASCII to binary.
CITIZEN OPOS DRIVER 1.8 Application Development Guide OutPutID Property/ OutputCompleteEvent Event Identifier of asynchronous output started just before is retained and incremented by +1 with the following output. Dim i as Integer Dim Result As Long Dim PrintStation As Long For i = 0 to 10 DoEvents Result = OPOSPrinter.
CITIZEN OPOS DRIVER 1.8 Application Development Guide RecLineChars/ RecLineCharsList Property The number of one-byte characters of the font printed in one line on the paper is specified. ・ RecLineChars property: Specifies the maximum number of digits of FontA corresponding to the specified paper size. ・ RecLineCharsList property: Lists the maximum number of digits of FontA, FontB, FontC corresponding to the specified paper size. (Some printer has no FontC.
CITIZEN OPOS DRIVER 1.
CITIZEN OPOS DRIVER 1.8 Application Development Guide RecSidewaysMaxChars Property Calculated based on one-byte character. Kanji font (KANJI) is basically treated as two characters but some font selected by the value of the RecLineChars property may not correspond to two characters simply. RecSidewaysMaxLines Property Varies in conjunction with the value of the RecLineSpacing property and RecLineChars property.
CITIZEN OPOS DRIVER 1.8 Application Development Guide 3. Cash Drawer Service Object For the details, method of use, etc. of property, method and event, refer to “OpenPOS for OLE Application Programmer's Guide, Japanese Edition, Version 1.8”. 3.2. Cash Drawer Service and Object Method Relations CBM-1000TypeII Method Open Close ClaimDevice ReleaseDevice CheckHealth ClearInput ClearOutput DirectIO OpenDrawer WaitForDrawerClose Notes Not applicable with OPOSDrawer. Not applicable with OPOSDrawer.
CITIZEN OPOS DRIVER 1.8 Application Development Guide CT-S4000 Method Open Close ClaimDevice ReleaseDevice CheckHealth ClearInput ClearOutput DirectIO OpenDrawer WaitForDrawerClose Notes Not applicable with OPOSDrawer. Not applicable with OPOSDrawer. Supporting status (CT-S4000_*.CD*) { { { { { OPOS_CH_EXTERNAL × × × Not supported { { CD-S500 Method Open Close ClaimDevice ReleaseDevice CheckHealth ClearInput ClearOutput DirectIO OpenDrawer WaitForDrawerClose 52 Notes Not applicable with OPOSDrawer.
CITIZEN OPOS DRIVER 1.8 Application Development Guide 3.3. Cash Drawer Service Object and Property Relations CBM-1000TypeII Property AutoDisable BinaryConversion CapStatisticsReporting CapUpdateStatistics CapPowerReporting Notes Not applicable with OPOSDrawer. Not applicable with OPOSDrawer. Hardware not supported Hardware not supported (Refer to CapPowerReporting/ Powermotify/ PowerState Property in 3.5 Cash Drawer Service Object and Precaution.
CITIZEN OPOS DRIVER 1.8 Application Development Guide CT-S300/CT-S310 Property AutoDisable BinaryConversion CapStatisticsReporting CapUpdateStatistics CapPowerReporting Notes Not applicable with OPOSDrawer. Not applicable with OPOSDrawer. Hardware not supported Hardware not supported (Refer to CapPowerReporting/ Powermotify/ PowerState Property in 3.5 Cash Drawer Service Object and Precaution.
CITIZEN OPOS DRIVER 1.8 Application Development Guide CT-S2000 Property AutoDisable BinaryConversion CapStatisticsReporting CapUpdateStatistics CapPowerReporting Notes Not applicable with OPOSDrawer. Not applicable with OPOSDrawer. Hardware not supported Hardware not supported (Refer to CapPowerReporting/ Powermotify/ PowerState Property in 3.5 Cash Drawer Service Object and Precaution.
CITIZEN OPOS DRIVER 1.8 Application Development Guide CT-S4000 Property AutoDisable BinaryConversion CapStatisticsReporting CapUpdateStatistics CapPowerReporting Notes Not applicable with OPOSDrawer. Not applicable with OPOSDrawer. Hardware not supported Hardware not supported (Refer to CapPowerReporting/ Powermotify/ PowerState Property in 3.5 Cash Drawer Service Object and Precaution.
CITIZEN OPOS DRIVER 1.8 Application Development Guide CD-S500 Property AutoDisable BinaryConversion CapStatisticsReporting CapUpdateStatistics CapPowerReporting Notes Not applicable with OPOSDrawer. Not applicable with OPOSDrawer. Hardware not supported Hardware not supported (Refer to CapPowerReporting/ Powermotify/ PowerState Property in 3.5 Cash Drawer Service Object and Precaution.
CITIZEN OPOS DRIVER 1.8 Application Development Guide 3.4. Cash Drawer Service Object and Event Relations CBM-1000TypeII Event DataEvent DirectIOEvent ErrorEvent OutputCompleteEvent StatusUpdateEvent Notes Not applicable with OPOSDrawer. Not applicable with OPOSDrawer. Not applicable with OPOSDrawer. If the corresponding printer SO is closed, status cannot be acquired. (Refer to 1.7. CITIZEN OPOS Driver Precautions.)) × × × × { Not Not Not Not Supporting status (CBM1000TYPEII_*.
CITIZEN OPOS DRIVER 1.8 Application Development Guide CD-S500 Event DataEvent DirectIOEvent ErrorEvent OutputCompleteEvent StatusUpdateEvent Notes Not applicable with OPOSDrawer. Not applicable with OPOSDrawer. Not applicable with OPOSDrawer. If the corresponding printer SO is closed, status cannot be acquired. (Refer to 1.7. CITIZEN OPOS Driver Precautions.)) × × × × { Not Not Not Not Supporting status (CD-S500_*.
CITIZEN OPOS DRIVER 1.8 Application Development Guide 3.5. Cash Drawer Service Object and Precautions CapPowerReporting/ Powermotify/ PowerState Property This service object supports only cash drawer connected to the drawer kick connector at the back of the printer. Therefore the value of the CapPowerReporting property shall be “OPOS_PR_NONE”. By setting the Powernotify property to “OPOS_PN_ENABLED”, the power state can be acquired with the PowerState property.
CITIZEN OPOS DRIVER 1.8 Application Development Guide CITIZEN OPOS DRIVER 1.8 Application Development Guide '07/07/26 Ver1.00 CITIZEN SYSTEMS JAPAN CO., LTD.