Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting the pounds
Message
From
25/11/2000 17:56:22
 
 
To
25/11/2000 16:48:09
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00445402
Message ID:
00445419
Views:
17
>Greetings dear friends.
>I am writing them in this opportunity with the intention of requesting their valuable collaboration.
>At the moment I am converting a system made in foxpro 2 to visual foxpro; this system manages scales to take the weight of the products that they are sold. These scales can be big or small depending on the quantity of products.
>Will have some of yours a function, does it program or does librery to get the weight give you my system and then to manipulate it according to my necessities.?

There is no generic solution, or common API can be programmed to; each different scale probably has its own, unique interface and command structure. There's no single soltuion. I tend to use scales with simple serial interfaces that I can poll on demand (issue a query to the scale hardware and retrieve the current weight information as a reply; the functionality to do this varies from scale to scale, and in some cases, isn't handled in this fdashion - the scale reports a weight as a single packet to the interface when it becomes stable, and it's the application's responsibility to keep track of the last reported weight.

You need to specify the hardware to determine it's interface; each scale usually comes with documentation on how it operates, what needs to be done as far as connecting it, providing other functionality than just reading weight (ie determining the range of values and precision, zeroing the scale to properly reflect the weight when nothing is on it, to allow for things like packaging material, containers, and mounting conditions.

I've done a considerable amount of work with interfacing scale hardware to a VFP app; the best generic advice I can give you is to either select a single product and implement support for that specific product, or to provide a common class interface, a set of functions and common data properties that are used by the VFP app regardless of which actual hardware is attached, and then develop your own interface classes for each different piece of hardware to support this interface. Supporting a new scale then becomes a matter of creating the class which implements that interface for the specific scale being used.

Other than this generic advice, I can't be of any help beyond this. I can tell you that the approach of programming to a common virtual interface will offer the app the ability to support a wider range of hardware, but doing this will result in your not taking advantage of specific capabilities of one particular product.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform