Beruflich Dokumente
Kultur Dokumente
i am suppose to use a RFID (radio frequency identification device) to activate(open) a gate. i am to use visual basic 6 for my programming part but didn't noe how to use it. i believe i'll be using microsoft access for the database (so that when someone scans the RFID tag on the device, it'll compare the informations on the tag to thoae in the database, before allowing access to activate the gate) thanx
frmMain.txtDisplay.Text = taginput_crc & _ "PC <- Reader: 11 FF B0 23 01 " & sMsg & "00 01 " & vbCrLf & vbCrLf frmMain.MSComm1.Output = Chr$(&H11) + Chr$(&HFF) + Chr$(&HB0) & _ Chr$(&H23) + Chr$(&H1) + sMsg + Chr$(&H0) + Chr$(&H1) & _ frmMain.Text2.Text frmMain.txtDisplay.Text = taginput_crc & _ "PC -> Reader: 11 FF B0 23 01 " & sMsg & "00 01 " & frmMain.Text2.Text & vbCrLf & vbCrLf frmShoes.txtShoeTag.Text = "11 FF B0 23 01" & sMsg + "00 01" frmShirt.txtShirtTag.Text = "11 FF B0 23 01" & sMsg + "00 01" sbuffer = Chr$(&H11) + Chr$(&HFF) + Chr$(&HB0) + Chr$(&H23) + Chr$(&H1) + b + Chr$(&H0) + Chr$(&H1) crc_output = CalcCRC16CheckSum(sbuffer, Len(sbuffer)) buflen = Len(sbuffer) frmMain.Text1.Text = Len(sbuffer) End Function
And also for example, if my CRC value is "D1B8" which isn't correct as the program calculates D1 as MSB and B8 as LSB, what must be edited to obtain the CRC value "B8D1" as this is actually the correct value (see below)? Code: Public Function CalcCRC16CheckSum(sbuffer As String, buflen As Byte) As Integer Dim i, j As Byte Dim wCrc As Integer Initialise_mPower wCrc = CRC16_PRESET For i = 1 To buflen wCrc = wCrc Xor Asc(Mid$(sbuffer, i, 1)) For j = 1 To 8 If (wCrc And &H1) Then wCrc = LShift(wCrc, 1) Xor POLYNOM Else wCrc = LShift(wCrc, 1) End If Next j Next i crc_output = wCrc
frmMain.crcdisplay.Text = crc_output a = Hex(crc_output) frmMain.Text2.Text = a End Function Public Function LShift(ivalue As Integer, iBits As Integer) As Integer If (ivalue And mPower2(15)) = mPower2(15) Then LShift = (ivalue And &H7FFF) mPower2(iBits) Or mPower2(15 - iBits) Else LShift = ivalue mPower2(iBits) End If End Function Public Function RShift(ivalue As Integer, iBits As Integer) As Integer If (ivalue And mPower2(15 - iBits)) = mPower2(15 - iBits) Then RShift = (ivalue And (mPower2(15 - iBits) - 1)) * mPower2(iBits) Or mPower2(15) Else RShift = (ivalue And (mPower2(15 - iBits) - 1)) * mPower2(iBits) End If End Function
Sorry if I posted a big chunk of code in here as I'm unsure of which portion of the code I'm suppose to look into. Thanks for the help.
Implementation Of RFID
Im doing a project in "Implementing RFID in logistics division"... I dont have any idea how to start with it... This is gonna be by career project... So please help me by giving ome information rearding RFID... Please answer the following question... 1. How to start with it? 2. Do we have any simulation software or simulation toolkit for implementing RFID? 3. Do we need to buy reader and tag directly before implementing software? 4. Can we implement the sotware using visual basic? 5. What are all the details of implementing the software in loistics division? 6. I need basic screen design to start with it... 7. If possible give me some coding for Information server software for implementing RFID? regards karthik
Quote: PC -> Reader: 07 FF B0 01 00 1C 56 PC <- Reader: E0 05 40 00 5C 1A 58 6B 5B PC -> Reader: 11 FF B0 23 01 E0 05 40 00 00 5C 1A 58 00 01 B8 D1 (this problem was solved in earlier thread) PC <- Reader: 0D 00 B0 00 01 04 00 34 64 64 61 CE 2C (Reader response to PC with the tag content w/ CRC highlighted in red) This following display was taken from the simulator. As mentioned in my earlier thread, I have written a program that works something like the simulator. What kind of code can I use to generate the tag content as shown as above quote? Thanks
read_command(6) = Chr$(55) 'read # times read_command(7) = Chr$(52) 'read # blocks RFID2portRead = read_command(0) & read_command(1) & read_command(2) & _ read_command(3) & read_command(4) & read_command(5) & read_command(6) & read_command(7) acknowledge_read(0) acknowledge_read(1) acknowledge_read(2) acknowledge_read(3) acknowledge_read(4) acknowledge_read(5) acknowledge_read(6) acknowledge_read(7) = = = = = = = = Chr$(97) 'a Chr$(99) 'c Chr$(107) 'k Chr$(110) 'n Chr$(119) 'w Chr$(108) 'l Chr$(103) 'g Chr$(101) 'e
RFID2portAck = acknowledge_read(0) & acknowledge_read(1) & acknowledge_read(2) &_ acknowledge_read(3) & acknowledge_read(4) & acknowledge_read(5) & acknowledge_read(6) & acknowledge_read(7) MSComm1.Output = RFID2portRead MSComm1.Output = RFID2portAck MSComm1_OnComm End Sub Private Sub MSComm1_OnComm() Dim InString As String ' Retrieve all available data. MSComm1.InputLen = 0 ' Check for data. If MSComm1.InBufferCount Then ' Read data. InString = MSComm1.Input If Len(InString) > 0 Then Text1.SelText = InString End If End If End Sub