Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

We have a OHAUAS defender 5000 series model T51P Weighting scales with a COM port. if we connect this to a PC we should be able to get the weight on the computer by sending a command to it.

Is there a way to test this? i tried the command line echo "LP" > com1 but this does nothing. A small C# application that listens to this port seems to be continuously receive Hexadecimal numbers (2 digits then an enter), however sending a command through this application doesn't give readable results.

When i do listen on the port though, the echo "LP" > com1 command gives an unavaible error, so sending the command works in cmd.

Does anyone have any knowledge on a simple way to test a send and receive on a com port?

EDIT:

Model is OHAUAS defender 5000 series - T51P

Using Hyper terminal gives me the below result. the same happens with arduino, and sending the "P" command gives no data back.

edit2:

I have found that the "print button" on the scales has the same functionality as the "P" command. If i push the button i get "random data" if i use a text mode on an application, this data translates into question marks and parts of the weight. i pushed the button 6 times in succesion, getting results like ?????????? or 2??????? or ???.04???A? or ??????????KG these results combined show me that it tries sending 2.04KG, the weight. Now would there be a logical reason why only part of this data is sent(or received)?

hyper terminal

share|improve this question
1  
When you ask a question about a device, it's helpful to post the specific model number. Makes it easier for people to Google for related information. –  Isaac Rabinovitch Sep 11 '12 at 15:20
    
@IsaacRabinovitch i added the model in the question and in the edit. thanks for that tip. –  Andy Sep 12 '12 at 8:33
1  
are you sure that databits are set the same? (they should be if you use defaults, but maybe someone changed it)? Ÿ (10011111) matches with pattern for 7E (7 bits, even parity). May be a coincidence though –  wmz Sep 12 '12 at 10:27
    
@wmz i have just checked the setting on the scale again. (BAUD rate = 9600, 8 bits no parity, no handshake, 1 stop bit.) Using the print button on the scales send a seemingly random part of the weight to the com port. –  Andy Sep 12 '12 at 11:33
    
then I would suspect faulty cable, connectors, grounding issues or similar hardware related ones. Do you have another cable to try? Preferably known to be working properly? –  wmz Sep 12 '12 at 12:11

4 Answers 4

You can download this for your platform and open the application and go to tools serial monitor. that will listen to the configured serial port. (You do not need an arduino for it to work.)

From their website:

Q: How do I use Hyperterminal to check communications?

A: Hyper Terminal is a Terminal program that is bundled with Windows.

To set up Hyper Terminal for use with an Ohaus balance, perform the following steps. The following assumptions are made for the purpose of explanation. 1. The computer uses Com1 2. The Balance Baud Rate is set to 2400 3. The Balance Data Bits are set to 7 4. The Balance Stop Bits are set to 2 5. The Balance Parity Bit is set to None 6. Handshaking in the balance is turned off

Open the program and enter a name for the connection. You will probably want to save the setup for future use. Press OK In the next screen click on the twirl down for the "Connect using" box and select the COM port your computer uses.

Click OK and the COMx properties box will be displayed. (Which COM port appears will depend on the setting in the previous step.)

Set the parameters to match the parameters in the balance. See the instruction manual for the balance. The usual defaults are 2400 baud, 7 data bits, no parity, 2 stop bits and no handshake. When finished press apply then press OK.

The terminal screen will be displayed.

Select CALL from the menu bar and select Disconnect. The "Connected" at the bottom left of the screen will change to "Disconnected".

Select FILE from the menu bar and select Properties.

Select the Settings tab.

Check Windows Keys and Del.

At the bottom of the box click on ASCII Setup.

Check the first two boxes and put 11 in the next 2.

Click Ok twice.

From the Call menu select Call.

"Call" will be displayed at the lower left of the terminal screen.

You are now ready to communicate with the balance. The best way to test the connection is to press print on the balance. Other commands are listed in the instruction manual for the balance.

And some additional info from that site:

How can I get my Defender 5000 indicator (T51P or T51XW) to print without inserting an extra line feed? I am using a label printer with preprinted labels and every other label is wasted. A: You can do this by going into the menu under Print1 or Print2 and setting the format to Single. Q: Ok now I am printing a single label but there is too much information. I am still using a T51P. A: Again go into the Print1 or Print 2 menu. You can turn off all the heading and GLP information you need too. You can also turn off the Gross, Net and Tare printing and just leave the result. You also have the option to print the result as a number only by setting it to NUM. This will eliminate the unit of measure. Q: I am using a 7000 series Defender indicator (T17P) and I can not clear the accumulator. I have followed the instructions in the manual but it does not clear. A: Press and hold the "info" button until the display shows "StatS". Then press the "CLR" button to clear the accumulator.

taken from: http://us.ohaus.com/us/en/home/support/faq.aspx#S16

share|improve this answer
    
Thanks, when using arduino, all i need to set up seems to be the BAUD rate. i tried them all (the correct one is 9600 according to the settings on the scales) and all of them actually just gave a diffrent character spam. 9600 was mainly an Y with double dots on it combined with a square. Do you have any idea why this would happen? or is that purely an issue with the scales sending this data? –  Andy Sep 12 '12 at 8:42
    
It looks like your scale outputs more than just weight data: GLP/GMP - weight, calibration data, balance ID, serial number, date and time –  Dave York Sep 12 '12 at 17:29

A practical way of testing com ports is to use terminal emulator. You may use any of many available ones (putty and TeraTerm are widely used). You will need to set it to use serial connection, then set connection params: com number; speed (baudrate), parity, databits, stop bits - those must match your device setup (you need to get this information from manual). When connected, you will be able to enter commands and see device output.
You may also send commands from cmd, but you will not see a response (in cmd window, of course device may/should react somehow to it), and you also need to make sure that baud/data/parity/stop (as minimum) are set properly - this is done via mode command.

To reiterate: serial parameters (speed, databits, parity, stop, possibly handshake) must be the same on both ends (scale and PC) otherwise they will 'not understand' each other

share|improve this answer

There is a manual available online. (In general, googling for "xyzzy manual" where xyzzy is the model number is a good way to find a product manual.) It documents the command line and the data the scale provides. It also explains how to configure the devices COM port. You'll want to use settings that match the communications settings for your terminal program.

share|improve this answer

Verify that you have the right serial port settings configured.

I recently made an application to read the weight value from a OHAUS Defender 3000, and these are the right parameters:

//OHAUS Defender 3000                        
_serialPort = new SerialPort(cbxPorts.Text);                        
_serialPort.BaudRate = 9600;                        
_serialPort.Parity = Parity.None;                        
_serialPort.DataBits = 7;                        
_serialPort.StopBits = StopBits.One;                        
_serialPort.Handshake = Handshake.XOnXOff;
share|improve this answer
    
The question refers to command-line operation. Your answer appears to be C++ code. How can a user examine and change these parameter settings from the Windows Command Prompt? (Or even from the Windows GUI?) –  G-Man Oct 9 at 20:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.