Serial port between my computer and Precisa scale

Hello everyone. I have a Precisa scale, which i connected to my computer through a serial port connection. The manual of the scale is here:

http://www.precisa.com/download/en_320XB_Handbook.pdf

The scale has a RJ45 output and the pins are given in the manual (picture1)pins of the output

My RJ45 cable is of the type T568A, so i connected some of the pins directly to a R232 db9 according to the manual (picture2)pin to R232
Now, when i open Visa test panel to test my device. My values of baud, handshake etc are given in picture3values
When i write any command, for example a command for remote control (picture4)command it gives an error, when i read my command. So the question is : what is wrong ?.. Im writing that command, which gives the scale a dark display "\D\r\n", and when i press "write" the command changes automatically to "\r\r\n", and it says error after the reading process. Whats the problem ?
Ossi89Asked:
Who is Participating?
 
Davis McCarnConnect With a Mentor OwnerCommented:
From the manual (Page 56)
! NOTE: Each remote control-command must terminate with «CR» «LF»
They are buttons in your software; but, would have been sent by HyperTerminal automatically.
0
 
viki2000Commented:
In the chapter 5.7 and 5.12 of the user manual are some settings for your Precisa scale.
Did you make the requested settings?

Parallel with Labview I would try a simple RS232 terminal commands, only to see if the cable is OK and if the scale responds. Just use a ready made software, application, Labview example able to send/receive commands over serial port in order to make sure the hardware connections are OK. That would be the first step. Then you can focus on your Labview debugging.
0
 
Davis McCarnOwnerCommented:
According to the manual (page 38), the scale is either 600 or 9600 baud; 7 bits, even parity, & 1 stop bit, with no flow control by default.  Change your setting to no flow control and, if it doesn't work at 9600 baud, try 600.
Often, too, when the device is not exerting RTS or CTS properly, you need to jumper pins 1- 4-6 and 7-8 on the 9 pin end which fools the serial port into handshaking with itself and you then only use wires for RX, TX, and ground to the device end.
I would:
1) remove the handshake wires and jumper 1-4-6 and 7-8
2) use Hyperterminal at both 9600 and 600 baud, issuing that D--------<enter> command to see the scale display change to -------
3) If still no joy, jumper 2-3 on the 9 pin (removing the wires to the scale) which makes a loopback and anything you type in Hyperterminal had better be echoed right back to the window or something is wrong with the com port.
Here is an article on loopbacks and testing: http://www.ni.com/white-paper/3450/en
0
Worried about phishing attacks?

90% of attacks start with a phish. It’s critical that IT admins and MSSPs have the right security in place to protect their end users from these phishing attacks. Check out our latest feature brief for tips and tricks to keep your employees off a hackers line!

 
Ossi89Author Commented:
Hi Davis

What do you mean with "jumper" ?

/Osman
0
 
Davis McCarnOwnerCommented:
A short wire connecting the pins to each other.
0
 
Ossi89Author Commented:
But when i use the 232Analyzer as a testing software, it says CTS is Turned OFF, when i disconnet the RJ45 cable from the scale. When i connect it againt, it says CTS is Turned ON, so there must be a connection ?

I have uploaded a picture:
CTS
0
 
Davis McCarnOwnerCommented:
How about DCD (Data Carrier Detect) and DSR/DTR?  They must all be true for the com port to send data.
Read that article I posted before.
0
 
Ossi89Author Commented:
Sorry for my bad question, but as far as i understand, i have to make a wire, which connects pins 1-4-6 together, and i have to make another wire which connects pins 7 and 8 together. Tx, RX and Ground wires, goes directly to the device. I have uploaded a picture: Example
0
 
Davis McCarnOwnerCommented:
Yes; that's it!
0
 
Ossi89Author Commented:
When i press a button now, the scale sends data to the software, so there must now be connection, But when i'm writing the command to show the "-----" on the scale, the scale doesn't show that. Anything wrong with the procedure in the softsoftwareware ?
0
 
