02-17-2010 01:47 PM
I am using a myweigh ultraship u-2 scale for a sr project and i want to take the weight from the usb scale and place it into a string or numeric control. This scale will input the weight, once the send button is pressed, into a notepad file but I can not get it into the front pannel of labview. It will also insert the number into the top left corner of the front pannel as if it is renaming the file but when i click save the file name is still the previous one and not the weight. So does anyone know how possibly get this value into the front pannel somewhere? Also when using a numeric control it seems as if the number in the box is incremented when i click the send button but not as the weight only as an increment of 1 but if there is no value before hand in the numeric control then NaN appears, Not a Number.
Any help is appreciated THANKS!
02-17-2010 10:52 PM
How does this scale communicate? It is functioning as a virtual serial port? Or as a keyboard wedge (i.e. simulates a keyboard entry)? What send button are you talking about, something on the scale itself?
I don't understand your comments about the file name and previous vs. the weight. Perhaps you can post a screenshot of this behavior?
Likewise the part about incrementing the weight and and NaN.
Explain how this scale works. Perhaps post a link to its manual describing its communication protocol. A screenshot of the front panel behavior you are talking about, and also the VI itself where you are trying to communicate with this scale.
02-26-2010 09:32 AM
02-26-2010 10:02 AM
Yes. There are ways for LabVIEW to access Access. You can use ActiveX. There are database toolkits. But that is a long round-about way of getting a piece of data.
If Access is able to access the scale, then LabVIEW can do it directly. Answer the questions I posed in the previous message. Explain how you were able to get access to communicate with the scale. That will provide clues as to how LabVIEW can do the job directly.
03-04-2010 08:44 AM
I am not sure how the scale communicates with the computer. It is a usb connection and once connected I have an exe file from the manufacturer that "activates" the scale with the computer, so it can "see" it I guess.
ANd yes there is a send button on the scale.
When you have your front pannel open, at the top left it will display the file name, and when i press send from the scale it will place the weight in the top left where the fille name is. But after talking with ni and trying to grab the file name we determined that it was not actually naming the file, weird....
So all I want to do is have something in labview that tells the user to click send on the scale and then have the value of the scale appear on the front pannel. The only microsoft program it works with is Microsoft Access so I was hoping that there was some way the user can click "send" and then without them seeingmicrosoft access have access "see" that value and then "send" it over to my front pannel. But i dont know how to do this.....:(
03-04-2010 08:53 AM
ignite8891 wrote:The only microsoft program it works with is Microsoft Access so I was hoping that there was some way the user can click "send" and then without them seeing microsoft access have access "see" that value and then "send" it over to my front pannel. But i dont know how to do this.....:(
How is Access doing it? Did you write the code for Access or someone else? Are they using a macro, or a VB module, or something else? Is must be a part of a .mdb file, where did the Access database file come from?
As I said, if you are able to figure out how Access is accessing the scale, then you can replicate that in LabVIEW.
Without having the scale plugged in, look at Windows device manager. Look under Ports and any headings that are related to USB. Then plug the scale in and start working with it in Access. Check device manager again and see if it shows anything new under Ports or any USB related headings. This should tell you if it is acting as a virtual serial port or using some other communication mechanism.
03-04-2010 12:14 PM
The only thing i did with access was open a new database, placed my cursor in the field, and then clicked send on the scale which placed the value into the cell.
Now with the device manger i see that when the scale is plugged inthe usb port there is one addition to the device manager which is a Human Interface Device which then has HID-COMPLIANT DEVICE and USB INPUT DEVICE.
03-04-2010 01:37 PM - edited 03-04-2010 01:39 PM
It sounds like it is acting like a keyboard.
Try creating a string control on your front panel. Set the focus on the string control by clicking your mouse into it. (Basically like you are about to type something in without typing.) Then hit the Send button. Same thing like you are doing in Access, but with a string control on the front panel.
PS. You may want to enlarge the string control so that it can show you multiple lines, just in case the data that is being sent ends in a carriage return or linefeed.
03-04-2010 02:19 PM
as mentioned previously, your suggestion, does not work. I have already tried this in labview. no labview control, indicator, etc will display the value from the scale once the cursor is in that field and the send button is pressed from the scale.
03-04-2010 03:04 PM