[Go to site: main page, start]

0% found this document useful (0 votes)
8 views29 pages

CAS Java Communication Library Guide

The CAS Communication Library for Java 1.0.16 provides a framework for communicating with CAS label scales, detailing necessary files, transfer procedures, and various packages. It includes classes for sending data to scales, receiving results, and defining parameters for communication. The document outlines specific methods for setting and deleting PLU data, as well as other functionalities related to data transmission and scale configuration.

Uploaded by

gereltod.telmen
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views29 pages

CAS Java Communication Library Guide

The CAS Communication Library for Java 1.0.16 provides a framework for communicating with CAS label scales, detailing necessary files, transfer procedures, and various packages. It includes classes for sending data to scales, receiving results, and defining parameters for communication. The document outlines specific methods for setting and deleting PLU data, as well as other functionalities related to data transmission and scale configuration.

Uploaded by

gereltod.telmen
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

CAS Communication Library

For Java 1.0.16


2021-01-26

Contents

1. CAS Java Library 5


1.1 Necessary file 5
1.2 Transfer procedure 5
2. Packages 6
2.1 [Link] 6
2.1.1 EmActionType 6
2.1.2 EmDataType 6
2.1.3 EmCommType 6
2.1.4 EmScaleModel 6
2.1.5 ScaleType 7
2.1.6 CommState 7
2.2 [Link] 7
2.2.1 Class [Link] 7
2.3 [Link] 8
2.3.1 Class [Link] 8
2.3.2 Class interface [Link] 8
3. Parameter properties of function 9
3.1 scaleEnv 9
3.2 scaleInfo 10
3.3 resultReceive 10
3.4 WorkResult 10
4. Set Data transmission 10
4.1 Version Info 10
4.1.1 Set Version Info 10
4.2 PLU Data 11

㈜ CAS
4.2.1 Set PLU 11
4.2.2 Delete PLU 14
4.2.3 Delete all PLU 15
4.3 Parameter 16
4.3.1 Set Parameter 16
4.4 Keypad 18
4.4.1 Set Keypad 18
4.5 Ingredient 30
4.5.1 Set Ingredient 30
4.5.2 Delete Ingredient 31
4.5.3 Delete all Ingredient 32
4.6 Symbol 33
4.6.1 Set Unit Symbol 33
4.6.2 Delete Unit Symbol 34
4.6.3 Delete all Unit Symobl 35
4.7 Label 36
4.7.1 Set Label 36
4.8 Weight (Only Vietnam) 37
4.8.1 Set weight transmission property 37
5. How to check Result 39
5.1 Make the class to receive the result 39
5.2 How to Check result 39

2
1. CAS Java Library
1.1 Necessary file
To operate a program to communicate with CAS label scale, five file with application
program must be existed in the same route.
A. Java Library (JRE System Library)
a. JavaSE-1.7
B. Java Library (JRE System Library)
a. [Link]
C. Other external libraray
a. [Link]
b. [Link]
c. [Link]
d. [Link]

1.2 Transfer procedure


step Work Class / Interface Method
1 Make data to send
2 Send data CasCommLib sendToScale
3 Check Result ResultReceive setResultData

2. Packages

3
2.1 [Link]
2.1.1 EmActionType
Element Code Description
Send 1 Send data to scale
SendAll 2 Send all data to scale
Take 3 Take data from scale
TakeAll 4 Take data from scale
Delete 5 Delete data
DeleteAll 6 Delete all data

2.1.2 EmDataType
Element Code Description
Keypad 3 Keypad
PLU 11 PLU
Symbol 21 Symbol
Ingredient 22 Ingredient
VersionInfo 58 Version Information
Parameter 1004 Parameter

2.1.3 EmCommType
Element Code Description
COMMTYPE_TCPI Tcp Tcp/Ip communication
P
COMMTYPE_SERI Serial Serial communication
AL
COMMTYPE_FTP Ftp Ftp communication

2.1.4 EmScaleModel
Element Code Description
CL5000 5000
CL5000J 5010
CL5200 5200 In china, It is called CL3000
CL5200J 5210
CL5500 5500
CL7200 7200

2.1.5 ScaleType
Element Code Description
Bench 1 Bench type
Pole 2 Pole type

2.1.6 CommState
Element Code Description
FAIL 0 Fail transmission
SUCCSESS 1 Success transmission
CONNECTION_ERRO 2 Fail connection
R
SCALE_ERR_CHECKS 217 Checksum is wrong
UM
PACKET_ERR_WRON 501 Packet is wrong
G

4
2.2 [Link]
2.2.1 Class [Link]
: You can send data to a scale using this class
(1) Constructor
Description
CasCommLib()
: Create object and initialize member
Default properties file path : INSTALL_PATH + props/[Link]
CasCommLib(String propFilePath)
: Create object and initialize member
Parameter:
propFilePath : path of “[Link]”

(2) Method
Type Method and Description
void sendToScale(Map<String, String> scaleEnv, Object sendData,
Map<String, String> scaleInfo, ResultReceive resultReceive)
: Send data to a scale.
Parameter:
scaleEnv : Environment Information of this communication
work.
sendData: Data to transfer
scaleInfo : Scale Information
resultReceive : Class to receive the communication result

*Refer : 4. Set Data transmission


Return:

2.3 [Link]
2.3.1 Class [Link]
: There are definitions used in this library. Refer to provided source code

2.3.2 Class interface [Link]


: You can receive the communication result using the class which implements this
interface

(1) Constructor
Method and Description
ResultReceiveData()
: Create object and initialize member

5
ResultReceiveData(IRepeat repeatCallback)
: Create object and initialize member and repeat callback method
Parameter:
repeatCallback: interface of IRepeat. It has repeat method

(2) Method
Type Method and Description
void setResultData(Map<String, String> scaleEnv, int workResult,
List<Map<String, String>> resultData, Object obSendList,
Map<String, String> scaleInfo)
: Receive the communication result through this method
Parameter:
scaleEnv : Environment Information of this communication work.
workResult: Result of this communication work
resultData : Detail result
obSendList : Data you tried to send
scaleInfo : Scale Information

*Refer : 5. How to check Result

3. Parameter properties of function


3.1 scaleEnv
(1) Type: Map<String, String>
(2) Map Key
Refer [Link] class
key string Field in class Description
Action MK_ACTION Set action type
Refer : 2.1.1 EmActionType
DataType MK_DATATYPE Set data type
Refer : 2.1.2 EmDataType
SubType MK_SUBTYPE Not use yet
Encoding MK_ENCODING Language character set name for
translation
Ex, Korea : MS949
China : MS936(windows) or EUC-
CN(unix)
CommType MK_COMMTYPE Communication Type
Refer : 2.1.3 EmCommType

3.2 scaleInfo
(1) Type: Map<String, String>
(2) Map Key
Refer [Link] class
key string Field in class Description
Ip MK_IP Set scale IP
Port MK_PORT Set scale port (20304)
Model MK_MODEL Set scale model code
Refer : 2.1.4 EmScaleModel
ScaleType MK_SCALETYPE Set scale type

6
Refer : 2.1.5 ScaleType
Version MK_VERSION Firmware Version of the Scale

3.3 resultReceive
(1) Type: interface ResultReceive
: You should input the class which implements the ResultReceive Interface to this
parameter.
You can receive the communication result through this parameter
3.4 WorkResult
(1) Type: int
: You can confirm the information of each communication result through this
parameter
Refer [Link] to check Result

4. Set Data transmission


To transmit data, you use [Link]() function. You must configure
parameter for use. Data type of sending data will be list of map.
4.1 Version Info
4.1.1 Set Version Info
(1) Set scaleEnv property
key string Value string Description(refer enum)
Action 3 [Link]()
DataType 58 [Link]()
Encoding MS936 Depending on Language
or Ex) for china
EUC-CN -“MS936“ for windows
-“EUC-CN“ for unix/linux
CommType Tcp EmCommType.COMMTYPE_TCPIP.getCom
mType()

(2) Set ScaleInfo Property


key string Value string Description(refer enum)
Ip Scale IP
Port 20304 Scale Port
Model 5200 Depending on Scale Model
Ex) “5200“ for CL3000
[Link]()
ScaleType 2 Depending on Scale Type
1 : [Link]
2 : [Link]
3 : [Link]
4 : [Link]
5 : [Link]
6 : Scaletype.LP1
[Link]()
(3) Set sendData
You don’t need to put any data to the list.

4.2 PLU Data


: You should keep the input range when you set Data. You should calculate the Byte
number of string in local encoding system when you input string field.
Ex) ‘苹果‘ is 2 charter string, but 4 byte in MS936 encoding or EUC-CN encoding)

7
4.2.1 Set PLU
(1) Set scaleEnv property
key string Value Description(refer enum)
string
Action 1 [Link]()
DataType 11 [Link]()
Encoding MS936 Depending on Language
or Ex) for china
EUC-CN -“MS936“ for windows
-“EUC-CN“ for unix/linux
CommType Tcp EmCommType.COMMTYPE_TCPIP.getCom
mType()
decimalPointPric 2 Price decimal point(0 ~ 5)
e In China, the decimal point is 2 digits

(2) Set scaleInfo property


key string Value string Description(refer enum)
Ip Scale IP
Port 20304 Scale Port
Model 5200 Depending on Scale Model
Ex) “5200“ for CL3000
[Link]()
ScaleType 2 Depending on Scale Type
1 : [Link]
2 : [Link]
3 : [Link]
4 : [Link]
5 : [Link]
6 : Scaletype.LP1
[Link]()

(3) Set sendData


a. type : List<Map<String, String>>
b. Data
: Make a Map per one PLU and input into the List
Map information is below for one PLU
c. Add Field you want to send
key string Description Sample string
departmentNo Input 1 1
pluNo *Necessary
Must be less than
“999999“
pluType 1: BY-weight
2: BY-count
3: BY-pcs
pluName1 Data length(byte) must
be less than 54 byte
Ex)
苹 果 is 2 charter string,
but 4 byte in MS936
encoding or EUC-CN)

pluName2 Must be less than 54


