Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSComm data

Status
Not open for further replies.

zalmey

MIS
Feb 6, 2002
15
PK
Hi
Though um getting data through Mscomm but how do i change it in readable form as um getting like « µ³®³° g .Š.
 
Check the settings on the MSComm control and your incoming data. If lots of your data appears to be ASCII 128 and above you've probably got speed or number of bits or parity or stop bits setting wrong

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'

for steam enthusiasts
 
the mscomm settings is 2400,n,8,1. where is the scale baud rate is also 2400.
 
Is the scale also n,8,1 (no parity, 8 data bits and 1 stop bit)?

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'

for steam enthusiasts
 
I think so. Can u tell me how i can convert the extendted code.
Thanx.
 
If you're sure that all settings match then you need to look at the product documentation to see how the data is encoded - there is no way of guessing it.

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'

for steam enthusiasts
 
You may have to also change whether or not the incoming data should be read as binary data, that is under the properties of the MSComm control.

LF
 
I use LookRs232 software. it also gave me the same result in characters. The string consisting of Ascii and Extend code. if there is any functions which change the whole string into characters.
 
Usually, and the pseudo standard is, when communicating via RS-232 the communication should be in ASCii; it is also transfered in the WYSIWYG, "what you see is what you get", so if there are no charachters that you can make out,and you should be able to, then most likely you have the transfer settings incorrect. With that said, if you are certain that you have the transfer speed, parity bit, size of the byte, etc. set correctly, then the data you are receiving is valid data. Whether or not the data should be readable is dependant upon what the application is. For instance, if you had a CMUcam and you were trying to send the data to your computer, then you would require some sort of algorythm (sp?) which would assemble the data into a picture. What I am saying here is that we really need to have more information on the project. The information you have provided is not sufficent enough to troubleshoot the problem. I hope this helps you to better understand where you may be going wrong...

LF
 
Thanx all.who are trying to correct me. I have alredy paste the data which um getting from the digital scale. The speed, parity and the stop bit are all right. now um in need to convert that data "« µ³®³° g .Š. " into some readable form. I also use the professional software and it gave me the same that i have pasted already. lets discuss it one by one.
1. that i should rely on this data and use some algorithm to convert it into some readable form.
2. if so what kind of functions be use ful
2.1 asc
2.2 chr
or u suggest.............
 
We don't actually know (and can't guess) what your data is coming from.
me said:
If you're sure that all settings match then you need to look at the product documentation to see how the data is encoded - there is no way of guessing it.

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'

for steam enthusiasts
 
With digital scales, there is usually some local display of weight as well as the RS232 transmission. So, although it would be best to have the manufacturer's documentation, it just might be possible to deduce the algorithm used for creating the data stream (by varying the weight) - but you would have to be pretty desperate!
 
If I remember corretly, many scales use a 7-bit wide data packet. Try this and see what happens. I really think it is a setting moreso than an Algorithm; although I could be wrong about this. I could see if the government needed to encrypt packets for some secret project, but for a scale? I really doubt. I say this because it takes more time to code Microcontrollers when a person wants to encrypt the data, many manufacturers use "readable" packets because it is so much eaiser, and faster, to put the product into the market. Again, I could be wrong about this... Have a look at and cross reference the data you receive with that table. See if there is any relationship to the weight which is displayed by the scale. Also, I have seen some products which communicate via a Hex converted to CHR standard, but I don't believe that is the case here if you are providing us with the proper data. Try the 7-bit wide byte and see what happens...

LF
 
Thanx guys i will change 8-bit to 7 bit and inform u all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top