ACR1281U-C8 – Application Programming Interface
Version 1.00
www.acs.com.hk
Page 35 of 52
5.5. ACR120_WriteValue
Writes a value.
High Level API
:
DLLAPI INT16 AC_DECL
ACR120_WriteValue( INT16 hReader,
UINT8 Block,
INT32 ValueData);
Parameters
Description
hReader
Handle to the reader returned by AC_Open()
Block
Block number
ValueData
Contains the value to write. It is a 32-bit signed
integer.
Return Value
INT16
Result code. 0 means success.
Table 24
: ACR120_WriteValue Command Description
Low Level Frame Structure:
Command: From PC to Reader (10 bytes)
Command
Code
(1 byte)
Command Data
Length
(1 byte)
Instruction
Code
(1 byte)
Data
Length
(1 byte)
Data
(1 byte)
(4 bytes)
E0h
07h
0Bh
05h
Block
ValueData
Response: From Reader to PC (9 bytes) <<Success>>
Response Code
(1 byte)
Response Status
(2 bytes)
Response Data Length
(2 bytes)
Response Data
(4 bytes)
E1h
INT16 (>=0)
0004h
ValueDataStored
Note:
The Response Data (ValueDataStored) is used for comparison only.
Or
Response: From Reader to PC (5 bytes) << Fail>>
Respons
e Code
(1 byte)
Response Status
(2 bytes)
Response Data
length
(2 byes)
E2h
INT16 (<0)
0000h