byte
pluName3 Must be less than 54
byte
8
extBarcode
auxLabelNo
originNo
fixWeight
prefix
itemCode
priceType 0: Normal Price
1: Fixed Price
unitPrice Must be less than Enter 2 digits of decimal point
Ex) 300.00
“999999“
specialPrice
taxNo
tareWeight
percentTare
percentTareLimit
barcodeNo2
pictureNo
produceDate
packedDate
packedTime
sellbyDate
sellbyTime
cookbyDate
ingredientNo
Plu Type Must be less than “9”
saleMsgNo
referencePluNo
couplePluNo
linkPluNo1
linkPluDept1
linkPluNo2
linkPluDept2
pictureFileName PLU Image File name
Input just file
name(exclude path)
TracabilityURL Must be less than 128
Byte
TraceabilityCode Must be less than 20
Byte

4.2.2 Delete PLU


(1) Set scaleEnv property.
key string Value string Description(refer enum)
Action 5 [Link]()
DataType 11 [Link]()
Encoding MS936 Depending on Language
or Ex) for china
EUC-CN -“MS936“ for windows
-“EUC-CN“ for unix/linux
CommType Tcp EmCommType.COMMTYPE_TCPIP.getCom

9
mType()

(2) Set scaleInfo property


key string Value string Description(refer enum)
Ip Scale IP
Port 20304 Scale Port
Model 5200 Depending on Scale Model
Ex) “5200“ for CL3000
[Link]()
ScaleType 2 Depending on Scale Type
1 : [Link]
2 : [Link]
3 : [Link]
4 : [Link]
5 : [Link]
6 : Scaletype.LP1
[Link]()

(3) Set sendData


a. type : List<Map<String, String>>
b. Data
:Make a Map for the PLU and input into the List
Map information is below for the PLU
key string Description Sample string
departmentNo 1
pluNo *Necessary
Must be less than
“999999“

4.2.3 Delete all PLU


(1) Set scaleEnv property.
key string Value string Description(refer enum)
Action 6 [Link]()
DataType 11 [Link]()
Encoding MS936 Depending on Language
or Ex) for china
EUC-CN -“MS936“ for windows
-“EUC-CN“ for unix/linux
CommType Tcp EmCommType.COMMTYPE_TCPIP.getCom
mType()

(2) Set scaleInfo property


key string Value string Description(refer enum)
Ip Scale IP
Port 20304 Scale Port
Model 7200 Depending on Scale Model
Ex) “7200“ for CL7200
[Link]()

(3) Set sendData


You don’t need to put any data to the list
.

10
4.3 Parameter
4.3.1 Set Parameter
(1) Set scaleEnv property
key string Value string Description(refer enum)
Action 1 [Link]()
DataType 3 [Link]()
Encoding MS936 Depending on Language
or Ex) for china
EUC-CN -“MS936“ for windows
-“EUC-CN“ for unix/linux
CommType Tcp EmCommType.COMMTYPE_TCPIP.getCom
mType()

(2) Set scaleInfo property


key string Value string Description(refer enum)
Ip Scale IP
Port 20304 Scale Port
Model 5200 Depending on Scale Model
Ex) “5200“ for CL3000
[Link]()
ScaleType 2 Depending on Scale Type
1 : [Link]
2 : [Link]
3 : [Link]
4 : [Link]
5 : [Link]
6 : Scaletype.LP1
[Link]()

(3) Set sendData


a. type : List<Map<String, String>>
b. Data
: Make a Map for the Parameter and input into the List
Map information is below for the Parameter
key string Description Sample string
● Parameter ID Parameter ID 573 : Allow Unit Price
Change
Parameter
Value 1: YesID0 : No Value
Use global label 1051 1: Yes 0 : No
PLU Label No. 1052 Label Number
4.4 Keypad
4.4.1 Set Keypad
(1) Set scaleEnv property
key string Value string Description(refer enum)
Action 1 [Link]()

11
DataType 3 [Link]()
Encoding MS936 Depending on Language
or Ex) for china
EUC-CN -“MS936“ for windows
-“EUC-CN“ for unix/linux
CommType Tcp EmCommType.COMMTYPE_TCPIP.getCom
mType()

(2) Set scaleInfo property


key string Value string Description(refer enum)
Ip Scale IP
Port 20304 Scale Port
Model 5200 Depending on Scale Model
Ex) “5200“ for CL3000
[Link]()
ScaleType 2 Depending on Scale Type
1 : [Link]
2 : [Link]
3 : [Link]
4 : [Link]
5 : [Link]
6 : Scaletype.LP1
[Link]()

(3) Set sendData


– The Keypad can be configured with Function and PLU. To transmit the PLU,
the function Key must first be transmitted.

– The keypad consists of a normal and shift key. The PLU key can set both
normal key and shift key. On the other hand, the function key is set only for
the normal key.

12
The following picture is a KeyV1(Value Obejct) class diagram.

– The configuration of arrPLUCategory is as follows.

13
– There are five PLU Categories. There are five pages in one category. The
page1 for the normal keypad and the page2 is for the shift keypad.
– The configure of arrFunctionPage is as follos.

– The function page1 for the normal keypad and the page2 is for the shift
keypad.
– How to assignfunction key.
– To assign a function key to the first key.
1. Set the desired category.
2. Set function key send.
3. Set page, key, code.

