IDEC MicroSmart AS-i User Manual

Page 49

Advertising
background image

6: AS-I

NTERFACE

O

PERANDS

6-18

M

ICRO

S

MART

AS-I

NTERFACE

M

ASTER

M

ODULE

U

SER

S

M

ANUAL

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

.

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 Lower 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.

Advertising