IsoBase Extended System (IES)
Sida 1 (25) V1.4
Due to our policy of continual improvement, specifications may change without prior notice
Earth Leakage Monitoring System IsoBase | IsoHub | IsoOut Binary Implementation User Manual
Megacon AB Ranhammarsvägen 20 168 67 Bromma Org nr: 556221‐2281 Tel: 08‐402 42 50 Fax: 08‐26 80 50
[email protected] www.megacon.se
Sida 2 (25) V1.4
Contents 1 RS485 Communication ........................................................................................................ 3 1.1 Communication description ........................................................................................... 3 1.2 The massage format ....................................................................................................... 3 1.3 CRC‐16‐ algorithm .......................................................................................................... 4 1.4 Command Responses ..................................................................................................... 4 1.5 Commands ...................................................................................................................... 5 1.5.1 Get_Info .................................................................................................................. 6 1.5.2 Get_Date_Time ...................................................................................................... 6 1.5.3 Get_Settings ........................................................................................................... 7 1.5.3.1 Extended_Get_Filter_Settings ....................................................................... 8 1.5.4 Get_Value ............................................................................................................... 9 1.5.4.1 Extended_Get_Value_TRMS_Unfiltered ...................................................... 10 1.5.4.2 Extended_Get_Value_TRMS_Filtered .......................................................... 10 1.5.4.3 Extended_Get_Value_THD ........................................................................... 10 1.5.5 Get_State .............................................................................................................. 11 1.5.6 Get_Maximum ...................................................................................................... 12 1.5.7 Get_Minimum ...................................................................................................... 13 1.5.8 Get_Memory ........................................................................................................ 14 1.5.9 Get_Event_Info .................................................................................................... 15 1.5.10 Get_Memory_Event ............................................................................................. 16 1.5.11 Get_Power_Up ..................................................................................................... 17 1.5.12 Set_Date_Time ..................................................................................................... 18 1.5.13 Set_Settings .......................................................................................................... 19 1.5.13.1 Extended_Set_Filter_Settings ...................................................................... 20 1.5.14 Res_Maximum ...................................................................................................... 21 1.5.15 Res_Minimum ...................................................................................................... 22 1.5.16 Res_Memory ........................................................................................................ 23 1.5.17 Res_Event_ Memory ............................................................................................ 24 1.5.18 Res_Power_ Memory ........................................................................................... 25
Megacon AB Ranhammarsvägen 20 168 67 Bromma Org nr: 556221‐2281 Tel: 08‐402 42 50 Fax: 08‐26 80 50
[email protected] www.megacon.se
2(25)
Sida 3 (25) V1.4
1 RS485 Communication 1.1 Communication description Serial communication occurs between an IsoBase device and a Host computer according to a master‐slave model, in which the device is configured as the slave. The communication through a defined protocol is carried out on a single line (half duplex), meaning that messages are sent in opposite directions at different times. The device places itself in a reception mode when it receives a SOF (Start Of Frame) character, and it remains in this condition until it receives an EOF (End Of Frame) character. For a multi‐drop connection, each slave must have a specific address in order to be identified by the Host device, avoiding errors on the communication line. To avoid communication errors and to optimise the line speed the operator may assign to each unit a logical number (address or node). As well as the possibility to identify the device through a logical number, the operator may assign to the slave a serial number instead (serial number is assigned by the manufacturer). It is recommended to assign a logical number in order to speed‐up the whole communication process. 1.2 The massage format The following message format is used as an interface between the host computer software and the slave IsoBase units: Address, Command, Length, Data, CRC : Start Of Frame, ASCII character 31H, one byte. Address: Logical identification, numerical 1‐255, one byte. Command: Requested information, see commands, numerical 1‐255, one byte. Length: The length of the included data, numerical 0‐65535, two bytes. Data: The required data if any. CRC: 16 bits CRC (Cyclic Redundancy Check) to verify that the received message, two bytes. : End Of Frame. ASCII character 34H, one byte.
Megacon AB Ranhammarsvägen 20 168 67 Bromma Org nr: 556221‐2281 Tel: 08‐402 42 50 Fax: 08‐26 80 50
[email protected] www.megacon.se
3(25)
Sida 4 (25) V1.4
1.3 CRC‐16‐ algorithm Code example for CRC‐16‐ algorithm implemented in C: void CRC16(Byte bufInOut[], uint16 sizeIn) { uint16 poly = 0x1021; /* Generator Polynomial. */ uint16 crc = 0xffff; uint16 i,j; unsigned char byte, crcbit, databit; for (i = 0; i