[Solved] Convert BASIC to Gambas

Post your Gambas programming questions here.
Posts: 137
Joined: Wednesday 02nd December 2020 12:11am
Location: England

Re: Convert BASIC to Gambas

Post by AndyGable » Saturday 04th September 2021 8:03pm

Hi Everyone

I have sorted out the first part of my scanner / scale module the barcode number is being sent perfecvtly everytime now

What I did was this

Code: Select all

Sleep 0.025
        Try Read #RS232Scanner, Global.ScannerData, Lof(RS232Scanner)
    If Error Then
        Print "Error With Incoming Serial Data"
    If Len(Global.ScannerData) > 2 Then
        Print "Raw Barcode Number : " & CStr(Global.ScannerData)
and then to send the barcode number to the PoS terminal i used

Code: Select all

Private Sub CleanUpBarcodeData(BarcodeNumber As String)
    Dim TempNumber As String     

    If Global.Scanner_RemoveChrs > 0 Then
        TempNumber = Mid$(BarcodeNumber, Global.Scanner_RemoveChrs, Len(BarcodeNumber))
    End If

    Print "Processed barcode Number : " & Trim(TempNumber)
    Global.AddToListBox("Barcode Number sent to PoS :" & TempNumber)
And this works every time :) I just need to work out how to send the request to the Scanner to send the weight back

Post Reply