14
– How to assign PLU key
– To assign a function key to second key.
1. Set the desired category
2. Set function key send
3. Set PLU key send.
4. Set category, page, key, code

Table 1. Function Key


Function Key Value Description(refer enum)
C 0x000B FunctionKeyGeneralCode_CN.[Link]()
Shift 0x000C FunctionKeyGeneralCode_CN.[Link]()
Tare 0x000F FunctionKeyGeneralCode_CN.[Link]()
Print 0x0015 FunctionKeyGeneralCode_CN.[Link]()
Feed 0x0016 FunctionKeyGeneralCode_CN.[Link]()
X 0x0026 FunctionKeyGeneralCode_CN.[Link]()
Num0 0x0028 FunctionKeyGeneralCode_CN.[Link]()
Num1 0x0029 FunctionKeyGeneralCode_CN.[Link]()
Num2 0x002A FunctionKeyGeneralCode_CN.[Link]()
Num3 0x002B FunctionKeyGeneralCode_CN.[Link]()
Num4 0x002C FunctionKeyGeneralCode_CN.[Link]()
Num5 0x002D FunctionKeyGeneralCode_CN.[Link]()
Num6 0x002E FunctionKeyGeneralCode_CN.[Link]()
Num7 0x002F FunctionKeyGeneralCode_CN.[Link]()
Num8 0x0030 FunctionKeyGeneralCode_CN.[Link]()
Num9 0x0031 FunctionKeyGeneralCode_CN.[Link]()
Num00 0x0032 FunctionKeyGeneralCode_CN.[Link]()
Plu 0x0046 FunctionKeyGeneralCode_CN.[Link]()
Discount(%) 0x0056 FunctionKeyGeneralCode_CN.[Link]
Code()
Special Sale 0x0057 FunctionKeyGeneralCode_CN.[Link](
)
Negative Sale 0x0058 FunctionKeyGeneralCode_CN.[Link]
e()
Special Price 0x0059 FunctionKeyGeneralCode_CN.[Link]
15
Sale Code()
Discount 5% 0x0060 FunctionKeyGeneralCode_CN.Discount5Percent.g
etCode()
Discount 1 0x0061 FunctionKeyGeneralCode_CN.[Link]()
Discount 2 0x0062 FunctionKeyGeneralCode_CN. [Link]()
Discount 3 0x0063 FunctionKeyGeneralCode_CN. [Link]()
Discount 4 0x0064 FunctionKeyGeneralCode_CN. [Link]()
Discount 5 0x0065 FunctionKeyGeneralCode_CN. [Link]()
Zero 0x0078 FunctionKeyGeneralCode_CN.[Link]()
Dept 0x007A FunctionKeyGeneralCode_CN _CN.[Link]()
Call Clerk 0x007B FunctionKeyGeneralCode_CN.[Link]()
Date Time 0x0081 FunctionKeyGeneralCode_CN.[Link]()
Edit Date Time 0x0082 FunctionKeyGeneralCode_CN.[Link]
de()
Misc. Weighed 0x0083 FunctionKeyGeneralCode_CN.Misc_Weighed.getCo
de()
Misc. By PCS 0x0084 FunctionKeyGeneralCode_CN.Misc_By_PCS.getCod
e()
Misc. By Count 0x0085 FunctionKeyGeneralCode_CN.Misc_By_Count.getC
ode()
For 0x0086 FunctionKeyGeneralCode_CN.[Link]()
Auto 0x0087 FunctionKeyGeneralCode_CN.[Link]()
Prepack 0x0089 FunctionKeyGeneralCode_CN.[Link]()
Override 0x008A FunctionKeyGeneralCode_CN.[Link]()
Return 0x008B FunctionKeyGeneralCode_CN.[Link]()
Pay 0x008C FunctionKeyGeneralCode_CN.[Link]()
ST TTL 0x008F FunctionKeyGeneralCode_CN.ST_TTL.getCode()
Void 0x0090 FunctionKeyGeneralCode_CN.[Link]()
kg/lb 0x0091 FunctionKeyGeneralCode_CN.Kg_lb.getCode()
Unit1 0x0092 FunctionKeyGeneralCode_CN.[Link]()
Unit2 0x0093 FunctionKeyGeneralCode_CN.[Link]()
Unit3 0x0094 FunctionKeyGeneralCode_CN.[Link]()
Discount(-) 0x0098 FunctionKeyGeneralCode_CN.[Link]
ode()
Fixed Price 0x0099 FunctionKeyGeneralCode_CN.[Link]()
Cash Open 0x009A FunctionKeyGeneralCode_CN.[Link]()
WT/CT 0x009B FunctionKeyGeneralCode_CN.WT_CT.getCode()
Edit Void 0x009C FunctionKeyGeneralCode_CN.[Link]()
Edit Origin 0x009D FunctionKeyGeneralCode_CN.[Link]()
Edit Item 0x009F FunctionKeyGeneralCode_CN.[Link]()
Edit Price 0x00A0 FunctionKeyGeneralCode_CN.[Link]()
Batch 0x00A1 FunctionKeyGeneralCode_CN.[Link]()
G Total 0x00A2 FunctionKeyGeneralCode_CN.[Link]()
Refer 0x00A3 FunctionKeyGeneralCode_CN.[Link]()
In Weight 0x00A4 FunctionKeyGeneralCode_CN.[Link]()
Label Ticket 0x00A5 FunctionKeyGeneralCode_CN.[Link](
)
Edit Discount 0x00A7 FunctionKeyGeneralCode_CN.[Link]
e()
Edit Key1 0x00A9 [Link]()
Void Last 0x00AB [Link]()
Pack Date1 0x00AD [Link]()
Print Date 0x00AF [Link]()
Reset 0x00B1 [Link]()
Edit Tax 0x00B4 [Link]()
Edit Trace 0x00B6 [Link]()
16
Ticket No 0x00B7 [Link]()
Scan Clerk 0x00B8 [Link]()
Barcode 0x00B9 [Link]()
Edit Ingredient 0x00BA [Link]()
Call MSG 0x00BB [Link]()
Pack Date2 0x00BC [Link]()
Date Mode 0x00BD [Link]()
Print Ext 0x00BF [Link]()
RFID 0x00D1 [Link]()
Custom No 0x00D4 [Link]()
Custom Close 0x00D5 [Link]()
Reopen 0x00D6 [Link]()
Global Tax 0x00D8 [Link]()
Global Barlab 0x00D9 [Link]()
Net Weight 0x00DB [Link]()
Edit Key2 0x00DD [Link]()
List Plu 0x00DE [Link]()
Prev Page 0x076A [Link]()
Next Page 0x076B [Link]()
Select Category 0x076C [Link]
()
Add 0x008E [Link]()
Copy Ticket 0x00D7 [Link]()
Lock Screen 0x00DF [Link]()
Edit Store 0x00E8 [Link]()

