rdbailey
17th October 2002, 23:23
I have created a session that creates destination address labels for cases. The script runs very fast on the screen and exports to the printer very quickly. I use the spool.pr.copies variable to identify the required number of labels.

The problem: the label printer pauses for almost 1 second between each label. For everything else (including same application written in a package outside Baan), the printer streams the output at top speed (lookup is VERY slow outside Baan - can't use index).

I also tried a "for" loop instead of the spool.pr.copies variable - to no avail.

If anyone has any suggestions it would be appreciated.

Information
---------------
Printer = Citizen CLP-7002 (thermal transfer bar code printer)
OS = NT
Baan IV c3

rupertb
17th October 2002, 23:59
This is an easy one to solve :) You are spooling all the label information for each label over and over, i.e. once per label. Most applications use the built in increment/decrement function in the printer and of course the number of copies required. In our datamaxes the commands are



\0002Qxxx where xxx is the number of labels required

1100000010001009999
-001 <-- means decrement previous field by 001 for each label printed



Good Luck!
Rupert

rdbailey
18th October 2002, 00:05
Hi Rupert,

At first I thought it was easy too, but I can't find the code to send for the printer in question (the manual has no command codes at all!!).

We are using a Citizen CLP-7002. I actually thought the spool.pr.copies would do what you are talking about with the printer driver through windows; but as you can see it doesn't seem to be doing the trick. We are using the Seagull driver (as it seems to be the only one available) which has little (actually zero) documentation regarding command codes as well.

Do you happen to know a generic command code for number of copies? I will try the datamax code (it is thermal bar code printer as well isn't it?) to see if that gets me closer. Thank you.

rupertb
18th October 2002, 09:19
I've attached the programmers manual for the datamax I-4208, from what I've read on the net the CLP-7002 supports the datamax command set, we might be on the right path. Are you using BWprint? We don't - we format and spool the label direct to the print queue. If the datamax command set doesn't work you can use your other label printing software spool the output to a file and octal dump it then you'll be able to extract character by character the commands sent to the printer.

Regards,
Rupert

rupertb
18th October 2002, 09:26
Sorry the manual didn't attach properly, it's obviously to big at 2.5Mb. Can I mail it to you?

rupertb
21st October 2002, 17:49
I've been having some problems with sending email, have you received the pdf file?

Regards,
Rupert

rdbailey
24th October 2002, 16:10
Hi,

I did get the email, thank you. I have been trying out the codes, but I think I am doing something wrong. I set it up as a report for the label designs and am passing the codes into the detail line (which is just a tcmcs.str50 field). It is printing the actual text of the code instead of taking it as a printer code. I used the standard 'C' formatting using '\002' as STX etc..., but I think I should be using the ascii character set instead of \002.

i.e. chr(002) for STX.

I will give this a try and let you know how it works out.

Thanks again.


Sincerely,

rdbailey
5th November 2002, 00:49
I hope you can help me with this one.

I actually found a command reference guide for our printer :). I have created a label-printing session that outputs to a thermal label-printer (citizen). I have put in all the control codes for label design, but the Baan spooler seems to be stripping out the main control identifiers STX (ascii 02) and SOH (ascii 01) from every string that I send. All the data goes through except the STX and SOH, so I just get the data strings being printed (but not formated).

I have included code snippets of a very simplified type of code to break down exactly what I am trying to accomplish. Any ideas would be greatly appreciated.

The function "fire.it.out.new" is as follows:

function fire.it.out.new(domain tcmcs.str300m value.to.print)
{
spool.id = spooler.detail
spool.pr.line = value.to.print
spool.line()
}

STX has been set to CHR$(02) and SOH is CHR$(01). The main label code snippet is as follows:

.
.
.
printer.output = ""
printer.output = printer.output & STX
printer.output = printer.output & "n"
printer.output = printer.output & STX
printer.output = printer.output & "M0514"
printer.output = printer.output & STX
printer.output = printer.output & "O0220"
printer.output = printer.output & STX
printer.output = printer.output & "V0"
printer.output = printer.output & STX
printer.output = printer.output & "f290"
printer.output = printer.output & STX
printer.output = printer.output & "SK"
printer.output = printer.output & STX
printer.output = printer.output & "d"
printer.output = printer.output & SOH
printer.output = printer.output & "D"
fire.it.out.new(printer.output)

| Label Formating Start
printer.output = ""
printer.output = printer.output & STX
printer.output = printer.output & "L"
fire.it.out.new(printer.output)

printer.output = ""
printer.output = printer.output & "D11"
fire.it.out.new(printer.output)
printer.output = ""
printer.output = printer.output & "PK"
fire.it.out.new(printer.output)
printer.output = ""
printer.output = printer.output & "pK"
fire.it.out.new(printer.output)
printer.output = ""
printer.output = printer.output & "sK"
fire.it.out.new(printer.output)
printer.output = ""
printer.output = printer.output & "A1"
fire.it.out.new(printer.output)

