Lp
object allows to communicate with CAS LP-15 electronic scales via serial interface.
For more information please refer to the scales manual
The members of the Lp
class (in alphabetical order, Visual Basic notation):
Function Connect(hostname As String, portnum As Integer) As Integer
Connect to the scales.
Parameters: hostname
- not used (any string); portnum
- serial port number
Return value: 1 - successful, 0 - failed
Property ExpDate As String
Date of lifetime expiration for the goods (not yet implemented)
.
Function GetState(pScales As Integer) As Integer
Get current state of the scales. After the function execution state parameters can be read from properties StateDualRange, StateItem, StateOverload, StatePrice, StateStableWeight, StateTareMode, StateValue, StateWeight, StateWeightSign and StateZeroWeight.
Parameters: pScales
- scales number
Return value: 1 - successful, 0 - failed
Property GoodsCode As Long
Code for the goods. Usually it means the code assigned to this goods item in your business software. The range of codes for CAS LP scales model is 0..999999.
Property GoodsKind As Integer
Not implemented (only for compatibility with Vpt object). Always returns 0.
Property GoodsNumber As Long
The goods number stored in the scales (PLU). The range of numbers for CAS LP scales model is 1..3999.
Property GroupCode As Long
Group code for the goods. The range of group codes for CAS LP scales model is 0..999999.
Property Message As Integer
Message number for the goods. The range of message numbers for CAS LP scales model is 0..1000.
Property Name1 As String
The name of the goods, first line. The maximum length of this string is 28 characters.
Property Name2 As String
The name of the goods, second line. The maximum length of this string is 28 characters.
Function Receive(pScales As Integer, pItem As Long) As Integer
Recieve goods item data from the scales. All received data are stored in the properies GoodsCode, GoodsKind, GoodsNumber, GoodsPrice, GroupCode, Life, Message, Name1, Name2, Tare.
Parameters: pScales
- scales number (programmed internally in scales); pItem
- goods item number (1..3999)
Return value: 1 - successful, 0 - failed
Function Send(pScales As Integer, pItem As Long) As Integer
Send goods item data to the scales. All sending data are taken from the properies GoodsCode, GoodsKind, GoodsNumber, GoodsPrice, GroupCode, Life, Message, Name1, Name2, Tare.
Parameters: pScales
- scales' number (programmed internally in scales); pItem
- goods item number (1..3999)
Return value: 1 - successful, 0 - failed
Property StatePrice As Double
Goods price for kilogram or pound (depends on your locale).
Property StateStableWeight As Integer
The weight is stable, =1:true, =0:false.