Table 2. Clerk Key


Clerk Key Value Description(refer enum)
Clerk1 0x0201 [Link]()
Clerk2 0x0202 [Link]()
Clerk3 0x0203 [Link]()
Clerk4 0x0204 [Link]()
Clerk5 0x0205 [Link]()
Clerk6 0x0206 [Link]()
Clerk7 0x0207 [Link]()
Clerk8 0x0208 [Link]()
Clerk9 0x0209 [Link]()
Clerk10 0x020A [Link]()
Clerk11 0x020B [Link]()
Clerk12 0x020C [Link]()
Clerk13 0x020D [Link]()
Clerk14 0x020E [Link]()
Clerk15 0x020F [Link]()
Clerk16 0x0210 [Link]()
Clerk17 0x0211 [Link]()
Clerk18 0x0212 [Link]()
Clerk19 0x0213 [Link]()
Clerk20 0x0214 [Link]()
Clerk21 0x0215 [Link]()
Clerk22 0x0216 [Link]()
Clerk23 0x0217 [Link]()
Clerk24 0x0218 [Link]()
Clerk25 0x0219 [Link]()
Clerk26 0x021A [Link]()
Clerk27 0x021B [Link]()
17
Clerk28 0x021C [Link]()
Clerk29 0x021D [Link]()
Clerk30 0x021E [Link]()
Clerk31 0x021F [Link]()
Clerk32 0x0220 [Link]()

Table 3. Currency Key


Currency Key Value Description(refer enum)
Currency1 0x0291 [Link]()
Currency2 0x0292 FunctionKeyClerkCode. [Link]()
Currency3 0x0293 FunctionKeyClerkCode. [Link]()
Currency4 0x0294 FunctionKeyClerkCode. [Link]()

Table 4. Tare Key


Tare Key Value Description(refer enum)
Tare1 0x02A1 [Link]()
Tare2 0x02A2 FunctionKeyTareCode. [Link]()
Tare3 0x02A3 FunctionKeyTareCode. [Link]()
Tare4 0x02A4 FunctionKeyTareCode. [Link]()
Tare5 0x02A5 FunctionKeyTareCode. [Link]()
Tare6 0x02A6 FunctionKeyTareCode. [Link]()
Tare7 0x02A7 FunctionKeyTareCode. [Link]()
Tare8 0x02A8 FunctionKeyTareCode. [Link]()
Tare9 0x02A9 FunctionKeyTareCode. [Link]()
Table 5 Individuality Table
Individual Key Value Description(refer enum)
Individuality1 0x02C1 [Link]
ode()
Individuality2 0x02C2 FunctionKeyIndividualityCode.
[Link]()
Individuality3 0x02C3 FunctionKeyIndividualityCode.
[Link]()
Individuality4 0x02C4 FunctionKeyIndividualityCode.
[Link]()
Individuality5 0x02C5 FunctionKeyIndividualityCode.
[Link]()
Individuality6 0x02C6 FunctionKeyIndividualityCode.
Individuality6getCode()
Individuality7 0x02C7 FunctionKeyIndividualityCode.
[Link]()
Individuality8 0x02C8 FunctionKeyIndividualityCode.
[Link]()
Individuality9 0x02C9 FunctionKeyIndividualityCode.
[Link]()
Individuality10 0x02CA FunctionKeyIndividualityCode.
[Link]()
Individuality11 0x02CB FunctionKeyIndividualityCode.
[Link]()
Individuality12 0x02CC FunctionKeyIndividualityCode.
[Link]()
Individuality13 0x02CD FunctionKeyIndividualityCode.
[Link]()
Individuality14 0x02CE FunctionKeyIndividualityCode.
[Link]()
Individuality15 0x02CF FunctionKeyIndividualityCode.

