From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to capture data from a weighing machine into labview?

I have created a VISA application VI which will take the input from labview using serial communication from RS 232, i want to capture the exact weight of the box and enter it into my excel sheet, i have to also check if the box is less than 20kg. Now the problem is, when i put the box it gives me data ranging between 0 to 20kg but how do i capture the box exact value and enter it directly into excel.

 

kindly help me..

Message 1 of 10
(5,312 Views)

Range is 0-20Kg but the value you are getting will be read weight value. What is the problem? reading the weight  or writing the value to excel?

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 2 of 10
(5,308 Views)

writing the value, as the how will labview know that thbox weight  is 12 kg or smothing else, as it will read value from 0 till the box is placed and the again from the value to 0 after it is removed

0 Kudos
Message 3 of 10
(5,301 Views)

 

@naman25 wrote:

writing the value, as the how will labview know that thbox weight  is 12 kg or smothing else, as it will read value from 0 till the box is placed and the again from the value to 0 after it is removed


 

You see, weight machine with serial interface will send the weight if any weight is kept on it...You need to write the value accordingly.

 

for testing purpose. make simple VI with 10 sec timeout and check the value it send

 

As you said weight machine with RS232 right?

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 4 of 10
(5,298 Views)

Also you need to understand the format in which weight machine send the data(weight). Different manufacturer write differently. 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 5 of 10
(5,295 Views)

yes the weighing machine is connected with RS232. i try doing that, if i still get a problem i will revert back to you.

0 Kudos
Message 6 of 10
(5,294 Views)

Then come back with your VI(2011)

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 7 of 10
(5,288 Views)

Your post contains a number of issues, and it isn't clear to me which are important to you.  I can identify the following themes/questions:

  1. How to interact with a balance using a serial interface.
  2. How to save data into an Excel Workbook.
  3. How to decide when the weight is "stable" and should be saved.

LabVIEW can handle all of these.  Here are some suggestions to get you started.

 

  1. The balance's manual should tell you about the codes you need to send to get the Balance to do useful things  You can test the Balance using MAX, which will allow you to send a command string to the Balance (and test that you have the serial parameters, such as Baud rate, parity, etc. configured correctly) and read back the results.  Once you "know the code", you can easily program the VISA functions.
  2. The Report Generation Toolkit greatly simplifies writing and reading Excel Workbooks.
  3. Some balances (I'm thinking of Mettler) will output a code that says that the reading is "stable".  This means that the balance's internal processor has decided that the weight isn't changing, but this doesn't mean that there's a sample on the scale (an empty balance is also "stable").  I'm not sure about the nature of your application, but you might consider a push-button Front Panel control saying "Save Weight" that the user pushes when there's a sample on the balance and you want to record and save it.  Alternatively, if there is some automated machine that puts things on the balance and then removes them, you could let the machine tell you when a sample is in place.

Bob Schor

 

Message 8 of 10
(5,243 Views)

Hey, did you ever got to figure out what your problem was? I'm kind of trying to do the same thing and I was wondering if by any chance you have a template to connect a weight scale into labview? Thanks beforehand!

0 Kudos
Message 9 of 10
(4,596 Views)

Dreamheart,

 

     The Original Poster's message was more than three years ago, and he/she hasn't been back to the Forum since a few months after the message was posted.

 

     If you are trying to do the same thing, have some LabVIEW code that isn't working, or want someone to do your work for you,  I recommend you start a new Post, create a new Appropriate Title, and post your code (with all of the sub-VIs that you may have written to support key functions, like handling VISA communications with the balance, etc.).

 

     A number of the Regular Forum Participants have some experience with using LabVIEW to collect measurement data and are happy to help "train the next generation".

 

Bob Schor

0 Kudos
Message 10 of 10
(4,580 Views)