Using the Command Interface
70
DP/AS-Interface Link 20E
Release 11/2002
C79000-G8976-C138–04
Example:
Based on the following table, you can see how the display in the status nibble
changes due to the device state and the command processing in the user program.
Table 3-2
Action
Reaction in the Status Nibble
1. AS-i power supply switched on for the DP/AS-i Link 20E. 1110
B
....1000
B
.....1110
B
....
2. The user program transfers a command (for example
write_parameter) with an asynchronous write job to the
DP/AS-i Link 20E.
0010
B
(briefly, depending on the
command)
3. The AS-i master completes the command. The return value can
be read by the user program.
0001
B
4. The user program reads a 2-byte return value using an
asynchronous read job.
0100
B
5. ....further program execution ... ....
6. The user program transfers a command (for example, Get_LPS,
Get_LAS, Get_LDS, Get_Flags) with an asynchronous write
access to the DP/AS–i Link 20E.
0010
B
(briefly, depending on the
command)
7. The AS-i master completes the command without error. The
response data can be read by the user program
1011
B
8. The user program reads 32 bytes of response data with an
asynchronous read job.
0100
B
Return Value
Error free processing is encoded in the return value of the response buffer. There
is an error when value in the status nibble is “completed without error and without
response data or terminated with error” (Coding: 0001
H
).
Table 3-3 Return Value in the Response Buffer
STATUS
Meaning
0000H Job completed without error
8381H The AS-i slave address is incorrect
8382H The AS-i slave is not activated (not in LAS).
8383H Error on AS-Interface.
8384H Command not permitted in the current status of the AS-i master.
8385H An AS-i slave with address 0 exists.
8386H The AS-i slave has illegal configuration data (I/O or ID codes).
83A1H The addressed AS-i slave was not found on the AS-Interface.
83A2H An AS-i slave with address 0 exists.