Download Print this page

Infinite L-com SRCN-C711-2 User Manual page 6

Ac current sensor & over-current protector

Advertisement

Data Write Format
ID
1 byte
1-247 (Decimal)
When the data returned by the module is consistent with the data sent, the relay is unlocked.
Tips: The ID range in the command is in decimal format, please convert it to Hex (hexadecimal) format when using it.
When user do not know the module ID, user can view or modify the ID directly through the function menu F09. User can also check the ID through the
following commands:
ID
1 byte
FA
This command can only be used in stand alone state.
The returned data is as follows:
ID
1 byte
xx
"xx" is the ID of the module here.
Attachment: CRC check code
Function: CRC check function, generate CRC
Parameter description: arr_buff: array set to be verified
len: the length of the data to be checked
Return parameter: CRC is unsigned int type, High-order byte is high-order first, low-order last.
unsigned int CRC_Compute (unsigned char *arr_buff, unsigned char len)
{
unsigned int crc=0xFFFF; unsigned char i, j;
for ( j=0; j<len; j++)
{
crc=crc ^*arr_buff++; for ( i=0; i<8; i++)
{
if( ( crc&0x0001) >0)
{
crc=crc>>1; crc=crc^ 0xa001;
}
else
crc=crc>>1;
}
}
return ( crc);
Function Code
Register Address
1 byte
06
Function Code
Register Address
1 byte
03
Function Code
Data Length
1 byte
03
Write Data
2 bytes
Write Data
2 byte
0x0064
1 byte
2
00
6
CRC Check
2 bytes
2 bytes
Low in front
CRC Check
2 byte
2 byte
0x0001
D0
ID
CRC Check
2 byte
xx
Low in front
5E
2 byte

Advertisement

loading