LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Communication with Mettler Toledo XS 205

Solved!
Go to solution

Hey Guys,

 

I'm trying to setting up a serial communication between my PC and a Mettler Toledo micro balance (XS-205). The Balance is connected via a RS 232 cable to a TU-S9 USB adapter and then to the PC. I do see the port in the NI MAX and via the test panel I've set the configuration of the communication according to the ones of my balance:

 

BD rate: 9600

Bit\Parity: 8/none

StopBits: 1

Handshake: none

EndofLine: LF

CharSet: Ansi\Win                (only in the setting of the balance)

Continous mode: OFF           (                         "                    );

 

now the point is that if I try to query the command *IDN?\n I get as answer

1: Write Operation (*IDN?\n)

Return Count: 6 bytes

2: Read Operation
Return Count: 17 bytes
S\sS\s\s\s-0.0006\s\sg\n

with an error in the return data (Hex 0xBFFF006C). I've also tried to use the script provided by the NI website for Mettler-Toledo balances but I don't get any data and at the end of the routine I get the error VISA:  (Hex 0xBFFF0015) Timeout expired before operation completed.

 

Anyone as a clue of what's going on? Thanx a lot for the help 😄

 

Cheers!

0 Kudos
Message 1 of 6
(7,448 Views)

Hello,

 

The command from MAX seems correct, every time you send this command, it automatically asks for a reply from the instrument.

 

In your case, you are receiving  -0.0006g.

 

About the error code, check this link.

Guilherme Correa
0 Kudos
Message 2 of 6
(7,431 Views)

Actually, the 17 characters you received were "S S   -0.0006  g" + an End-of-Line character.  The "S S " is "Mettler-speak" for a stable balance reading.

 

The Balance appears to be running in its "reporting" mode, sending you readings.  You tried to give it a command, and it didn't respond.  It's been a while since I wrestled with these devices, but I have a colleague who still is using them -- I do seem to remember that getting them initialized properly was a bit of a trick ...

 

It would be very helpful if you post the code (not a picture, but the VI or a LabVIEW Snippet of it) so we can compare it to code we might be using (or spot the input parameter you forgot to specify).

 

Bob Schor

0 Kudos
Message 3 of 6
(7,421 Views)
Solution
Accepted by topic author VinnieETH

Thanks guys for the prompt answers.

 

my mistake. Mettler Toledo Balances do not accept the standard SCPI commands but they have their own standardized command set.

 

Thanks anyway 😉

 

0 Kudos
Message 4 of 6
(7,383 Views)

i still stuck on the code

please help.

the codes are

--------------------

 

serialPortObj.ReadTimeout =7000;

...

serialPortObj.Write("*IDN?\n");

res = serialPortObj.ReadExisting();

 

-------------------

res is empty, 

please.

0 Kudos
Message 5 of 6
(733 Views)

1) This is not a LabVIEW question so don't post in this forum

2) The post before yours indicates that Mettler Toledo balances have their own specific commands and don't work with SCPI commands. Therefore consult your Programming Reference Manual for your device and use the commands documented in there.

3) Appending a "me too" post to a thread that is 8 years old and marked resolved is pretty useless.

4) This looks like one of those nonsense posts where someone copies something looking like a legitimate post from some place like Reddit or Stack Overflow just to post something. Why?

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 6
(715 Views)