Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Weighing scale + Serial Port

Solved!
Go to solution

Hello,

 

I'm trying to read and work with weight values from an Ohaus scout pro scale connected thru the serial port, so far I'm only able to concatenate the string sent by the scale and display it on the front panel.

 

The purposes of my application is to weight 10 items and calculate the average weight which will then serve as a reference in order to detect further items outside 2 standard deviations from the average but I'm stuck trying to get the scale data inside an array. I've read several posts where the build array, spreadhseet string to array, while loop, for loop and shift registers are mentioned but I haven't been able to figure out how to put everything together to make it work. I'm posting an image from what I have so far, as you can see I'm only able to fill the first cell of the array which then is replaced with the subsequent scale reading.

 

Thanks in advance for your help.

 

Alberto. 

0 Kudos
Message 1 of 7
(3,230 Views)
What you have makes little sense. If the balance send a termination character, you should use that and not the Bytes at Serial Port. You are getting a single value so just convert that to a scalar. The Spreadsheet String to Array would not be used. Just add the scalar to a shift register like you do the string.
0 Kudos
Message 2 of 7
(3,208 Views)

Hi Dennis,

 

Thank you for you prompt response. 

 

I'm just starting with Labview so I might not get what you mean at the first time. I deleted what I have and used the Frac/Exp string to number function to convert the string to number which I then connected to the shift register on a while loop, inside the while loop I used the build array function and that's how far I got...can you please again point me to right direction?

 

Regards,

 

Alberto.

0 Kudos
Message 3 of 7
(3,193 Views)
No, not at all. The shift register belongs on the outer loop. The build array needs two inputs - one for the shift register input and one for the new value.
0 Kudos
Message 4 of 7
(3,185 Views)
Solution
Accepted by a_ayala51

 

Finally I make it work, every time bytes at port are detected the value coming from the scale enters de case structure, then the build array and the FOR loop take care of the rest. I hope this can help someone else strugling like I did to save some time. 

 

Regards,

 

Alberto.

 

 

ohaus_scale.jpg

 

 

Message 5 of 7
(3,139 Views)

hey alberto, i hope you get this since youve uploaded 4 years ago Smiley Happy... im working on a project for my university and i saw your work. impressive, but i want to ask you if this connection works for DAQ assistant or not and how i can work it out? if you remember.. thanks a lot 

0 Kudos
Message 6 of 7
(159 Views)
Highlighted

@NedalAbuzaid wrote:

hey alberto, i hope you get this since youve uploaded 4 years ago Smiley Happy... im working on a project for my university and i saw your work. impressive, but i want to ask you if this connection works for DAQ assistant or not and how i can work it out? if you remember.. thanks a lot 


DAQ Assistant is only useful for NI DAQs.  So no.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Message 7 of 7
(151 Views)