Mitsubishi Electric MELSEC iQ-R C Series Programming Manual page 243

Controller module
Table of Contents

Advertisement

The CPU module is C Controller module
Example for using the C Controller module dedicated function
short CCPU_DedicatedJInstSample(void){
short sRet=0;
char pcInstName[8]="REMTO";
short sNetNo=1;
short sChan=1;
short sStNo=1;
short sIoNo=0x0000;
short sAdd=0;
short psData[5]={1,2,3,4,5};
short sSize=5;
short psCmp[2]={0,0};
/*(11)*/
sRet=CCPU_DedicatedJInst(
pcInstName,
sNetNo,
1,
&sChan,
1,
&sStNo,
1,
&sIoNo,
1,
&sAdd,
1,
psData,
5,
&sSize,
1,
psCmp,
2,
NULL,
0,
NULL,
0
);
return sRet;
}
(1) Return value of the CCPU_DedicatedJInst function
(2) Instruction
(3) Target network No. (1 to 239)
(4) Own station channel (1 to 32)
(5) Target station number (1 to 120)
(6) Start input/output number of an intelligent function module (0x0000 to 0x00FE)
(7) Start address of the buffer memory (0 to 65535)
(8) Data to be written
(9) Number of units of data to be written (1 to 240 words)
(10) Instruction completion result
(11) Execution of a dedicated instruction
/*(1)*/
/*(2)*/
/*(3)*/
/*(4)*/
/*(5)*/
/*(6)*/
/*(7)*/
/*(8)*/
/*(9)*/
/*(10)*/
Appendix 1 Example for Replacing Ladder by C Language
A
APPX
241

Advertisement

Table of Contents
loading

Table of Contents