vuott wrote: ↑Thursday 10th November 2022 2:15pmIn general, to convert a numeric value to a binary string, you can use the native Bin() function:
https://gambaswiki.org/wiki/lang/bin
You will take care to preliminarily convert the ASCII character to a numeric value using the Asc () function.
Exemplum:____________________________________________________
Print Bin (Asc ("<"))IF the printer sends 8-bits data, these correspond to 1 Byte.AndyGable wrote: ↑Thursday 10th November 2022 1:40pmDoes any one have any idea how I can capture the above data
Bit Binary Hex Decimal Status 0 0 00 0 Drawer kick-out connector pin 3 is LOW. 1 01 1 Drawer kick-out connector pin 3 is HIGH. 1 – 3 − − − (Reserved) 4 0 00 0 Fixed 5, 6 − − − (Reserved) 7 0 00 0 Fixed
Therefore it would seem that you just need simply to read 1 byte:
Dim variable_Byte As Byte Read #RS232Printer, variable_Byte Print Bin(variable_Byte)
Thanks for that I am now getting on screen
Code: Select all
Ready....
Watching For incoming data from Printer
10100
0
0
1111