APPX
Appendix 1 Example for Replacing Ladder by C Language
189
A
The CPU module is C Controller module
■
Example for using the C Controller module dedicated function
short CCPU_DedicatedJInstSample(void){
short sRet=0;
/*(1)*/
char pcInstName[8]="REMTO";
/*(2)*/
short sNetNo=1;
/*(3)*/
short sChan=1;
/*(4)*/
short sStNo=1;
/*(5)*/
short sIoNo=0x0000;
/*(6)*/
short sAdd=0;
/*(7)*/
short psData[5]={1,2,3,4,5};
/*(8)*/
short sSize=5;
/*(9)*/
short psCmp[2]={0,0};
/*(10)*/
/*(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
Содержание MELSEC iQ-R C
Страница 1: ...MELSEC iQ R C Controller Module Programming Manual ...
Страница 2: ......
Страница 201: ...I 199 MEMO ...
Страница 203: ...I 201 MEMO ...
Страница 207: ......