18
[Link]()
Individuality16 0x02D0 FunctionKeyIndividualityCode.
[Link]()

Table 6. Label Table


Label Key Value Description(refer enum)
Label1 0x02E1 [Link]()
Label2 0x02E2 [Link]()
Label3 0x02E3 [Link]()
Label4 0x02E4 [Link]()
Label5 0x02E5 [Link]()
Label6 0x02E6 [Link]()
Label7 0x02E7 [Link]()
Label8 0x02E8 [Link]()
Label9 0x02E9 [Link]()
Label10 0x02EA [Link]()
Label11 0x02EB [Link]()
Label12 0x02EC [Link]()
Label13 0x02ED [Link]()
Label14 0x02EE [Link]()
Label15 0x02EF [Link]()
Label16 0x02F0 [Link]()
Label17 0x02F1 [Link]()
Label18 0x02F2 [Link]()
Label19 0x02F3 [Link]()
Label20 0x02F4 [Link]()

Table 7. SpecialUse Table


SpecialUse Value Description(refer enum)
Key
SpecialUse1 0x0701 [Link]
()
SpecialUse2 0x0702 [Link]
()
SpecialUse3 0x0703 [Link]
()
SpecialUse4 0x0704 [Link]
()
SpecialUse5 0x0705 [Link]
()
SpecialUse6 0x0706 [Link]
()
SpecialUse7 0x0707 [Link]
()
SpecialUse8 0x0708 [Link]
()
SpecialUse9 0x0709 [Link]
()
SpecialUse10 0x070A [Link]
e()
SpecialUse11 0x070B [Link]
e()
SpecialUse12 0x070C [Link]
e()

19
SpecialUse13 0x070D [Link]
e()
SpecialUse14 0x070E [Link]
e()
SpecialUse15 0x070F [Link]
e()
SpecialUse16 0x0710 [Link]
e()
SpecialUse17 0x0711 [Link]
e()
SpecialUse18 0x0712 [Link]
e()
SpecialUse19 0x0713 [Link]
e()
SpecialUse20 0x0714 [Link]
e()
SpecialUse21 0x0715 [Link]
e()
SpecialUse22 0x0716 [Link]
e()
SpecialUse23 0x0717 [Link]
e()
SpecialUse24 0x0718 [Link]
e()
SpecialUse25 0x0719 [Link]
e()
SpecialUse26 0x071A [Link]
e()
SpecialUse27 0x071B [Link]
e()
SpecialUse28 0x071C [Link]
e()
SpecialUse29 0x071D [Link]
e()
SpecialUse30 0x071E [Link]
e()
SpecialUse31 0x071F [Link]
e()
SpecialUse32 0x0720 [Link]
e()
SpecialUse33 0x0721 [Link]
e()
SpecialUse34 0x0722 [Link]
e()
SpecialUse35 0x0723 [Link]
e()
SpecialUse36 0x0724 [Link]
e()
SpecialUse37 0x0725 [Link]
e()
SpecialUse38 0x0726 [Link]
e()
SpecialUse39 0x0727 [Link]
e()
SpecialUse40 0x0728 [Link]
e()
SpecialUse41 0x0729 [Link]
20
e()
SpecialUse42 0x072A [Link]
e()
SpecialUse43 0x072B [Link]
e()
SpecialUse44 0x072C [Link]
e()
SpecialUse45 0x072D [Link]
e()
SpecialUse46 0x072E [Link]
e()
SpecialUse47 0x072F [Link]
e()
SpecialUse48 0x0730 [Link]
e()
SpecialUse49 0x0731 [Link]
e()
SpecialUse50 0x0732 [Link]
e()
SpecialUse51 0x0733 [Link]
e()
SpecialUse52 0x0734 [Link]
e()
SpecialUse53 0x0735 [Link]
e()
SpecialUse54 0x0736 [Link]
e()
SpecialUse55 0x0737 [Link]
e()
SpecialUse56 0x0738 [Link]
e()
SpecialUse57 0x0739 [Link]
e()
SpecialUse58 0x073A [Link]
e()
SpecialUse59 0x073B [Link]
e()
SpecialUse60 0x073C [Link]
e()
SpecialUse61 0x073D [Link]
e()
SpecialUse62 0x073E [Link]
e()
SpecialUse63 0x073F [Link]
e()
SpecialUse64 0x0740 [Link]
e()
SpecialUse65 0x0741 [Link]
e()
SpecialUse66 0x0742 [Link]
e()
SpecialUse67 0x0743 [Link]
e()
SpecialUse68 0x0744 [Link]
e()
SpecialUse69 0x0745 [Link]
e()
21
SpecialUse70 0x0746 [Link]
e()
SpecialUse71 0x0747 [Link]
e()
SpecialUse72 0x0748 [Link]
e()
SpecialUse73 0x0749 [Link]
e()
SpecialUse74 0x074A [Link]
e()
SpecialUse75 0x074B [Link]
e()
SpecialUse76 0x074C [Link]
e()
SpecialUse77 0x074D [Link]
e()
SpecialUse78 0x074E [Link]
e()
SpecialUse79 0x074F [Link]
e()
SpecialUse80 0x0750 [Link]
e()
SpecialUse81 0x0751 [Link]
e()
SpecialUse82 0x0752 [Link]
e()
SpecialUse83 0x0753 [Link]
e()
SpecialUse84 0x0754 [Link]
e()
SpecialUse85 0x0755 [Link]
e()
SpecialUse86 0x0756 [Link]
e()
SpecialUse87 0x0757 [Link]
e()
SpecialUse88 0x0758 [Link]
e()
SpecialUse89 0x0759 [Link]
e()
SpecialUse90 0x075A [Link]
e()
SpecialUse91 0x075B [Link]
e()
SpecialUse92 0x075C [Link]
e()
SpecialUse93 0x075D [Link]
e()
SpecialUse94 0x075E [Link]
e()
SpecialUse95 0x075F [Link]
e()
SpecialUse96 0x0760 [Link]
e()
SpecialUse97 0x0761 [Link]
e()
SpecialUse98 0x0762 [Link]
22
e()
SpecialUse99 0x0763 [Link]
e()
SpecialUse100 0x0764 [Link]
de()

