5 USER GUIDE
5-106
[CPU02 or LPU/CMU02-side C program example]
#define TOUKA_READ 0xD60160L /*
toukaread() starting address (main) (For the S10V)
*/
#define RBUFADR 0x450000L /*
Reception buffer address (For the S10V)
*/
#define PARADDR 0x452000L /*
Input parameter storage starting address (For the S10V)
*/
#define RW080 0x0E0C10L /*
Self-node status transfer area (RW080)
*/
#define RW090 0x0E0C12L /*
Transparent-message transmission error code area
*/
#define RW100 0x0E0C20L /*
Transparent receiving flag area
*/
struct ToukaRead_p {
long node; /*
Transmission destination node number
*/
unsigned short *Erradr; /*
Error code storage address
*/
unsigned char *dataadr; /*
Reception data storage starting address
*/
unsigned long datasiz; /*
Received data byte count
*/
};
/****************************************/
/* task3:Reception (CPU02 or LPU/CMU02) */
/****************************************/
main()
{
register long ( *toukaread )();
long rtn;
struct ToukaRead_p *read;
unsigned short *nodeflg, *recvarea;
recvarea = ( unsigned short *)RW100; /*
Transparent receiving flag area
*/
nodeflg = ( unsigned short *)RW080;
toukaread = ( long(*)( ))TOUKA_READ;
read = ( struct ToukaRead_p *)PARADDR;
if( ( *recvarea != 0x4000) || /*
Transparent receiving flag area check
*/
!( *nodeflg & 0x4000)) { /*
Self-node status check
*/
return;
}
send->node = 0x00000001; /*
Transmission soure node number
*/
send->Erradr = (unsigned short*)RW090;
/*
Error code storage address
*/
send->dataadr = (unsigned char*)RBUFADR
/*
Reception data storage starting address
*/
send->datasiz = 1024; /*
Received data byte count
*/
rtn = ( toukaread )( read ); /*
Transparent-message reception
*/
if( rtn != 0){ /*
Return code check
*/
return;
}
while( 1 ){
if( !( *nodeflg & 0x8000)){ /*
Wait for message processing termination
*/
break;
}
}
}
Note1: For the S10mini, change the #define TOUKA_READ value from 0xD60160 into
0xD74178L, the #define RBUFADR value from 0x450000L into 0x1E6000L, and
the #define PARADDR value from 0x452000L into 0x1E5000L.
Summary of Contents for FL.NET
Page 1: ......
Page 2: ......
Page 29: ...1 OVERVIEW ...
Page 33: ...2 FL NET MODULE ...
Page 42: ...3 FL NET MODULE INSTALLATION ...
Page 46: ...4 FL NET MODULE WIRING PROCEDURES ...
Page 53: ...5 USER GUIDE ...
Page 203: ...5 USER GUIDE 5 151 Sample printout ...
Page 206: ...6 MAINTENANCE ...
Page 210: ...7 TROUBLESHOOTING ...
Page 225: ...8 APPENDIXES ...