Skip to content

Latest commit

 

History

History

ScaleSample

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Interface to obtain weights from various scales on the market

At Sales | Resources | Scales must be provided the name of the assembly generated.

  1. Add a new reference to VndBE100
  2. Create a new class, that must inherit from VndBE100.IProxyBalanca
  3. This interface have the following implementations

Properties

Name Description
Status Scale status: You can take the values:

stable = 0, unstable = 1, invalid = 3

UltimoErro Number of the last error that occurred.

Methods

Name Description
Config

Configures the parameters of the balance.

For example, can be used to define the parameterization of the serial port and the communication protocols to be used.

DaDescritivoErro Returns the description of the last error occurred.
 DaPeso         

It reads the weight at the moment.

nRet will have immediate weight (not stable scale)

Returns TRUE if the weight is obtained successfully.

FALSE otherwise.

 DaPesoEstavel     

Makes the weight reading stable.

It has the same behavior as the previous function, except that the weight returned is stable.

tAmost = Sampling time for the weight to be considered stable in ms. This parameter is optional. Typically set to 3s (3000ms)

Some scales even have a flag that indicates that the weight is stable. In this case, this parameter must be ignored, and the balance flag must be used to obtain the stable weight.

 Inicializa     

Initialize the scale.

It is always invoked before any balance function is used.

Post = Post code of the POS.

Path is optional. This must be the application path (POS). It is essentially used to generate LOG files to control the DLL itself.

 Termina          

Stop using the scale.

All operations necessary to finish using the scale are placed here.

Returns TRUE if it succeeds.