As-i – IDEC MicroSmart User Manual
Page 469
![background image](/manuals/350368/469/background.png)
28: AS-I
NTERFACE
M
ASTER
C
OMMUNICATION
« FC4A M
ICRO
S
MART
U
SER
’
S
M
ANUAL
»
28-29
Request and Result Codes
Sample Program: Change Slave PI
This sample program changes the PI value of slave 1A to 3. To use the ASI command Change Slave PI, store new parame-
ter value 3 to D1943 and 1 to D1944 to designate the slave address using the MACRO instruction on
WindLDR
.
To designate slave 31A, set 001F to D1944. For slave 1B, set 0021.
Parameters P3 through P0 are weighted as shown in the table below. When the PI parameter is set to 3, P3 and P2 are
turned off, and P1 and P0 are turned on.
D1945 Value Low Byte
Description
Note
00h
Initial value at power up
While D1945 lower byte stores 01h, 02h, or 08h,
do not write any value to D1945, other wise the ASI
command is not executed correctly.
The CPU module stores all values automatically,
except for 01h.
01h
Request
02h
Processing ASI command
04h
Completed normally
08h
(Executing configuration)
14h
Peripheral device failure
24h
ASI command error
74h
Impossible to execute
84h
Execution resulting in error
Program
Command Data (Hexadecimal)
D1941
D1942
D1943
D1944
D1945
Write PI parameter “3” to slave 1A
0306
0102
0003
0001
0001
Parameter
P3
P2
P1
P0
Weight
8
4
2
1
ON/OFF
OFF
OFF
ON
ON
S1
10
D1
D1941
I0
SOTU
MACRO
D2
D1945
When input I0 turns on, the MACRO instruction stores hexa-
decimal values 0306, 0102, 0003, 0001, and 0001 to five data
registers D1941 through D1945.