viki2000Commented:
Did you try other commands from user manual to see if the scale is responding?
0
 
Ossi89Author Commented:
Yes.. But it didn't respond :/.
0
 
viki2000Commented:
I noticed that if you send "Data sent: \D —\r\n " the the answer is " Data received: 032 032 032 032 032 032 032 032 032 QA8 046 048 048 032 103 013 010 "
And if you send "010 Data sent: 6," the the answer is the same " Data received: 032 032 032 032 032 032 032 032 032 QA8 046 048 048 032 103 013 010 "

That is important.

Could you try with other sets of commands to see if you receive the same answer?

Try for example "OFF" and "ON" functions to switch off and on the balance.
0
 
viki2000Commented:
Did you switch off "Precisa BUS" in chapter 5?
"To connect any Precisa BUS accessories switch the BUS to ON, else switch it OFF to have a normal RS232 communication."

In the RS232 analyzer software that you use, could you switch at RX the format in ASCII to see what you get as characters?


Then try by curiosity Hyper terminal connection from Windows to see what answer do you get.
0
 
viki2000Commented:
If I look at the ASCII table:
http://www.asciitable.com/
http://www.asciichart.com/

And I read the decimal response received in your RS232 software then is something like:
SPACE SPACE...9 times , then 0.0 SPACE g CR LF
That means a response, how else do you expect to obtain "g" for grams?
0
 
viki2000Commented:
What firmware do you have?
"for firmware Nxx factory setting is 600, for other firmware 9600"

Try also other parity:
PARITY 7-NO-2STOP
PARITY 8-NO-1STOP
by setting the scale and also the RS232 analyzer software.
0
 
Davis McCarnOwnerCommented:
Yes, I was going to suggest 9600 baud, too.
Is this a new scale or a used one?
If its new, the Precisa Buss is off and the only variable should be the baud rate.  If its used, you need to read chapters 4 and 5 in the manual so you can verify the scale's configuration.
0
 
Ossi89Author Commented:
Thanks for the answer. The Precisa bus setting is also confusing me. Because when i switch configuration settings in the menu of the scale, it skipping the "Precisa Bus settings" and goes directly from "Key tone" to "Language settings". I have written a mail to Precisa to days ago, but they didn't answer me.

When i press on the "Print" button on the scale, it sends all those numbers to the software, but when i write any command from the manual, there is no change on the display of the scale.

And yes. The scale has been used some years ago
0
 
Ossi89Author Commented:
DataThe first data line is, when there aren't something on the scale (0g).
When i place my iphone on the scale (135g) it gives the second line.
When i place my book (1800g) it gives the third line.

So there aren't something wrong with sending data from the scale to my computer, but the problem is those commands, which doesn't give any respond :(
0
 
Davis McCarnOwnerCommented:
Can I ask why you keep adding the \ to your commands?
D------- is what it says to send.
And, have you tried setting the Data Format (RX) to ASCII?
0
 
viki2000Commented:
In data format for Data Received (RX) could change to ASCII, so we see the characters and not decimal numbers?
0
 
Davis McCarnOwnerCommented:
I just pulled up my antique ASCII chart and you are communicating properly.
The third line is <space><space><space>+<space><space>1830.65<space>g<cr><lf>
0
 
viki2000Commented:
Exactly what I found in ID: 38353809 above.
0
 
Ossi89Author Commented:
Sorry for my late answer, but yes Davis. When i format the RX to ASCII i get:
RX (ASCII)
So it gives me the value of gram, the scale display shows (407,51).

Those commands still doesn't work, and i need it for my Labview projekt :(
0
 
Ossi89Author Commented:
And i get that data from my scale, when i press on the "print" button on the scale, it directly sends the data to my PC. But nothing happens, when i send any command from my PC
0
 
Ossi89Author Commented:
How do i find those button in HyperTerminal ?.. I have downloadet it now, and cant find those buttons
0
 
Ossi89Author Commented:
The problem is solved.. I didn't see thos buttons in RS232 analyzer.. Thanks for the help :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.