4.5 Ingredient
4.5.1 Set Ingredient
(1) Set scaleEnv property
key string Value string Description(refer enum)
Action 1 [Link]()
DataType 22 [Link]()
Encoding MS936 Depending on Language
or Ex) for china
EUC-CN -“MS936“ for windows
-“EUC-CN“ for unix/linux
CommType Tcp EmCommType.COMMTYPE_TCPIP.getCom
mType()

(2) Set scaleInfo property


key string Value string Description(refer enum)
Ip Scale IP
Port 20304 Scale Port
Model 5200 Depending on Scale Model
Ex) “5200“ for CL3000
[Link]()
ScaleType 2 Depending on Scale Type
1 : [Link]
2 : [Link]
3 : [Link]
4 : [Link]
5 : [Link]
6 : Scaletype.LP1
[Link]()

(3) Set sendData


a. type : List<Map<String, String>>
b. Data
: Make a Map per one Ingredient and input into the List.
Map information is below for one ingredient
c. Add Field you want to send
key string Description Sample string
No Ingredient number 1

23
Ingredient Ingredient Ingredient text

4.5.2 Delete Ingredient


(1) Set scaleEnv property
key string Value string Description(refer enum)
Action 5 [Link]()
DataType 22 [Link]()
Encoding MS936 Depending on Language
or Ex) for china
EUC-CN -“MS936“ for windows
-“EUC-CN“ for unix/linux
CommType Tcp EmCommType.COMMTYPE_TCPIP.getCom
mType()

(2) Set scaleInfo property


key string Value string Description(refer enum)
Ip Scale IP
Port 20304 Scale Port
Model 5200 Depending on Scale Model
Ex) “5200“ for CL3000
[Link]()
ScaleType 2 Depending on Scale Type
1 : [Link]
2 : [Link]
3 : [Link]
4 : [Link]
5 : [Link]
6 : Scaletype.LP1
[Link]()
(3) Set sendData
key string Description Sample string
No Ingredient number 1

4.5.3 Delete all Ingredient


(1) Set scaleEnv property
key string Value string Description(refer enum)
Action 6 [Link]()
DataType 22 [Link]()
Encoding MS936 Depending on Language
or Ex) for china
EUC-CN -“MS936“ for windows
-“EUC-CN“ for unix/linux
CommType Tcp EmCommType.COMMTYPE_TCPIP.getCom
mType()

(2) Set scaleInfo property


key string Value string Description(refer enum)
Ip Scale IP
Port 20304 Scale Port
Model 5200 Depending on Scale Model
Ex) “5200“ for CL3000

24
[Link]()
ScaleType 2 Depending on Scale Type
1 : [Link]
2 : [Link]
3 : [Link]
4 : [Link]
5 : [Link]
6 : Scaletype.LP1
[Link]()

(3) Set sendData


You don’t need to put any data to the list.

4.6 Symbol
4.6.1 Set Unit Symbol
(1) Set scaleEnv property
key string Value string Description(refer enum)
Action 1 [Link]()
DataType 21 [Link]()
Encoding MS936 Depending on Language
or Ex) for china
EUC-CN -“MS936“ for windows
-“EUC-CN“ for unix/linux
CommType Tcp EmCommType.COMMTYPE_TCPIP.getCom
mType()

(2) Set scaleInfo property


key string Value string Description(refer enum)
Ip Scale IP
Port 20304 Scale Port
Model 5200 Depending on Scale Model
Ex) “5200“ for CL3000
[Link]()
ScaleType 2 Depending on Scale Type
1 : [Link]
2 : [Link]
3 : [Link]
4 : [Link]
5 : [Link]
6 : Scaletype.LP1
[Link]()

(3) Set sendData


