Code: Select all
Dim status As String
Open COM "COM1:9600,N,8,1,CD0,CS0,DS0,rs" As #1
Print #1, Chr(10) & Chr(4) & 1
While Loc(1) =0
Sleep 1
Wend
status = Input(Loc(1), 1)
Print Bin(Val(status),8)
If Bit(Val(status), 3) = -1 Then
Print "Kickout connector high"
Else
Print "Kickout connector low"
EndIf
If Bit(Val(status), 4) = -1 Then
Print "Offline"
Else
Print "Online"
EndIf
If Bit(Val(status), 6) = -1 Then
Print "Waiting for Online Recovery"
Else
Print "Not Waiting for Online Recovery"
EndIf
If Bit(Val(status), 7) = -1 Then
Print "Paper fed by button"
Else
Print "Paper not fed by button"
EndIf
Close #1
Code: Select all
Dim status As String
Write #Global.PrinterPort, Chr(10) & Chr(4) & 1
Global.PrinterPort.Send
While Loc(Global.PortName) = 0
Sleep 1
Wend
status = Input(Loc(Global.PrinterPort), 1)
Print Bin(Val(status), 8)
If Bit(Val(status), 3) = -1 Then
Global.AddToScreenList("Kickout connector high")
Else
Global.AddToScreenList("Kickout connector low")
Endif
If Bit(Val(status), 4) = -1 Then
Global.AddToScreenList("Printer is Offline")
Else
Global.AddToScreenList("Printer is Online")
Endif
If Bit(Val(status), 6) = -1 Then
Global.AddToScreenList("Waiting for Online Recovery")
Else
Global.AddToScreenList("Not Waiting for Online Recovery")
Endif
If Bit(Val(status), 7) = -1 Then
Global.AddToScreenList("Paper fed by button")
Else
Global.AddToScreenList("Paper not fed by button")
Endif
I am now stumped as what direction to go in could someone help me out