ACR1281U-C8 – Application Programming Interface
Version 1.00
www.acs.com.hk
Page 38 of 52
5.8. ACR120_Dec
Decrements a value block by subtracting a value stored.
High Level API
:
DLLAPI INT16 AC_DECL
ACR120_Dec ( INT16 hReader,
UINT8 Block,
INT32 Value,
INT32* pNewValue);
Parameters
Description
hReader
Handle to the reader returned by AC_Open()
Block
Block number
Value
Value subtracts
pNewValue
Updated value after decrement
Return Value
INT16
Result code. 0 means success.
Table 27
: ACR120_Dec 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
10h
05h
Block
Value
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
pNewValue
Or
Response: From Reader to PC (5 bytes) << Fail>>
Response Code
(1 byte)
Response Status
(2 bytes)
Response Data Length
(2 byes)
E1h
INT16 (<0)
0000h