DA70131-1/3E
IV-16
2-8. Data communication 2: Read a register in a PCL device
The example of data communication below shows how to read a register that is integrated in the PCL device.
Assume that the local devices to be used are as follows.
Assume you want to read the register value in the PCL device.
Device type
Configuration item
Configuration data
PCL device
Device address
40 (28h)
.
Start
End
Outpw (0x0006h, 0x00D0h)
- Write a read command from the PCL device register to the
FIFO.
- Register access command of the PCL device is specified
in the user's manual for the PCL.
Outpw (0x0000h, 0x4028h)
- Have data communication with the specified device
number.
A PCL device, that received this communication, returns
the specified register data to the center device. The
returned data is stored in the receiving FIFO.
- When reading data while checking the RDBB
Com = Inpw (0x0006h)
Data_L = Inpw (0x0006h)
Data_H = Inpw (0x0006h)
- Read the data in the receiving FIFO.
The data details and order are specified in the user's
manual for the PCL.
- Since 3 words of return data are specified, the
communication is completed by reading the FIFO three
times.
If the number of words in the return data is not known,
read the status in the center device. Keep reading the
receiving FIFO until the "RDBB" bit goes LOW.
CEND = 1
YES
Dev_Sts = Inpw (0x0000h)
Read status
Waits until the data communication will complete.
This process may be waiting for an interrupt.
NO
RDBB = 1 ?
NO
YES
Data = Inpw (0x0006h)
Dev_Sts = Inpw (0x0000h)
EDTE = 1
NO
Error processing
YES
Содержание Motionnet G9001A
Страница 1: ...DA70131 1 3E G9001A G9002A User s Manual Center device I O device Remote I O Remote Motion...
Страница 7: ...DA70131 1 3E I 1 I Center device G9001A User s Manual...
Страница 8: ...DA70131 1 3E I 2...
Страница 50: ...DA70131 1 3E I 44...
Страница 51: ...DA70131 1 3E II 1 II I O device G9002A User s Manual...
Страница 52: ...DA70131 1 3E II 2...
Страница 66: ...DA70131 1 3E II 16...
Страница 67: ...DA70131 1 3E III 1 III Connection Examples and Recommended Environments G9000 Series...
Страница 68: ...DA70131 1 3E III 2...
Страница 87: ...DA70131 1 3E IV 1 IV Software Examples flow chart G9001A...
Страница 88: ...DA70131 1 3E IV 2...