473,513 Members | 2,523 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to compare the mscomm data recieved using RFID and Compare it with my Text

27 New Member
Sir its me julius,

Sir how can i compare the mscomm data recieved using RFID and Compare it with my Text data.

Sir example.

Private Sub MSComm1_OnComm()

Text1.SetFocus
' STX Data ETX + Cr
Text1.Text = MSComm1.Input
MSInput = Text1.Text
End Sub

How can i compare the recieved Data to TextData ?
Msinput is memory right?
How can i compare the Input in MSinput to Text data and i will display Msgbox "ok you're Passed" after comparing the Data


Hope you will responds
Thanks.

Julius
Nov 20 '06 #1
6 5946
albertw
267 Contributor
Sir its me julius,

Sir how can i compare the mscomm data recieved using RFID and Compare it with my Text data.

Sir example.

Private Sub MSComm1_OnComm()

Text1.SetFocus
' STX Data ETX + Cr
Text1.Text = MSComm1.Input
MSInput = Text1.Text
End Sub

How can i compare the recieved Data to TextData ?
Msinput is memory right?
How can i compare the Input in MSinput to Text data and i will display Msgbox "ok you're Passed" after comparing the Data


Hope you will responds
Thanks.

Julius
hi

you could do it like that i suppose
however your mscomm input might be only 1 character
better to create a loop while receiving all data and compare afterwards
such as

Expand|Select|Wrap|Line Numbers
  1.     Do
  2.     DoEvents
  3.     RxTxt = MSComm1.Input
  4.     If Len(RxTxt) > 0 Then strBuffer=strBuffer + RxTxt
  5.     Loop Until RxTxt = Chr(10) 'or whatever character is used to end input string
  6.  
now you can compare strings

Expand|Select|Wrap|Line Numbers
  1. if Text1.text=Buffer then
  2. msgbox "OK, you're passed",vbokOnly+vbExclamation"
  3. endif
  4.  
Nov 20 '06 #2
OldSchool
27 New Member
Sir i Highly appreciated your kindness, Sir can you out Comment in the code you given to me if you dont mind sir...


Thanks
Julius
Nov 23 '06 #3
albertw
267 Contributor
Sir i Highly appreciated your kindness, Sir can you out Comment in the code you given to me if you dont mind sir...


Thanks
Julius
first of all julius, there are no sirs here :), thank you.

Do
-- start a loop
DoEvents
-- look if no other thing (keystrokes or whatever occur)
RxTxt = MSComm1.Input
-- name your mscomm input RcTxt
If Len(RxTxt) > 0 Then strBuffer=strBuffer + RxTxt
-- if RxTxt holds data, transfer this to a buffer, called strBuffer
Loop Until RxTxt = Chr(10)
-- if the input meets e.g. chr(10) , the input ends

now you have all your received data in strBuffer and can you start to compare

if Text1.text=Buffer then
-- if the contents of Text1 as the same as what you received (strBuffer)
msgbox "OK, you're passed",vbokOnly+vbExclamation"
-- show a messagebox that you're passed.
endif
-- otherwise do nothing
Nov 23 '06 #4
OldSchool
27 New Member
Thanks!

Big help to me. coz as of now im just a beginner in vb. thanks for the support.

From where country you are if you dont mind?

Julius

first of all julius, there are no sirs here :), thank you.

Do
-- start a loop
DoEvents
-- look if no other thing (keystrokes or whatever occur)
RxTxt = MSComm1.Input
-- name your mscomm input RcTxt
If Len(RxTxt) > 0 Then strBuffer=strBuffer + RxTxt
-- if RxTxt holds data, transfer this to a buffer, called strBuffer
Loop Until RxTxt = Chr(10)
-- if the input meets e.g. chr(10) , the input ends

now you have all your received data in strBuffer and can you start to compare

if Text1.text=Buffer then
-- if the contents of Text1 as the same as what you received (strBuffer)
msgbox "OK, you're passed",vbokOnly+vbExclamation"
-- show a messagebox that you're passed.
endif
-- otherwise do nothing
Nov 23 '06 #5
albertw
267 Contributor
Thanks!

Big help to me. coz as of now im just a beginner in vb. thanks for the support.

From where country you are if you dont mind?

Julius
just click my 'picture' to see the profile
by the way, learning VB is just open any program, read and try to understand what others have done.
it takes a while .... :(
Nov 23 '06 #6
khalilche
1 New Member
Hi Julius,
What happened to your project. I am actually working on the same project than you. VB with RFID and reception on a serial port. If you don't mind sending me your project, it would be great.
My e-mail address is khalilche@hotmail.com and I would appreciate it too much if you help me in my project by sending me your code.
Thanks
May 11 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
4909
by: jinoy | last post by:
how can i detect an incoming caller's telephone keystroke using modem, using mscomm or other? how can i detect an outgoing call using mscomm? how can i get a caller id using mscomm?
1
3505
by: Peter Krikelis | last post by:
Hi, I am trying to develope a User Control Library that features MScomm control. I test my user control in a test application. When I run the application I receive the following: An...
0
2136
by: morgal | last post by:
That is one reason I quit using MS custom controls, you have to buy the license. In VB 6 they give you a try it license and then you develop a huge application or small one and find out you don't...
4
3446
by: AA | last post by:
Hi I am developing an app in which I have used a MSComm object. I have opened the port, performed the transactions, and then closed the port. But when I check in the task mamager, the memory...
6
6557
by: Barry Martin | last post by:
I am using an activex control mscomm to control a serial port in VB.NET. I place the control on the main form and set its port, baud rate, etc. properties. After creating a code module that needs...
1
2579
by: Barry | last post by:
I am using the mscomm activex control in vb.net. I can add the control to the toolbar which will allow me to drop it onto a form. As long as I am in the code space for that form it works fine....
9
9036
by: Carl Gilbert | last post by:
Hi I'm trying to open a vb6 project in vb.net which uses the mscomm component. When running the vb upgrade wizard in vb.net, an error is raised: Upgrade failed, unable to load reerenced...
0
1559
by: swati2106 | last post by:
HI, I have develop a apllication , To store the GPS data in database, for that , to read GPS data I have used the Mscomm port, In which I create the object of class RS232 n open that port,...
0
1683
by: cmdolcet69 | last post by:
I get the following error message when I output to the mscomm: An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in COM.exe Additional information: Exception...
0
1854
by: daveman | last post by:
Hello, I'm encountering a "Blue Screen of Death" when I try to send data to a bluetooth sensor via a serial port, using the MSCOMM ActiveX object. I was wondering if anyone has any ideas how to...
0
7259
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7158
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7380
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7523
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5683
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
1592
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.