a. type : List<Map<String, String>>
b. Data
: Make a Map per one symbol and input into the List.
Map information is below for one symbol
c. Add Field you want to send
key string Description Sample string
No Symbol number 1
Symbol Symbol Symbol text

25
4.6.2 Delete Unit Symbol
(1) Set scaleEnv property
key string Value string Description(refer enum)
Action 5 [Link]()
DataType 21 [Link]()
Encoding MS936 Depending on Language
or Ex) for china
EUC-CN -“MS936“ for windows
-“EUC-CN“ for unix/linux
CommType Tcp EmCommType.COMMTYPE_TCPIP.getCom
mType()

(2) Set scaleInfo property


key string Value string Description(refer enum)
Ip Scale IP
Port 20304 Scale Port
Model 5200 Depending on Scale Model
Ex) “5200“ for CL3000
[Link]()
ScaleType 2 Depending on Scale Type
1 : [Link]
2 : [Link]
3 : [Link]
4 : [Link]
5 : [Link]
6 : Scaletype.LP1
[Link]()

(3) Set sendData


key string Description Sample string
No Symbol number 1

4.6.3 Delete all Unit Symobl


(1) Set scaleEnv property
key string Value string Description(refer enum)
Action 6 [Link]()
DataType 21 [Link]()
Encoding MS936 Depending on Language
or Ex) for china
EUC-CN -“MS936“ for windows
-“EUC-CN“ for unix/linux
CommType Tcp EmCommType.COMMTYPE_TCPIP.getCom
mType()

(2) Set scaleInfo property


key string Value string Description(refer enum)
Ip Scale IP
Port 20304 Scale Port
26
Model 5200 Depending on Scale Model
Ex) “5200“ for CL3000
[Link]()
ScaleType 2 Depending on Scale Type
1 : [Link]
2 : [Link]
3 : [Link]
4 : [Link]
5 : [Link]
6 : Scaletype.LP1
[Link]()

(3) Set sendData


You don’t need to put any data to the list.

4.7 Label
4.7.1 Set Label
(1) Set scaleEnv property
key string Value string Description(refer enum)
Action 1 [Link]()
DataType 6 [Link]()
Encoding MS936 Depending on Language
or Ex) for china
EUC-CN -“MS936“ for windows
-“EUC-CN“ for unix/linux
CommType Tcp EmCommType.COMMTYPE_TCPIP.getCom
mType()

(2) Set scaleInfo property


key string Value string Description(refer enum)
Ip Scale IP
Port 20304 Scale Port
Model 5200 Depending on Scale Model
Ex) “5200“ for CL3000
[Link]()
ScaleType 2 Depending on Scale Type
1 : [Link]
2 : [Link]
3 : [Link]
4 : [Link]
5 : [Link]
6 : Scaletype.LP1
[Link]()

(3) Set sendData


a. type : Label
b. set label file path. Use setFilePath() function.

27
4.8 Weight (Only Vietnam)
4.8.1 Set weight transmission property
(1) set scaleEnv property
key string Value string Description(refer enum)
Action 1 [Link]()
DataType 11000 [Link]()
Encoding MS936 Depending on Language
EUC-CN Ex) for china
or -“MS936“ for windows
Cp1258 -“EUC-CN“ for unix/linux
for vietnam
-“Cp1258”
CommType Tcp EmCommType.COMMTYPE_TCPIP.getCom
mType()

(2) Set scaleInfo property


key string Value string Description(refer enum)
Ip Scale IP
Port 20304 Scale Port
1000 CL-Series : 20304
PRII-D : 1000
Model 5200 Depending on Scale Model
Ex) [Link]()
ScaleType 2 Depending on Scale Type
1 : [Link]
2 : [Link]
3 : [Link]
4 : [Link]
5 : [Link]
6 : Scaletype.LP1
[Link]()

(3) Set sendData


You don’t need to put any data to list

(4) Result map key


key string Value Description(refer enum)
Weight Weight
WeightDecimalP Weight decimal point
oint
Error WeightVo.STATE_OK Only in this state, weight,
weight decimal point value
are valid.
WeightVo.STATE_ERR_WEI
GHT
WeightVo.STATE_ERR_STA
BLE

5. How to check Result


5.1 Make the class to receive the result
(1) Make the class which implement the ‘ResultReceive’ interface
- Refer 2.2.2 ResultReceive interface
28
(2) Use this class by parameter at [Link]() when you send data to
scale
- sendToScale(scaleEnv, sendData, scaleInfo, resultReceive)
-
5.2 How to Check result
(1) Check the ‘workResult’ parameter
You can check the result using enum ‘CommState’
- Refer 2.1.6 CommState
Ex)
CommState emState=[Link](workResult);
switch (emState)
{
case SUCCESS:
[Link]("ResultReceiveData : Success");
break;
case FAIL:
[Link]("ResultReceiveData : Fail");
break;
case CONNECTION_ERROR:
[Link]("ResultReceiveData : Connect Error");
break;
case PACKET_ERR_WRONG:
[Link]("ResultReceiveData : Make Packet Error");
break;
case SCALE_ERR_CHECKSUM:
[Link]("ResultReceiveData : Checksum Error");
break;
default:
break;
}

29

You might also like