User manual

120
Program
Notes
if(communication() == 0) printf("WRITE K0000-K0063 OK\n");
else printf("communication error\n");
receiving_frame[2]=4; /* EXAMPLE write WORD(K064-K0127) */
receiving_frame[3]=130; /* Number Of Byte For Information */
receiving_frame[4]=0x80; /* BASE(K000=$0180) LOW */
receiving_frame[5]=1; /* BASE HIGH */
for(i=0;i<=63;i++)
{
receiving_frame[i*2 +6]= lower_byte(K[i+64]);
receiving_frame[i*2 +7]= upper_byte(K[i+64]);
}
if(communication() == 0) printf("WRITE K0064-K0127 OK\n");
else printf("communication error\n");
}
Writing function of the K Register
Uses the communication function code 4 (writing N consecutive words) to
store the specified value in the K064 to K127 word.
Note:
Absolute address of K64 = 0x0180