Search found 137 matches

by AndyGable
Tuesday 14th September 2021 3:15pm
Forum: General
Topic: RS232 / Serial Scale Help
Replies: 28
Views: 515

Re: RS232 / Serial Scale Help

I'm using
RS232Scanner.open
Do I need to do it like
open RS232Scanner for read write
by AndyGable
Monday 13th September 2021 11:39pm
Forum: General
Topic: RS232 / Serial Scale Help
Replies: 28
Views: 515

Re: RS232 / Serial Scale Help

Public Sub btnRequestWeight_Click() Dim iBytes as Integer Dim sWhatever as String RS232Scanner.EndOfLine = gb.mac RS232Scanner.Blocking = True Write #RS232Scanner, "S11\n" ' Wait for anything at all to be sent back. Do Wait 0.001 ' Using a really small delay this time to lessen overflow risk sWhate...
by AndyGable
Monday 13th September 2021 12:51pm
Forum: General
Topic: RS232 / Serial Scale Help
Replies: 28
Views: 515

Re: RS232 / Serial Scale Help

Sorry according to the C program it was needed (I must have forgotten to remove that before sending it to you)
by AndyGable
Sunday 12th September 2021 9:07pm
Forum: General
Topic: RS232 / Serial Scale Help
Replies: 28
Views: 515

Re: RS232 / Serial Scale Help

RS232Scanner.EndOfLine = gb.mac RS232Scanner.Blocking = True ' From the wiki: When this property is set, reading from the stream will block if there is nothing to read Write #RS232Scanner, "S11\n" Write #RS232Scanner, "S14\n" ' Take little naps for a while to let anything happen like de operator pu...
by AndyGable
Saturday 11th September 2021 7:22pm
Forum: General
Topic: RS232 / Serial Scale Help
Replies: 28
Views: 515

Re: RS232 / Serial Scale Help

Hi @thatbruce I copied your code and I got a error saying End of file in FMain:108 and it is heighlighting the line Line Input #RS232Scanner, Global.ScaleData Public Sub btnRequestWeight_Click() RS232Scanner.EndOfLine = gb.mac ' Trust me, I am an expert Write #RS232Scanner, "S11\n" Line Input #RS232...
by AndyGable
Friday 10th September 2021 9:43pm
Forum: General
Topic: RS232 / Serial Scale Help
Replies: 28
Views: 515

Re: RS232 / Serial Scale Help

@ThatBruce I totally agree with you on the user manals for Point of sale hardware they are not done very well at all I have the fun job of converting over from Windows the Printer, Cash drawer and card processing modules (they are NOT going to be fun but I have a example of the cash drawer status su...
by AndyGable
Friday 10th September 2021 12:44pm
Forum: General
Topic: RS232 / Serial Scale Help
Replies: 28
Views: 515

Re: RS232 / Serial Scale Help

This is the full file that was sent by Datalogic Dual Cable (SASI): RS232 Parameters: 9600, Even, 7,1 - No Flow Control Weight Request: ASCII W (87 dec, 57 hex) Weight Format: STX, xx.xxx, CR Dual/Single Cable (ICL): RS232 Parameters: 2400, Even, 7,1 - works with ACK/NAK Weight Request: 1. Enquire (...
by AndyGable
Friday 10th September 2021 12:44pm
Forum: General
Topic: RS232 / Serial Scale Help
Replies: 28
Views: 515

Re: RS232 / Serial Scale Help

Hoowee. We are really going to have to go back to basics here. Going back to your original post : You appear to be setting STX, which I presume is the ANSI "start transmission" character, to &H53. But 53 is the printable "S" character ? STX is $H02 Any reason for this discrepancy? Also, according t...
by AndyGable
Friday 10th September 2021 1:08am
Forum: General
Topic: RS232 / Serial Scale Help
Replies: 28
Views: 515

Re: RS232 / Serial Scale Help

@BruceS, Yes I was going to suggest the same but I still haven't got an answer from AndyGable to my question At the Code: Select all If Len(Global.ScaleData) > 0 Then line have you inserted a breakpoint and inspected the value of the Global and the value of Global.ScaleData? @AndyGable, I have done...
by AndyGable
Thursday 09th September 2021 2:45am
Forum: General
Topic: RS232 / Serial Scale Help
Replies: 28
Views: 515

Re: RS232 / Serial Scale Help

I'd write it like this... Public STX As String = Chr(&H53) Public Address As String = Chr(&H31) Public FunctionCode As String = Chr(&H31) Public ETX As String = Chr(&H0D) Public Sub btnRequestWeight_Click() Write #RS232Scanner, STX & Address & FunctionCode & ETX Wait 0.1 ' wait a little longer Try ...