1. STEVE ALDWIN ROSARIO
  2. PowerBuilder
  3. Thursday, 8 June 2023 01:13 AM UTC

Hello,

Good morning.

Maybe someone has experience regarding our PB program issue.

Background: We have a program that will print Barcode using the COM1 Port. However, the end-user has now changed her unit from Desktop to Laptop, the New Barcode (Sato CL4NX Plus) is connected thru USB001 port. Due to the changes, the program will not Print anymore.

Below is the initialization found on the program .Ini file:

[BARCODE]
Port=COM1           --> (Now, we changed this to USB001 but still will not print)
Horizontal=0350
Barcenter=0455
CenterBarcodeFromExcel=0620
FourthLineBarcodeFromExcel=0330
VerticalStartBarcodeFromExcel=0100

 

Function Codes:

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// function: of_printbarcode
// purpose: PRINT BARCODE
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

String ls_port, ls_horizontal, ls_vertical,ls_MySQL,ls_Barcenter
long ll_nobprint,ll_printctr,LenClassName,ll_Space,ll_Space1,ll_barspace

ll_nobprint =1
ls_port = ProfileString(gnv_app.of_getappinifile(), "BARCODE","Port", "")
ls_horizontal = ProfileString(gnv_app.of_getappinifile(), "BARCODE","Horizontal", "")
ls_Barcenter = ProfileString(gnv_app.of_getappinifile(), "BARCODE","Barcenter", "")
ole_1.object.Open( ls_port +':', 'baud=9600 parity=N data=8 stop=1' )

ole_1.object.WriteString(ESC+"A")
ole_1.object.WriteString(ESC+"#E3")
ole_1.object.WriteString(ESC+"Z")

ole_1.object.WriteString(ESC+"A")
ole_1.object.WriteString(ESC+"A3H0340V0001")

LenClassName = LEN(as_classname)
ll_Space1 = 26 - LenClassName
ll_Space = ll_Space1 - (ll_Space1/2)
If ll_Space < 1 Then ll_Space = 0

 

//PRINT
ole_1.object.WriteString(ESC+"H" + ls_horizontal + ESC+ "V0060" + ESC+"L0201" +ESC+"S"+ Space(ll_Space) + as_classname )

//PRINT BAR
ole_1.object.WriteString(ESC+"H"+ string(ll_barspace,'0000') + ESC+"V0180" +ESC+ "BT101020102" +ESC+ "BW02080*"+ as_assetno +"*")

ole_1.Object.WriteString('E')
ole_1.Object.Close()

 

 

Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 8 June 2023 12:47 PM UTC
  2. PowerBuilder
  3. # 1

I found the API documentation:

https://d2n1rly8br52rx.cloudfront.net/resources/files/UM_SATOPrinterAPI_EN.pdf

It does support USB.

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 8 June 2023 06:37 AM UTC
  2. PowerBuilder
  3. # 2

Hi,

You can't simply change a port and expect USB to work the same way as COM.

Please check the documentation of whatever you have in your OLE_1 object.

regards

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.