Tumbler
10-07-2008, 02:49 PM
Hello,
I try to receive data from the RF Transmitter with visual basic 6.
The data wich is send looks like this:
SEROUT Tx, Baud, ["UUUU!", strLen, STR string\strLen,crc.LOWBYTE, crc.HIGHBYTE]
The packet data format:
' |----------||------------| |------------||-------------||-------------|
' |Data Count||Data Value 1|...|Data Value n||Checksum Low||Checksum High|
' |----------||------------| |------------||-------------||-------------|
' BYTE 1 BYTE 2 BYTE n+1 BYTE n+2 BYTE n+3
'
' Byte 1 consists of the Data Count. The Data Count is a value from 1 to 16
' representing the number of Data Values in this packet. Packets can
' contain from 1 to 16 bytes of data values (at least 1 Data Value is
' required).
' Byte 2 through Byte n+1 are the actual Data Values where
' n = Data Count+1.
' Byte n+2 and Byte n+3 are the last bytes in the packet and consist of a
' 16-bit Cyclic Redundancy Check (CRC) Checksum value calculated using the
' bytes 1 through n+1 together
·I use the MSCom component in Visual Basic 6.
Private Sub commRFG_OnComm()
Dim sData As String
sData = commRFG.Input
Text1.Text = Text1.Text & sData & vbCrLf
End Sub
In this example i don't receive all data, only a part of it.
The input length from the comm component is set to 0.
Anyone knows the problem here?
I try to receive data from the RF Transmitter with visual basic 6.
The data wich is send looks like this:
SEROUT Tx, Baud, ["UUUU!", strLen, STR string\strLen,crc.LOWBYTE, crc.HIGHBYTE]
The packet data format:
' |----------||------------| |------------||-------------||-------------|
' |Data Count||Data Value 1|...|Data Value n||Checksum Low||Checksum High|
' |----------||------------| |------------||-------------||-------------|
' BYTE 1 BYTE 2 BYTE n+1 BYTE n+2 BYTE n+3
'
' Byte 1 consists of the Data Count. The Data Count is a value from 1 to 16
' representing the number of Data Values in this packet. Packets can
' contain from 1 to 16 bytes of data values (at least 1 Data Value is
' required).
' Byte 2 through Byte n+1 are the actual Data Values where
' n = Data Count+1.
' Byte n+2 and Byte n+3 are the last bytes in the packet and consist of a
' 16-bit Cyclic Redundancy Check (CRC) Checksum value calculated using the
' bytes 1 through n+1 together
·I use the MSCom component in Visual Basic 6.
Private Sub commRFG_OnComm()
Dim sData As String
sData = commRFG.Input
Text1.Text = Text1.Text & sData & vbCrLf
End Sub
In this example i don't receive all data, only a part of it.
The input length from the comm component is set to 0.
Anyone knows the problem here?