miro35 | 30.05.2014 14:28 |
---|---|
Predmet:Re: Fiskalna kasa Ja nemam za tu kasu.U koju mapu se šalje fajl na izvršenje i da li ti ispravno program kreira te fajlove i koju ti grešku javlja kasa kad pokušaš da izbaciš račun? Ili ništa ne javlja. |
dragoz | 31.05.2014 15:22 |
---|---|
Predmet:Re: Fiskalna kasa Hvala zxz, hvala Miro. formiram dobro fajl koji treba prebaciti na stampac. Kad ga saljem nema odgovora nikakvog od njega. Problem je u otvaranju, ispisu I zatvaranju comporta. Sad radim na tom, ali... Evo kod za formiranje fajla za slanje na stampac (nefiskalni). ako imate kakvo resenje mnogo bi mi znacilo a ja ako uspijem dacu module ovdje. Sub N_zapis_za_stampac(STATUS) On Error GoTo Err_zapis_za_stampac Dim rst As Recordset Dim dbs As Database Set dbs = CurrentDb Dim red As String Set ObjFso = CreateObject("Scripting.FileSystemObject") Set ObjFile = ObjFso.CreateTextFile("C:\qprint\DRAGO\racun" & ".TXT", True) red = "F0" ObjFile.WriteLine red red = "F1" & ";" & "1" ObjFile.WriteLine red red = "F1" & ";" & "1" ObjFile.WriteLine red red = "F1" & ";" & "3" & ";" & " Drago pise na stampac" ObjFile.WriteLine red red = "F1" & ";" & "2" ObjFile.WriteLine red Exit_zapis_za_stampac: Exit Sub Err_zapis_za_stampac: MsgBox Err.Description Resume Next End Sub |
zxz | 31.05.2014 16:03 |
---|---|
Predmet:Re: Fiskalna kasa Ja nadjoh ovo za taj printer. Neznam jesil skinuo ovaj drajver. http://www.quorion.com.au/...Itemid=159 |
zxz | 31.05.2014 16:08 |
---|---|
Predmet:Re: Fiskalna kasa Kod tebe je problem komunikacije izmedju uredjaja i direktorija u koji smijestas racun. Moguce kada instalises ovaj driver da ces to moci podesiti. |
dragoz | 02.06.2014 21:36 |
---|---|
Predmet:Re: Fiskalna kasa Moj problem je sto ne vidim ovaj, serijski port com3, kad citam portove. u control panelu se javlja kao unspecified ali u device manager-u kao com3. Pisao sam kojesta ali opet nema odgovara; a izgleda jednostavno. U prilogu je neko uputstvo za ovu kasu. 2. Protocol Description QPrint 2.1. Low Level Protocol Interface Protocol Level 2 – Record Transport The protocol knows 2 types of records – data records and answer records. Every data record is answered by the receiver with an answer record. Used Control Characters: STX = 0x02 ETX = 0x03 ACK = 0x06 DLE = 0x10 NAK = 0x15 General Layout of a Data Record: DLE STX Command Data DLE ETX CRC High CRC Low Notes: - DLE STX is the start of the record. - DLE ETX is the end of the record. - The CRC is a CRC-16 calculation according to 8005 Poly (x16+x15+x2+1). Appendix A. - When the Data Field contains DLE it is sent as DLE DLE. - Data is a command as described under “High Level Protocol”. A Positive Answer Record DLE STX ACK Error State of the Printer DLE ETX CRC High CRC Low A positive answer record is always sent if the CRC of the received data record is correct. Any error beyond this is indicated by the two status bytes. If the control unit processed the data record correctly, the status is 0x00. For the list of status values see appendix C. If multiple errors occur only the first error is reported. A Negative Answer Record DLE STX NAK DLE ETX CRC High CRC Low 2.2. High Level Protocol General description The Data section starts always with the letter 'F' (Hex 0x46, decimal 67). Field0 follows immediately without a separator. It indicates the command. Additional fields can follow and are separated by semicolon. Required fields contain at least one character, optional fields can be empty. It is not necessary to transmit trailing empty fields. (Examples see appendix B) Data Types Numeric: ASCII characters ‘0’ … ‘9’ (hex 0x30 … 0x39, decimal 48 … 57) Alpha: Any character larger than or equal SPACE (hex 0x20, decimal 32) Amount: ASCII characters ‘0’ … ‘9’ (hex 0x30 … 0x39, decimal 48 … 57), maximal 1 decimal point (hex 0x2E, decimal 46), optional 1 minus (hex 0x2d, decimal 45). Amounts have always an accuracy of two decimal places. Negative amounts are preceded by a minus. Optional zero values can be presented by an empty field. Suppress leading zeroes if the amount is larger than 99 Öre. If the amount is less than 1 Crown, it is allowed to have a leading zero before and after the decimal point. But you can suppress any leading zero and the decimal point. (Examples see appendix B) Percentage: ASCII characters ‘0’ … ‘9’ (hex 0x30 … 0x39, decimal 48 … 57), maximal 1 decimal point (hex 0x2E, decimal 46). Percentages have always an accuracy of two decimal places. Optional zero values can be presented by an empty field. Suppress leading zeroes if the percentage is larger than 0. 99%. If the amount is less than 1%, it is allowed to have a leading zero before and after the decimal point. But you can suppress any leading zero and the decimal point. (Examples see appendix B) 2.3. Available Commands 2.3.0. Status QPrint (CMD_STAT): Field Example Description byte Data type 1 F0 Answer with Status QPrint 2 Alpha Required 2 1 Clear the last error Up to 4 numeric Optional 2.3.1. Non Fiscal Commands Note: - The no fiscal document must begin always with the command “CMD_NF_OPEN” and end with the command “CMD_NF_CLOSE”. Between these commands can be any numbers of text lines (command “CMD_PRINT_TEXT”). It is not allowed a fiscal command when is opened a no fiscal document. 2.3.1.1. Open a Non Fiscal Document (CMD_NF_OPEN): Field Description byte Data type Note 1 F1 Non Fiscal Document 2 Alpha Required 2 1 Open the Non Fiscal Document Up to 4 numeric Required Bsp. TX -> F1;1 // Print Non Fiscal Header RX <- [ACK][0]… [0] 2.3.1.2. Close a Non Fiscal Document (CMD_NF_CLOSE): Field Description byte Data type Note 1 F1 Non Fiscal Document 2 Alpha Required 2 2 close the Non Fiscal Document Up to 4 Numeric Required Bsp. TX -> F1;2 // Print Non Fiscal Footer RX <- [ACK][0]… [0] 2.3.1.3. Print Non Fiscal Text in Non Fiscal Document (CMD_PRINT_TEXT): Field Description byte Data type 1 F1 No Fiscal Document 2 Alpha Required 2 3 print non fiscal data line (line-by-line) Up to 4 Numeric Required 3 “Non Fiscal Text” Text between “ …” 128 Alpha Optional Bsp. TX -> F1;1 // HEADER RX <- [ACK][0]… [0] TX -> F1;3;"===========" // =========== RX <- [ACK][0]… [0] TX -> F1;3;"12345678901" // 12345678901 RX <- [ACK][0]… [0] TX -> F1;3;"===========" // =========== RX <- [ACK][0]… [0] TX -> F1;2 // FOOTER RX <- [ACK][0]… [0] 2.3.2. Fiscal Commands 2.3.2.1. Open a Fiscal Receipt (CMD_FS_OPEN): Field Example Description byte Data type 1 F2 Fiscal Document 2 Alpha Required 2 1 Open the Fiscal Document Up to 4 numeric Required 3 0 / 3 0 – normal (default) / 3 - refund Up to 4 numeric Optional 4 1 2 1 – Coupon of Invoice (Albania) 2 – Special version Bangladesh Up to 4 numeric Optional 5 “123” 21111 Number of Invoice (Albania) Number of Receipt (Rfd-Bangl.) Up to 25 Up to 6 Alpha numeric Optional 6 01062009 Date of Receipt (Rfd.-Bangladesh) Up to 8 numeric Optional Note: The Header are printed with the first Item |
zxz | 02.06.2014 22:20 |
---|---|
Predmet:Re: Fiskalna kasa Citat: Nemoze raditi ako ne radi com port odnosno ako nije aktivan.Moj problem je sto ne vidim ovaj, serijski port com3, kad citam portove. u control panelu se javlja kao unspecified ali u device manager-u kao com3 Zato sam ti dao gore link jer pise da ima neke drajvere koje treba instalisati. Moguce da su ti drajveri od com porta. Pretpostavljam da na compu imas 2 com porta fizicki na ploci i to com1 i com2. E sad neki uredjaj se prijavljuje kao com3 port ali ga nemote da raspozna jer nema drivere. Probaj otkopcati kasu i vidi ima li tada uopste com3 porta. Trebao bi gore skinuti one drivere pa instalisati?. |
dragoz | 04.06.2014 08:25 |
---|---|
Predmet:Re: Fiskalna kasa Jeste virtuelni port, I kad citam portove on se ne vidi. Instalisao sam ja program sa linka koji mi je zxz poslao ali opet nije bilo uspjesno. Ovaj dio koda koji sam poslao je samo jedan od pokusaja da mu doskocim. |
dragoz | 03.06.2014 23:50 |
---|---|
Predmet:Re: Fiskalna kasa Hvala ZXZ. Probao sam mnogo toga ali ne ide iz VBA. Iz onog sto sto znam slanje podataka na serijski port je isto kao u neki fajl; ali ni to ne ide. Moracu izgleda sve preprogramirati na VB. Evo i prijer koda koji nazalost ne radi: Sub zapis_za_stampac(STATUS) On Error GoTo Err_zapis_za_stampac Dim red As String Open "COM3:57600,n,8,1" For Output As #2 'OPEN PORT red = "F0" Print #2, red red = "F1" & ";" & "1" Print #2, red red = "F1" & ";" & "1" Print #2, red red = "F1" & ";" & "3" & ";" & " ISPIS NA STAMPAC" Print #2, red red = "F1" & ";" & "2" Print #2, red Close #2 'CLOSE PORT Exit_zapis_za_stampac: Exit Sub Err_zapis_za_stampac: MsgBox Err.Description Resume Next End Sub |
zxz | 04.06.2014 00:16 |
---|---|
Predmet:Re: Fiskalna kasa Nemozes poslati podatke na nesto cega nema. Do sada sto si pisao ti ne vidis port odnosno nema ga. Neznam gdje si nasao gore navedeni kod ali on ti je samo za otvaranje sekvencialnog fajla a nikako komunikacija sa com portom. Druga stvar je da mi netrebamo nikakvo slanje podataka na com port nego da ntjeramo tvoj uredjaj (printer) da preko com porta pokupi podatke sa tvoga racunara u strukturi koja njemu odgovara. Moramo prvo znati sta hocemo. U tvom sluvaju je to sto sam gore naveo. Zato sam ti i rekao da probas sa instalacijom com porta koja stoji na stranici za taj uredjaj. Sve se moze napraviti samo treba biti strpliv i logicno razmisljati. |
Gjoreski | 04.06.2014 01:45 |
---|---|
Predmet:Re: Fiskalna kasa Vo pravo e zxz moras da proveris prvo dali raboti toj com port.Ako e ispraven I ako funkcionira odime ponataka.Vo tvojov slucaj ne znaeme dali ovaj port e integriran na maticnata ploca ili e nekakva kartica so com porti ili e nekoj virtuelen com na usb.Bidejki ako e integriran na ploca lesno ke go istestirame ili ako e kartica,no ako e virtuelen togas e malku komplicirano |