0% found this document useful (0 votes)
4 views

CommJava API

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)
4 views

CommJava API

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
You are on page 1/ 29

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 com.cas.CommonDefines 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 com.cas.commlib 7
2.2.1 Class CasCommlib.java 7
2.3 com.cas.code 8
2.3.1 Class CommonDefines.java 8
2.3.2 Class interface ResultReceive.java 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. CasCommLib-1.0.10.jar
C. Other external libraray
a. commons-net-3.6.jar
b. netty-all-4.0.30.final.jar
c. log4j-1.2.17.jar
d. slf4j-api-1.7.25.jar

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 com.cas.CommonDefines
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 com.cas.commlib
2.2.1 Class CasCommlib.java
: 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/netty.properties
CasCommLib(String propFilePath)
: Create object and initialize member
Parameter:
propFilePath : path of “netty.properties”

(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 com.cas.code
2.3.1 Class CommonDefines.java
: There are definitions used in this library. Refer to provided source code

2.3.2 Class interface ResultReceive.java


: 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 com.cas.code.CommDefines.MapKeyScaleEnv 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 com.cas.code.CommDefines.MapKeyScaleInfo 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 5.How to check Result

4. Set Data transmission


To transmit data, you use CasCommLib.sendToScale() 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 EmActionType.Take.getActionCode()
DataType 58 EmDataType.VersionInfo.getDataType()
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
EmScaleModel.CL5200.getModelCode()
ScaleType 2 Depending on Scale Type
1 : ScaleType.Bench
2 : ScaleType.Pole
3 : ScaleType.Hanging
4 : ScaleType.Self
5 : ScaleType.Double
6 : Scaletype.LP1
ScaleType.Pole.getTypecode()
(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 EmActionType.Send.getActionCode()
DataType 11 EmDataType.PLU.getDataType()
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
EmScaleModel.CL5200.getModelCode()
ScaleType 2 Depending on Scale Type
1 : ScaleType.Bench
2 : ScaleType.Pole
3 : ScaleType.Hanging
4 : ScaleType.Self
5 : ScaleType.Double
6 : Scaletype.LP1
ScaleType.Pole.getTypecode()

(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 EmActionType.Delete.getActionCode()
DataType 11 EmDataType.PLU.getDataType()
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
EmScaleModel.CL5200.getModelCode()
ScaleType 2 Depending on Scale Type
1 : ScaleType.Bench
2 : ScaleType.Pole
3 : ScaleType.Hanging
4 : ScaleType.Self
5 : ScaleType.Double
6 : Scaletype.LP1
ScaleType.Pole.getTypecode()

(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 EmActionType.DeleteAll.getActionCode()
DataType 11 EmDataType.PLU.getDataType()
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
EmScaleModel.CL7200.getModelCode()

(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 EmActionType.Send.getActionCode()
DataType 3 EmDataType.Keypad.getDataType()
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
EmScaleModel.CL5200.getModelCode()
ScaleType 2 Depending on Scale Type
1 : ScaleType.Bench
2 : ScaleType.Pole
3 : ScaleType.Hanging
4 : ScaleType.Self
5 : ScaleType.Double
6 : Scaletype.LP1
ScaleType.Pole.getTypecode()

(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 EmActionType.Send.getActionCode()

11
DataType 3 EmDataType.Key.getDataType()
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
EmScaleModel.CL5200.getModelCode()
ScaleType 2 Depending on Scale Type
1 : ScaleType.Bench
2 : ScaleType.Pole
3 : ScaleType.Hanging
4 : ScaleType.Self
5 : ScaleType.Double
6 : Scaletype.LP1
ScaleType.Pole.getTypecode()

(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.C.getCode()
Shift 0x000C FunctionKeyGeneralCode_CN.Shift.getCode()
Tare 0x000F FunctionKeyGeneralCode_CN.Tare.getCode()
Print 0x0015 FunctionKeyGeneralCode_CN.Print.getCode()
Feed 0x0016 FunctionKeyGeneralCode_CN.Feed.getCode()
X 0x0026 FunctionKeyGeneralCode_CN.X.getCode()
Num0 0x0028 FunctionKeyGeneralCode_CN.Num0.getCode()
Num1 0x0029 FunctionKeyGeneralCode_CN.Num1.getCode()
Num2 0x002A FunctionKeyGeneralCode_CN.Num2.getCode()
Num3 0x002B FunctionKeyGeneralCode_CN.Num3.getCode()
Num4 0x002C FunctionKeyGeneralCode_CN.Num4.getCode()
Num5 0x002D FunctionKeyGeneralCode_CN.Num5.getCode()
Num6 0x002E FunctionKeyGeneralCode_CN.Num6.getCode()
Num7 0x002F FunctionKeyGeneralCode_CN.Num7.getCode()
Num8 0x0030 FunctionKeyGeneralCode_CN.Num8.getCode()
Num9 0x0031 FunctionKeyGeneralCode_CN.Num9.getCode()
Num00 0x0032 FunctionKeyGeneralCode_CN.Num00.getCode()
Plu 0x0046 FunctionKeyGeneralCode_CN.Plu.getCode()
Discount(%) 0x0056 FunctionKeyGeneralCode_CN.DiscountPercent.get
Code()
Special Sale 0x0057 FunctionKeyGeneralCode_CN.SpecialSale.getCode(
)
Negative Sale 0x0058 FunctionKeyGeneralCode_CN.NegativeSale.getCod
e()
Special Price 0x0059 FunctionKeyGeneralCode_CN.SpecialPriceSale.get
15
Sale Code()
Discount 5% 0x0060 FunctionKeyGeneralCode_CN.Discount5Percent.g
etCode()
Discount 1 0x0061 FunctionKeyGeneralCode_CN.Discount1.getCode()
Discount 2 0x0062 FunctionKeyGeneralCode_CN. Discount2.getCode()
Discount 3 0x0063 FunctionKeyGeneralCode_CN. Discount3.getCode()
Discount 4 0x0064 FunctionKeyGeneralCode_CN. Discount4.getCode()
Discount 5 0x0065 FunctionKeyGeneralCode_CN. Discount5.getCode()
Zero 0x0078 FunctionKeyGeneralCode_CN.Zero.getCode()
Dept 0x007A FunctionKeyGeneralCode_CN _CN.Dept.getCode()
Call Clerk 0x007B FunctionKeyGeneralCode_CN.CallClerk.getCode()
Date Time 0x0081 FunctionKeyGeneralCode_CN.DateTime.getCode()
Edit Date Time 0x0082 FunctionKeyGeneralCode_CN.EditDateTime.getCo
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.For.getCode()
Auto 0x0087 FunctionKeyGeneralCode_CN.Auto.getCode()
Prepack 0x0089 FunctionKeyGeneralCode_CN.Prepack.getCode()
Override 0x008A FunctionKeyGeneralCode_CN.Override.getCode()
Return 0x008B FunctionKeyGeneralCode_CN.Return.getCode()
Pay 0x008C FunctionKeyGeneralCode_CN.Pay.getCode()
ST TTL 0x008F FunctionKeyGeneralCode_CN.ST_TTL.getCode()
Void 0x0090 FunctionKeyGeneralCode_CN.Void.getCode()
kg/lb 0x0091 FunctionKeyGeneralCode_CN.Kg_lb.getCode()
Unit1 0x0092 FunctionKeyGeneralCode_CN.Unit1.getCode()
Unit2 0x0093 FunctionKeyGeneralCode_CN.Unit2.getCode()
Unit3 0x0094 FunctionKeyGeneralCode_CN.Unit3.getCode()
Discount(-) 0x0098 FunctionKeyGeneralCode_CN.DiscountMinus.getC
ode()
Fixed Price 0x0099 FunctionKeyGeneralCode_CN.FixedPrice.getCode()
Cash Open 0x009A FunctionKeyGeneralCode_CN.CashOpen.getCode()
WT/CT 0x009B FunctionKeyGeneralCode_CN.WT_CT.getCode()
Edit Void 0x009C FunctionKeyGeneralCode_CN.EditVoid.getCode()
Edit Origin 0x009D FunctionKeyGeneralCode_CN.EditOrigin.getCode()
Edit Item 0x009F FunctionKeyGeneralCode_CN.EditItem.getCode()
Edit Price 0x00A0 FunctionKeyGeneralCode_CN.EditPrice.getCode()
Batch 0x00A1 FunctionKeyGeneralCode_CN.Batch.getCode()
G Total 0x00A2 FunctionKeyGeneralCode_CN.GTotal.getCode()
Refer 0x00A3 FunctionKeyGeneralCode_CN.Refer.getCode()
In Weight 0x00A4 FunctionKeyGeneralCode_CN.InWeight.getCode()
Label Ticket 0x00A5 FunctionKeyGeneralCode_CN.LabelTicket.getCode(
)
Edit Discount 0x00A7 FunctionKeyGeneralCode_CN.EditDiscount.getCod
e()
Edit Key1 0x00A9 FunctionKeyGeneralCode.EditKey1.getCode()
Void Last 0x00AB FunctionKeyGeneralCode.VoidLast.getCode()
Pack Date1 0x00AD FunctionKeyGeneralCode.PackDate1.getCode()
Print Date 0x00AF FunctionKeyGeneralCode.PrintDate.getCode()
Reset 0x00B1 FunctionKeyGeneralCode.Reset.getCode()
Edit Tax 0x00B4 FunctionKeyGeneralCode.EditTax.getCode()
Edit Trace 0x00B6 FunctionKeyGeneralCode.EditTrace.getCode()
16
Ticket No 0x00B7 FunctionKeyGeneralCode.TicketNo.getCode()
Scan Clerk 0x00B8 FunctionKeyGeneralCode.ScanClerk.getCode()
Barcode 0x00B9 FunctionKeyGeneralCode.Barcode.getCode()
Edit Ingredient 0x00BA FunctionKeyGeneralCode.EditIngred.getCode()
Call MSG 0x00BB FunctionKeyGeneralCode.CallMSG.getCode()
Pack Date2 0x00BC FunctionKeyGeneralCode.PackDate2.getCode()
Date Mode 0x00BD FunctionKeyGeneralCode.DateMode.getCode()
Print Ext 0x00BF FunctionKeyGeneralCode.PrintExt.getCode()
RFID 0x00D1 FunctionKeyGeneralCode.RFID.getCode()
Custom No 0x00D4 FunctionKeyGeneralCode.CustomNo.getCode()
Custom Close 0x00D5 FunctionKeyGeneralCode.CustomClose.getCode()
Reopen 0x00D6 FunctionKeyGeneralCode.Reopen.getCode()
Global Tax 0x00D8 FunctionKeyGeneralCode.GlobalTax.getCode()
Global Barlab 0x00D9 FunctionKeyGeneralCode.GlobalBarlab.getCode()
Net Weight 0x00DB FunctionKeyGeneralCode.NetWeight.getCode()
Edit Key2 0x00DD FunctionKeyGeneralCode.EditKey2.getCode()
List Plu 0x00DE FunctionKeyGeneralCode.ListPlu.getCode()
Prev Page 0x076A FunctionKeyGeneralCode.PrevPage.getCode()
Next Page 0x076B FunctionKeyGeneralCode.NextPage.getCode()
Select Category 0x076C FunctionKeyGeneralCode.SelectCategory.getCode
()
Add 0x008E FunctionKeyGeneralCode.Add.getCode()
Copy Ticket 0x00D7 FunctionKeyGeneralCode.CopyTicket.getCode()
Lock Screen 0x00DF FunctionKeyGeneralCode.LockScreen.getCode()
Edit Store 0x00E8 FunctionKeyGeneralCode.EditStore.getCode()

Table 2. Clerk Key


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

Table 3. Currency Key


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

Table 4. Tare Key


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

18
Individuality15.getCode()
Individuality16 0x02D0 FunctionKeyIndividualityCode.
Individuality16.getCode()

Table 6. Label Table


Label Key Value Description(refer enum)
Label1 0x02E1 FunctionKeyLabelCode.label1.getCode()
Label2 0x02E2 FunctionKeyLabelCode.label2.getCode()
Label3 0x02E3 FunctionKeyLabelCode.label3.getCode()
Label4 0x02E4 FunctionKeyLabelCode.label4.getCode()
Label5 0x02E5 FunctionKeyLabelCode.label5.getCode()
Label6 0x02E6 FunctionKeyLabelCode.label6.getCode()
Label7 0x02E7 FunctionKeyLabelCode.label7.getCode()
Label8 0x02E8 FunctionKeyLabelCode.label8.getCode()
Label9 0x02E9 FunctionKeyLabelCode.label9.getCode()
Label10 0x02EA FunctionKeyLabelCode.label10.getCode()
Label11 0x02EB FunctionKeyLabelCode.label11.getCode()
Label12 0x02EC FunctionKeyLabelCode.label12.getCode()
Label13 0x02ED FunctionKeyLabelCode.label13.getCode()
Label14 0x02EE FunctionKeyLabelCode.label14.getCode()
Label15 0x02EF FunctionKeyLabelCode.label15.getCode()
Label16 0x02F0 FunctionKeyLabelCode.label16.getCode()
Label17 0x02F1 FunctionKeyLabelCode.label17.getCode()
Label18 0x02F2 FunctionKeyLabelCode.label18.getCode()
Label19 0x02F3 FunctionKeyLabelCode.label19.getCode()
Label20 0x02F4 FunctionKeyLabelCode.label20.getCode()

Table 7. SpecialUse Table


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

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

4.5 Ingredient
4.5.1 Set Ingredient
(1) Set scaleEnv property
key string Value string Description(refer enum)
Action 1 EmActionType.Send.getActionCode()
DataType 22 EmDataType.Ingredient.getDataType()
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
EmScaleModel.CL5200.getModelCode()
ScaleType 2 Depending on Scale Type
1 : ScaleType.Bench
2 : ScaleType.Pole
3 : ScaleType.Hanging
4 : ScaleType.Self
5 : ScaleType.Double
6 : Scaletype.LP1
ScaleType.Pole.getTypecode()

(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 EmActionType.Delete.getActionCode()
DataType 22 EmDataType.Ingredient.getDataType()
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
EmScaleModel.CL5200.getModelCode()
ScaleType 2 Depending on Scale Type
1 : ScaleType.Bench
2 : ScaleType.Pole
3 : ScaleType.Hanging
4 : ScaleType.Self
5 : ScaleType.Double
6 : Scaletype.LP1
ScaleType.Pole.getTypecode()
(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 EmActionType.DeleteAll.getActionCode()
DataType 22 EmDataType.Ingredient.getDataType()
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
EmScaleModel.CL5200.getModelCode()
ScaleType 2 Depending on Scale Type
1 : ScaleType.Bench
2 : ScaleType.Pole
3 : ScaleType.Hanging
4 : ScaleType.Self
5 : ScaleType.Double
6 : Scaletype.LP1
ScaleType.Pole.getTypecode()

(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 EmActionType.Send.getActionCode()
DataType 21 EmDataType.Symbol.getDataType()
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
EmScaleModel.CL5200.getModelCode()
ScaleType 2 Depending on Scale Type
1 : ScaleType.Bench
2 : ScaleType.Pole
3 : ScaleType.Hanging
4 : ScaleType.Self
5 : ScaleType.Double
6 : Scaletype.LP1
ScaleType.Pole.getTypecode()

(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 EmActionType.Delete.getActionCode()
DataType 21 EmDataType.Symbol.getDataType()
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
EmScaleModel.CL5200.getModelCode()
ScaleType 2 Depending on Scale Type
1 : ScaleType.Bench
2 : ScaleType.Pole
3 : ScaleType.Hanging
4 : ScaleType.Self
5 : ScaleType.Double
6 : Scaletype.LP1
ScaleType.Pole.getTypecode()

(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 EmActionType.DeleteAll.getActionCode()
DataType 21 EmDataType.Symbol.getDataType()
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
EmScaleModel.CL5200.getModelCode()
ScaleType 2 Depending on Scale Type
1 : ScaleType.Bench
2 : ScaleType.Pole
3 : ScaleType.Hanging
4 : ScaleType.Self
5 : ScaleType.Double
6 : Scaletype.LP1
ScaleType.Pole.getTypecode()

(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 EmActionType.Send.getActionCode()
DataType 6 EmDataType.LabelInfo.getDataType()
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
EmScaleModel.CL5200.getModelCode()
ScaleType 2 Depending on Scale Type
1 : ScaleType.Bench
2 : ScaleType.Pole
3 : ScaleType.Hanging
4 : ScaleType.Self
5 : ScaleType.Double
6 : Scaletype.LP1
ScaleType.Pole.getTypecode()

(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 EmActionType.Send.getActionCode()
DataType 11000 EmDataType.Weight.getDataType()
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) EmScaleModel.CL5200.getModelCode()
ScaleType 2 Depending on Scale Type
1 : ScaleType.Bench
2 : ScaleType.Pole
3 : ScaleType.Hanging
4 : ScaleType.Self
5 : ScaleType.Double
6 : Scaletype.LP1
ScaleType.Pole.getTypecode()

(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 CasCommLib.sendToScale() 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=CommState.getEnumByCode(workResult);
switch (emState)
{
case SUCCESS:
System.out.println("ResultReceiveData : Success");
break;
case FAIL:
System.out.println("ResultReceiveData : Fail");
break;
case CONNECTION_ERROR:
System.out.println("ResultReceiveData : Connect Error");
break;
case PACKET_ERR_WRONG:
System.out.println("ResultReceiveData : Make Packet Error");
break;
case SCALE_ERR_CHECKSUM:
System.out.println("ResultReceiveData : Checksum Error");
break;
default:
break;
}

29

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy