I need some advice
I am trying to get a scanner scale to send the weight to my application (I can get the barcode number with no problem)
I was sent this by the Manafactor
So working from this I have come up with this codeSingle Cable:
RS232 Parameters: 9600, Odd, 7, 1, (recommended) - No software control
Weight Request: STX, Address, FC, ETX, BCC
STX = ASCII S (83 dec, 53 hex)
Address = ASCII 1 (49 dec, 31 hex)
FC (function code) = ASCII 1 (49 dec, 31 hex)
ETX = ASCII CR (13 dec, 0D hex)
BCC = Optional
Weight Format: STX, 1, 1, xxxxx, ETX, BCC
Scale Cancel (optional - dependent on POS s/w): STX, 1, 2, ETX
Code: Select all
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
Sleep 0.025
Try Read #RS232Scanner, Global.ScaleData, Lof(RS232Scanner)
If Error Then
Print "Error With Incoming Serial Data"
Else
Print "Nothing from Scale"
Endif
If Len(Global.ScaleData) > 0 Then
Print "Raw Scale Weight : " & CStr(Global.ScaleData)
' CleanUpBarcodeData(CStr(Global.ScannerData))
End If
End
am I doing something wrong? any help or gidance would be most welcomed