From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

define number of LF for FF

Hi,
i'm using a receipt printer to log errors on an endless paper. The width of the paper is 40 characters. An error message has about 5 lines.

After each error message i want to advance the sheet a few lines so that the operator can tear it off. SetPrintAttribute(ATTR_EJECT_AFTER,1) advances the paper too much. How can i advance the sheet only a few lines?

Between every line the printer leaves a line blank as if PrintTextBuffer("aa") prints 80 characters. How can i avoid these blank lines?

I'm using Measurement Studio 6.0 on WindowsXP.
In windows i installed the printer as an "generic text only printer"


Greetings, Urs
0 Kudos
Message 1 of 2
(2,485 Views)
Hi Urs,

Unfortunately this does not seem to be a common application. I was not able to find any specific information about using a printer like yours with LabWindows/CVI.

While I am not able to test them with such a printer, there are two attributes available with SetPrintAttribute that may be useful.

The ATTR_PRINT_AREA_HEIGHT attribute will allow you to set the vertical size of the page to be printed, and ATTR_PRINT_AREA_WIDTH will allow you to set the length of a line. Setting these to appropriate values should allow the other functions you mentioned to behave as you expect. That is, lines will be printed as 40 characters, and the SetPrintAttribute(ATTR_EJECT_AFTER,1) will only eject the paper an amount that makes sense for your ATTR_PRINT_AREA_HEIGHT setting.

Scott Y
NI
0 Kudos
Message 2 of 2
(2,459 Views)