LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mettler Toledo PG5001-S Balance

Hi has anyone developed a VI for a Mettler Toledo PG5001-S Balance? I've tried the other Mettler balance drivers/vi's but no luck.
 
Thanks
Giuseppe
0 Kudos
Message 1 of 9
(4,581 Views)

Hi there,

I'm afraid all the drivers that have been produced by NI (or by other customers) have been placed on the www.ni.com/idnet page.

All I can suggest is creating your own driver for that specific balance.  Hopefully you will have the full manual with all the appropriate commands for the device.  Here are some tutorials that will help you get started.  I would also suggest looking at the instrument I/O Assistant.

http://www.ni.com/devzone/idnet/ - Here you can at the top of the page request that NI look into developing the driver.  If we have enough interest then we tend to try and develop one.

http://zone.ni.com/devzone/cda/tut/p/id/4359 - Instrument Fundamentals

http://www.ni.com/swf/presentation/us/labview/projinstdrv/ - Tools for developing drivers

http://www.ni.com/devzone/idnet/development.htm - Development help

Sorry I couldn't be of further help in this matter

Thanks

AdamB

Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 2 of 9
(4,547 Views)

I have written a driver for a Mettler Toledo balance in the past and it was not too difficult a simple serial enterface.  I cant post the code beacuse it belongs to the client.  What is the comunication interface?  I used a few visa calls and had the balance communicating with little problems.  I did not find a posted driver however. 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 3 of 9
(4,541 Views)

I've attached what I've got so far, it seems however that no matter what command and/or terminating character I put in it only ever reads the weight?

Thanks

0 Kudos
Message 4 of 9
(4,535 Views)
You are not sending any termination character. You are sending the text '\' and then 'r'. Right click on the string constant and select '\' Codes Display. Then you can reenter the \ character you want.
0 Kudos
Message 5 of 9
(4,532 Views)

Have you tried to prototype it in hyperterminal.  I like to validate my serial communication before I write the drivers.  this way I can quickly validate the command set.

 

paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 6 of 9
(4,525 Views)

Does the balance stream back the weight or just reply to a query?  If you are reading weight even though you did not send the correct querry termination makes me think this model sends back the weight continiously.  If this is the case the nice way to communicate with a device like this is to read all characters, store them in in a shift register (string) and parse the string for a valid weight string, return the last valid weight.  Call this vi peridically ( depend on how fast the data stream is) to avoid visa buffers from filling.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 7 of 9
(4,522 Views)
Hi, yes the balance streams back regardless of what visa/terminating characters I use, infact I can even leave it blank and it still reads the current weight. I only really want to use a few commands, read, tare and change units.
 
Thanks
0 Kudos
Message 8 of 9
(4,519 Views)

Look at the action engine architecture.  Your actions are

Initialize - opens visa sets com port stores visa session in shift reg.

Close - closes visa session

Start read - clears input buffer, clears shiftregister string buffer, sends start read command

Stop read -sends stop read command

Tare - Sends the read command (dont do this durring streaming of data)

Read - reads all bytes at port, concatinates it th the string buffer (Shift register) this buffer should then be parsed for last complete waight string and the weight and unit returned.

 

In your application you should initialize and start stream, then call read fast enough to avoid the buffers from overloading on the Visa side.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 9 of 9
(4,514 Views)