Logging data from tachometer with serial port

F

Thread Starter

Faisal

Hi,
I am supposed to log data from a hand held tachometer with serial port.
The problem is that nothing can be read from the port. I have tried many times. I am using labview for reading the port. I tried Hyperterminal many times. I tried both upper and lower
cases. I also changed the ASCII settings etc. Actually the manual says the following command
sequence in order to retrieve data from the meter:
STX x H n ETX
Where 'n' and 'x' are switches and could be one of five numbers from 1 to 5. Each number has own
meaning like send average, send continuous etc. and i tried all.
Baud is 4800, 8 data bits, no parity, 1 stop bit and no XON or XOF etc. The meter is Braun MOVIPORT and has no custom Software. I Look forward to hear from someone soon.

Faisal.

I'll appreciate any help in this regard.
 
Dear Faisal,
Use Comview software ( shareware program which you can download from the net).
What is the port ? Is it RS-232C?
What is the protocol beisng supported ? The data format is STX-ETX, but waht is the command to be issued in order to get the Data? The port is passive , perhaps. It send data onlyn when a request command is received.
let me know if you need further help.
kamath rl
 
Hi Kamath,

It was very nice of you to reply. I am completely confused myself. The port is rs-232 and passive. The instruction to retrieve data is:
STX n H x ETX
Where n and x are switches. To get the data, you have to issue something like:
STX 1 H 1 ETX
But nothing is happening. The pin (3) which is TX stays high (around 8 volts). There is another command in the manual for retrieveing data:
STX /n /kXXXXXXX CR ETX
This one has got to do something with decimal points. k specifies the number of decimal points after fullstop. n is again the same switch (from 1 to 5). I dont know which one to follow. What would you do,I mean, in software to simply get data from this kind of equipment? Normally Hyperterminal works, but its not. I am using Labview.
I hope to hear from you again.
Regards,
Faisal.

> Dear Faisal,
> Use Comview software ( shareware program which you can download from the net).
> What is the port ? Is it RS-232C?
> What is the protocol beisng supported ? The data format is STX-ETX, but waht is the command to be issued in order to get the Data? The port is passive , perhaps. It send data onlyn when a request command is received.
> let me kinow if you need further help.
> kamath rl
 
C

Crucius, Wesley

I hope I'm not insulting your intelligence, but maybe you aren't aware that STX and ETX are not character sequences, but rather "names" for
byte values...
 
W
Faisal,

It's probably hardware that's making trouble. It could be as simple as reversing TxD and RxD. If you can first make sure that you are sending
data to the RxD pin, and trying to receive from the TxD pin, move on to the handshaking pins. If you have a schematic, check to see which pins
are used (RTS, CTS, DSR). Make sure these pins are either activated correctly by your PC software, or are tied to the appropriate level.
An RS-232 breakout box is very useful for this type of problem, if you can obtain one.

If you still have trouble, maybe you could measure the voltage on the UNCONNECTED tach port and post it. This should tell which pins are
being used.

Regards,

Willy Smith
Costa Rica
 
Hi Crucius,

You seem to be correct. Is it H01 and H03 you are talking about for STX and ETX? If so, I tried that too. Please elaborate your suggestion.
Regards,

Faisal.
 
L
I believe either you have the pin-outs wrong or your port is damaged.

An idle RS-232 TX line should be in the range of -5v to -11v (formally, -3 to -15v).

A floating RS-232 RX line should be around 0v (usually about +0.1 in practice).

If you are seeing +8v on an idle RS-232 TX pin, either you've got the wrong ground reference (using a -8v as ground), have the wrong pin as TX, or the port is damaged by surges (also very possible).

regards

Lynn August Linse, Senior Software Engineer
15353 Barranca Parkway, Lantronix Inc, Irvine CA 92618
[email protected] www.lantronix.com
Tel: (949)300-6337 Fax: (949)453-7152
 
R

Raymundo D. Balderas

Hi there Faisal:

I think your problem is based on your output.

If you are using VB to create your program your output must look like this one:

' all variables are string variables


STX = chr(02) ' Start of text character
ETX = chr(03) ' End of text character

x = 1 ' just a example
n = 1 '

msg = STX + x + "H" + n + ETX

mscomm1.output = msg

Good Luck
 
Faisal, just for clarification STX is H02, not H01. But these are the values you will need to send, not the character strings 'STX and 'ETX'.

Don Z.
 
C

Crucius, Wesley

I saw someone respond with a simplistic VB code example that illustrated what I am trying to say. The text "H02" is just another representation for <STX>, both of which really mean "a single byte whose value ascii code value
is 2" (or 3 in the case of <ETX>). The "H" prefix is intended to identify that the numeric value following is hexadecimal. In case your wondering why the "H" is needed, consider the difference between "36" and "H36" (is "36" hexadecimal?). Along the same lines, you might also see $02 or 0x02 or 02H or 02h as representations for <STX>. If this is actually the issue you are struggling with, check out a good ASCII chart. A quick search at www.dogpile.com for "ASCII Code Chart" yielded several for me (Ex: http://www.danbbs.dk/~erikoest/asciicc.htm).
 
Top