|-------------------------------------------------------------
| Label Data
|-------------------------------------------------------------
Row = "0225"
Column = "0006"
printer.output = ""
printer.output = printer.output & Rotate
printer.output = printer.output & Font
printer.output = printer.output & Hexp
printer.output = printer.output & VExp
printer.output = printer.output & PointSize4
printer.output = printer.output & Row
printer.output = printer.output & Column
printer.output = printer.output & "Order # "
printer.output = printer.output & str$(sales.order)
fire.it.out.new(printer.output)

| Form Feed
printer.output = ""
printer.output = printer.output & STX
printer.output = printer.output & "F"
fire.it.out.new(printer.output)

printer.output = ""
printer.output = printer.output & "Q0003"
fire.it.out.new(printer.output)

|--------------------------------------------------------
| Label Formating End
|--------------------------------------------------------
printer.output = ""
printer.output = printer.output & "E"
fire.it.out.new(printer.output)

printer.output = ""
printer.output = printer.output & STX
printer.output = printer.output & "qC"
fire.it.out.new(printer.output)
.
.
.

The resulting label would look like the following:

nM0514O0220V0f290SKdD
L
D11
PK
pK
sK
A1
1911C3002250006Order # 1
F
Q0003
E
qC
:(

rupertb
5th November 2002, 13:20
Hi,

Are you using the seagull driver or some other form of driver? I don't know exactly how they work but I assume they've been written in such a way that they convert the baan report into the necessary control strings. Are you sure they don't include the option of repeating labels and field increment/decrement functions?

Amyway this driver could be causing your problem. Let's look at your printer setup on NT, which driver are you using for your barcode printers?. If you want to spool control characters from baan to the printer you need a 'pass-through' mechanism (driver) defined on NT. NT should not manipulate your print strings in any way. Attached I've included a copy of our device data and a copy of the 'barcode' driver. The report (not included) does the actual label formatting.

Try defining the printer on NT as a generic/text only printer and then spool your new report.

Regards,
Rupert

rdbailey
5th November 2002, 16:00
Hi Rupertb,

We are using the Seagull driver as you have suspected. This works marvelously when I use the same type of utility written in VB or VC (but the SQL requests are super-slow - which is why I re-designed it in Baan tools). I will try re-installing the printer as generic as you have suggested.

While looking at your barcode setup document, I noticed you have a device type called "Direct". We do not have this option. Our available options are "Append to File", "Rewrite File", "Screen" and "Windows Printer". Is the "Direct" option part of Baan IVc4 or later, or perhaps it is an option for unix systems?

Anyway, I'll try the "Generic" printer idea and let you know.

Thanks again for all your help!

overtrim
20th May 2003, 15:40
Did anyone arrive at a resolution. I have just started working with the Datamax and can not get the STX and SOH codes to pass through.

rupertb
20th May 2003, 16:03
Hi overtrim, if you'll please fill out your details - specifically your baan version/platform first then I'll know how to best guide you.

Regards,
Rupert

overtrim
20th May 2003, 16:14
I am sorry about that. We are running BaaN 4c4 on HP-UX with an Oracle database. I have tried both the BRP function and the same code as Ron Bailey above. Neither works.

Thanks,
Roger Smith
ADTRAN, Inc.

rupertb
21st May 2003, 12:51
Hi Overtrim
Thanks for updating your profile - Right you're on Unix that makes it simpler for me to explain:

See the attached word document...
Set up a device using the attached barcode 'driver'
The driver should be the attached unix file saved in the directory
$BSE/lib/printinf/b
As you can see on my report layout the driver has already placed the device in label mode <STX>L
My report spools each line with the appropriate info to the device.
Line 1 sets the number of labels to print "QFFFF" where FFFF is a form field in Baan thats spools the desired number of labels. It's much quicker to do it this way then to use repetitive 'brp.ready' or 'rprt_send()' calls - the assumption made is that the labels are identical except for a count increment/decrement field.
Lines 12/14 control the increment by 1 function for the previous field respectively.
The last line on your report must be the letter "E" followed by a <CR> this terminates label mode and starts the print job in the device.

Do you have the datamax programmers manual if not I'll mail it to you?

If this doesn't make sense I'll try explaining it again - Best of luck
Rupert

overtrim
21st May 2003, 21:39
Thanks for the file. We are working with it now.

I also found that it is possible to use an alternate set of codes. From the printer menu goto communications/host settings and change to one of the alternate sets.

1. hex 5E (^) = SOH
hex 7e (~) = STX

Roger Smith
ADTRAN, Inc