Home › Forums › HTBasic Forum › HTBasic Printer Error
- This topic has 7 replies, 2 voices, and was last updated 1 year, 3 months ago by RalphW.
-
AuthorPosts
-
August 16, 2023 at 12:18 pm #9203
Hello I’m Troy,
I do not know HTBasic our guy that does retired and now when we need him he is not here.
I’m using HTBasic 8.3 on Win 7 SP1
This all worked last week and then we had an IT scan and now this doesn’t work.
The Printer is on a local network HUB.
If I send the document straight to the printer it prints, just not through HTBasic.
So here is the problem:
This HTBasic program is just for printing and water temp. So I create a document and print it by sending it the print spooler and the HTBasic sends it to the printer but then it times out with this error:
Error 11167 in 1280, I then go into the code,
Line 1270 is DISP “sending Graphics to “&Printer$
Line 1280 is output 26 using “K,#”;CHR$(27)&”%0B” ! Enter HPGL Mode
What does this mean? and what is error 11167?
Here is the whole section
1150 Print_file: !
ON ERROR GOSUB Ercheck
! COPY Filename$ TO “C:\Temp\HPGL_Plot” ! Much Faster This Way (using RAM disk)
COPY Filename$ TO “C:\Temp\”&Filename$ ! Much Faster This Way (using RAM disk)
! Open HPGL File for Printing
! ASSIGN @Tp TO “C:\Temp\HPGL_Plot”;FORMAT ON
ASSIGN @Tp TO “C:\Temp\”&Filename$;FORMAT ON
DISP “Currently Printing: “&Filename$&”… “;
ON TIMEOUT 26,2 GOTO No_printer
ON END @Tp GOTO 1380
IF Filename$[1,1]=”L” THEN
DISP “Sending Text to “&Printer$
ELSE
DISP “Sending Graphics to “&Printer$
OUTPUT 26 USING “K,#”;CHR$(27)&”%0B” ! Enter HPGL Mode.
END IF
! PRINT TABXY(5,5);TIME$(TIMEDATE)&” ENTERING PRINTING LOOP”
LOOP
ENTER @Tp USING “K”;Plot$ ! Get HPGL Commands from File
IF Filename$[1,1]=”L” THEN
OUTPUT 26 USING “K”;Plot$ ! and send them to the printer
ELSE
OUTPUT 26 USING “#,K”;Plot$ ! # TO Suppress CR and LF
END IF
END LOOP
! PRINT TABXY(7,7);TIME$(TIMEDATE)&” EXITING PRINTING LOOP”
ASSIGN @Tp TO *
OUTPUT 26 USING “K,#”;CHR$(27)&”%1A” ! Enter PCL Mode.
OUTPUT 26 USING “K”;CHR$(27)&”E” ! Reset to Eject Page
CONTROL 26,111;1
DISPFile_found=0 ! Reset for next search
PURGE “C:\Temp\”&Filename$ ! Much Faster This Way (using RAM disk)
! PRINT TABXY(7,7);TIME$(TIMEDATE)&” EXITING PRINTING LOOP”
1430 RETURNThanks
August 16, 2023 at 1:05 pm #9204Error numbers above 10000 are passed through from Windows (they are not specific HTBasic error codes). It is likely a permissions error caused by change in ownership of a file, folder, or in this case printer. You said this happened after IT scan. Not sure what was involved in this, but probably related to your login permissions and being assigned as new account owner after departure of your retired guy. So it’s an IT issue. Line 1280 OUTPUT 26 USING “K,#”;CHR$(27)&”%0B” ! Enter HPGL Mode, is simply trying to send an escape sequence to the printer assigned to ISC (Interface Select Code) 26 to set it to HPGL mode as the comment indicates.
August 16, 2023 at 2:09 pm #9205Thanks Ralph,
It’s probably not in the permissions because we have full system wide admin rights with one PW and there are only two accounts Admin and xadmin.
I’ll still check though.
The file goes into the print spooler then gets copied into 00Printed, HTBasic uses Printshop Pro 7 to create the file and sends it to the printer.
How do I check to see if HTBasic even sees the printer on the network?
Thanks
August 18, 2023 at 10:14 am #9209There are two ways to set or view the current printer. One is to invoke the Device Setup dialog in the Tools menu. You can then select WIN-PRINT in the driver list and then click on Properties. This will pop up the Windows Configure Print Driver dialog box and allow you to see the current printer and select another printer if needed. Note the “Network” button at the bottom of this pop-up box will allow you to select or enter a network printer name.
The second way allows you to invoke the same Windows Configure Print Driver dialog box but under program control by executing the following line of HTBasic code:
CONTROL 10,102;1
Also, I thought I included this before, but Windows System Error 1167 can be found on this page:
https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes–1000-1299-ERROR_DEVICE_NOT_CONNECTED
1167 (0x48F)
The device is not connected.August 19, 2023 at 9:28 am #9210Thanks again,
I’ll check that out right away.
August 21, 2023 at 11:53 am #9211Thanks,
There is nothing in the network after clicking the button.
Also, my code says the ICS is 26 but when I try to set up a new printer or modify this one there is no 26 it goes from 25 to 27.
The set up uses 10 automatically but there is no 10 in the code.If I change all the 26’s to 10 it only prints one line of letters and numbers.
Also, CONTROL 10,102;1 does not work. I’ve tried different ones like 26,111;1 10,111;1 26,102;1 to no avail.
It also says “sending graphics to HPGL color printer” then it times out.
Can you look at my code above and see if there is another way to writie it?
Since 26 is not working is there a way to see which ICS is working?
Thanks for our help
August 22, 2023 at 9:21 am #9212Thanks for your help Ralph,
I found the problem, the printer port settings got changed and the pooling setting was unchecked.
So, I checked the pooling box and added LPT1 with my printer on it and now the HTBasic printing program works as it did before.
Thanks for helping me.
Good day to you.
August 22, 2023 at 11:10 am #9213Great news! Glad you got it working.
-
AuthorPosts
- You must be logged in to reply to this topic.