3 DETAILS OF FUNCTION
3.1 C Controller Module Dedicated Functions
143
3
CCPU_X_In_Word_ISR
This function reads an input signal (X) in word (16-point) units.
■
Format
short CCPU_X_In_Word_ISR (unsigned short usXNo, unsigned short usSize, unsigned short* pusDataBuf)
■
Argument
■
Description
• This function operates to the mounted module corresponding to the specified start input signal (usXNo) regardless of the
type of the parameter setting (I/O assignment). When the specified area is "empty" or "output module", this function ends
normally without processing (read data: 0).
• The input status controlled by other CPUs is not imported.
(The setting to import the out-group input status for the multiple CPU setting is ignored.)
• This function reads an input signal (X) for the size specified to the read data size (usSize) from the start input signal (X)
specified to the start input signal (usXNo), and stores it in the data storage destination (pusDataBuf).
• Specify the start input signal (usXNo) in multiples of 16. (The remainder divided by 16 is discarded.)
• Read data is stored in the data storage destination (pusDataBuf) in ascending order from the lower bit as shown below.
• Do not execute this function in a routine other than an interrupt routine.
• Do not execute this function to an I/O assignment on which an intelligent function module or an interrupt
module is mounted.
■
WARNING
• If any function in which an invalid argument is specified is executed, an error such as hardware failure (3C02H) may occur
on C Controller module.
• This function does not check the specified argument.
When creating a program, note the following:
An address specified to the read data is a multiple of 2.
A data area for the size (words) of the read data is reserved.
An input signal (X) which is out of the range (excluding 0H to FFFH) is not specified.
■
Return value
■
Relevant functions
• Page 144 CCPU_Y_In_Word_ISR
• Page 145 CCPU_Y_Out_Word_ISR
Argument
Name
Description
IN/OUT
usXNo
Start input signal
Specify a start input signal (X).
(Specify a multiple of 16.)
IN
usSize
Read data size
Specify the read data size in word units.
IN
pusDataBuf
Data storage destination
Specify the storage destination of read data.
OUT
pusDataBuf
Description
pusDataBuf[0]
Data of usXNo+FH to usXNo
pusDataBuf[0]
Data of usXNo+1FH to usXNo+10H
pusDataBuf[usSize-1]
Data of usXNo+(usSize-1)
16+FH to usXNo+(usSize-1)
16
Return value
Description
0 (0000H)
Normal
Other than 0
Error
For details on the error, refer to the following chapter.
Содержание MELSEC iQ-R C
Страница 1: ...MELSEC iQ R C Controller Module Programming Manual ...
Страница 2: ......
Страница 201: ...I 199 MEMO ...
Страница 203: ...I 201 MEMO ...
Страница 207: ......