4. Lp object

Lp object allows to communicate with CAS LP-15 electronic scales via serial interface.

Note

For more information please refer to the scales manual

The members of the Lp class (in alphabetical order, Visual Basic notation):

4.1. Connect

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

4.2. Disconnect

Sub Disconnect()

Disconnect from the scales.

Parameters: -

Return value: -

4.3. ExpDate

Property ExpDate As String

Date of lifetime expiration for the goods (not yet implemented).

4.4. GetState

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

4.5. GoodsCode

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.

4.6. GoodsKind

Property GoodsKind As Integer

Not implemented (only for compatibility with Vpt object). Always returns 0.

4.7. GoodsNumber

Property GoodsNumber As Long

The goods number stored in the scales (PLU). The range of numbers for CAS LP scales model is 1..3999.

4.8. GoodsPrice

Property GoodsPrice As Double

Price for the goods.

4.9. GroupCode

Property GroupCode As Long

Group code for the goods. The range of group codes for CAS LP scales model is 0..999999.

4.10. Life

Property Life As Integer

Lifetime (in days) for the goods.

4.11. Message

Property Message As Integer

Message number for the goods. The range of message numbers for CAS LP scales model is 0..1000.

4.12. Name1

Property Name1 As String

The name of the goods, first line. The maximum length of this string is 28 characters.

4.13. Name2

Property Name2 As String

The name of the goods, second line. The maximum length of this string is 28 characters.

4.14. Receive

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

4.15. ScalesNum

Property ScalesNum As Byte

Not used. For compatibility with earlier versions only.

4.16. Send

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

4.17. StateDualRange

Property StateDualRange As Integer

Dual range mode =1:on, =0:off.

4.18. StateItem

Property StateItem As Integer

Goods number (PLU) currently weighed.

4.19. StateOverload

Property StateOverload As Integer

Overload, =1:true, =0:false.

4.20. StatePrice

Property StatePrice As Double

Goods price for kilogram or pound (depends on your locale).

4.21. StateStableWeight

Property StateStableWeight As Integer

The weight is stable, =1:true, =0:false.

4.22. StateTareMode

Property StateTareMode As Integer

Tare selection mode is =1:on, =0:off.

4.23. StateValue

Property StateValue As Double

The total cost for the currently weighed goods.

4.24. StateWeight

Property StateWeight As Double

The absolute weight for the currently weighed goods.

4.25. StateWeightSign

Property StateWeightSign As Integer

Weight sign, =1:minus, =0:plus.

4.26. StateZeroWeight

Property StateZeroWeight As Integer

Zero weight, =1:true, =0:false.

4.27. Tare

Property Tare As Integer

Tare weight for the goods item.