- Join the library:
To register, use the command library“regsvr32 путь/имя_библиотеки.dll”
- Methods and Properties
The library contains a single class Cas_AD_AP Scale. In the class Scale are the following methods and properties:
Connect( number_of_port, timeout );
Makes connection with weights.
number_of_port: an integer from 0 to 255, the number com port for communicating with weights.
Timeout: integer weights while waiting for a response in milliseconds. If there is a zero timeout installed by default.
Disconnect();
Closes the connection with weights.
Update();
Receives data from the balance and updates the properties: Cost, Price, Weight, Stable.
UpdateOnlyWeight();
Receives data from the balance and updates the properties: Weight, Stable.
Weight – weight returns.
Stable – returns 1 if the balance is stable.
Price – returns the price, if the balance is maintained.
Cost – returns a value, if the balance is maintained.
- Processing Example 1C:
Example is in the file sapmle1C.ert
- EXAMPLE language C#:
try
{
Cas_AD_APlib.ScaleClass scale;
scale = new CasAD_AP_DB_EMLib.ScaleClass();
scale.Connect(1, 0);
}
catch(Exception e)
{
MessageBox(e.ToString());
}
Try
{
scale.UpdateOnlyWeight();
}
catch(Exception e)
{
MessageBox.Show(“Не удается прочитать данные!”);
}
scale.Disconnect();
Sincerely, Ilya Nesterov programmer CAS .
This email address is being protected from spambots. You need JavaScript enabled to view it. (495)7880408
Log in using your account to ..., or simply fill in the required fields: