[Sloved sort of] Please Help

Post

Posted
Rating:
#1 (In Topic #1050)
Enthusiast
AndyGable is in the usergroup ‘Enthusiast’
Hi everyone

I am at the end of my mind and patients with this at the moment

Attached to this post is my Status application to get the status from the Printer

This works TO A POINT (I know the status works as the printer works with my Windows application that is using OPoS)

When it starts up I get Printer Normal but when it opens the cash drawer it just KEEPS saying the cash drawer is open and not doing anything else

but if I press the feed key the status changes to FEED KEY pressed and then Printer Normal  

Have I messed up some where along the lines?

the Printer's Serial Settings are 9600,n,8,1 handshaking DTR/DSR

I really need someone to help me with this as I can not long get it to work and I would like to have this working with in my application(s)

This is the coding examples I am following from Epson

epson-biz.com - EPSON

Attachment

This is the current version of the status code I am trying to develope and get working before I intergrate it into my PoS module

This was done on Version 3.15.2

Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Enthusiast
PJBlack is in the usergroup ‘Enthusiast’
when i search the forum for "serial" and "AndyGable" i find 42 entries … so i can say that you and the serial port are not going to be friends anymore …

after skimming your code, i wonder:
- why you don't use the corresponding events of the serial interface (_DSRChange, _ DTRChange, _Read) but poll every 100ms …
- why do you use strings and bin(val( instead of using the cpu related functions BChg, BClr, BSet, BTst?
- why is the functionality (and existence) of the serial functions dependent on opening a form? instead of having them available in a (static) class program-wide?
- why, for example, do you initialise

Code (gambas)

  1. Write #RS232Printer, PrinterInitialize
  2. RS232Printer.Send
  3. Write #RS232Printer, SelectPrinter
  4. RS232Printer.Send
  5.  
the rs 232 interface without being interested in the success or failure?
??? what if it doesn't work ???

just a few of my thoughts on the fly … i guess it's quite a sporty task to help you without the hardware to do so

Translated with www.DeepL.com/Translator (free version)
Online now: No Back to the top

Post

Posted
Rating:
#3
Enthusiast
AndyGable is in the usergroup ‘Enthusiast’
 I've got it working

I am well aware that this program could be with a lot of improvident and I would do that once I can understand how to use serial

Im pooling the port as I've never used the DSR and DTR

why do you use strings and bin(val( instead of using the cpu related functions BChg, BClr, BSet, BTst?

Because that is all how I know how to do the code i am open to any suggestions
Online now: No Back to the top

Post

Posted
Rating:
#4
Avatar
Enthusiast
PJBlack is in the usergroup ‘Enthusiast’
well then congratulations that it works now!

Hmmm, maybe that sounds better in german than in english ?
Online now: No Back to the top
1 guest and 0 members have just viewed this.