Smart Eye R4 Communication Driver

 

Smart Eye R4 communication driver is driver to communicate with power monitoring controller of BMT Co,. Ltd. in Korea.

 

1. Read settings

<Figure 1> is read setting example of Smart Eye R4 communication driver.

<Figure 1> Read setting example of Smart Eye R4 communication driver

 Device part of  <Figure 1> input Com Port(COM8), Baud Rate(38400), Parity Bit(0), Data Bit(8), Stop Bit(1) respectively, accordint to the setting of controller.

 

Read schedule of Smart Eye R4 communication driver

Read schedule setting parameters are as follows:

1)    Station – module ID number of controller, 0 ~ 99.

2)    Read command – command : PHAS, CONS, CALI, QUAL, THD, ID. ( refer to <Table 1> )

3)    Read start address – don't care.

4)    Save start address for Communication Server – Saving start address of Communication Server.

5)    Read size – fixed to 1.

 

Read schedule example)

READ, 0, PHAS, 0, 0, 1,
READ, 0, CONS, 2, 1, 1,

 

<Table 1> is read command and contents of Smart Eye R4 communication driver.

Read command

Contents

Store Values
(Save Start Address + 0)

Remarks

PHAS

 R/S/T phase value reading

Save Start Address + 0 ~ 2 : R/S/T phase rms current

Save Start Address + 3 ~ 5 : R/S/T phase rms voltage

Save Start Address + 6 ~ 8 : R/S/T phase frequency

Save Start Address + 9 ~ 11 : R/S/T phase active power

Save Start Address + 12 ~ 14 : R/S/T phase reactive power

Save Start Address + 15 ~ 17 : R/S/T phase apparent power

Save Start Address + 18 ~ 19 : R phase power factor, status

Save Start Address + 20 ~ 21 : S phase power factor, status

Save Start Address + 22 ~ 23 : T phase power factor, status

Save Start Address + 24 ~ 26 : R/S/T phase temperature

Save Start Address + 27 ~ 29 : R/S/T phase power quality status



float value
(refer to DOUBLE, FLOAT memory)


power status
 0 = plus( + ),
 1 = minus ( - )

CONS

R/S/T phase consumption value reading

Save Start Address + 0 : R phase active energy imported

Save Start Address + 1 : R phase reactive energy IV

Save Start Address + 2 : R phase apparent energy imported

Save Start Address + 3 : S phase active energy imported

Save Start Address + 4 : S phase reactive energy IV

Save Start Address + 5 : S phase apparent energy imported

Save Start Address + 6 : T phase active energy imported

Save Start Address + 7 : T phase reactive energy IV

Save Start Address + 8 : T phase apparent energy imported


float value
(refer to DOUBLE, FLOAT memory)

CALI

R/S/T phase calibration value reading

Save Start Address + 0 ~ 2 : R/S/T phase current rms scaling

Save Start Address + 3 ~ 5 : R/S/T phase voltage rms scaling

Save Start Address + 6 ~ 8 : R/S/T phase power scaling


interger value
( rever to WORD memory)

QUAL

R/S/T phase power quality value reading

Save Start Address + 0 ~ 1 : R phase sag event, sag duration

Save Start Address + 2 ~ 3 : R phase swell event, swell duration 

Save Start Address + 4 ~ 5 : S phase sag event, sag duration

Save Start Address + 6 ~ 7 : S phase swell event, swell duration 

Save Start Address + 8 ~ 9 : T phase sag event, sag duration

Save Start Address + 10 ~ 11 : T phase swell event, swell duration 

Save Start Address + 12 ~ 13 : R phase power down event, duration

Save Start Address + 14 ~ 15 : S phase power down event, duration

Save Start Address + 16 ~ 17 : T phase power down event, duration


interger value
event = refer to WORD memory,
duration = refer to DWORD memory

THD

R/S/T phase fundamental & THD value reading

Save Start Address + 0 ~ 1 : R phase rms voltage, fundamental rms voltage

Save Start Address + 2 ~ 3 : R phase rms current, fundamental rms current

Save Start Address + 4 ~ 5 : R phase THD voltage, current

Save Start Address + 6 ~ 7 : S phase rms voltage, fundamental rms voltage

Save Start Address + 8 ~ 9 : S phase rms current, fundamental rms current

Save Start Address + 10 ~ 11 : S phase THD voltage, current

Save Start Address + 12 ~ 13 : T phase rms voltage, fundamental rms voltage

Save Start Address + 14 ~ 15 : T phase rms current, fundamental rms current

Save Start Address + 16 ~ 17 : T phase THD voltage, current 


float value
(refer to DOUBLE, FLOAT memory)

ID

read of module ID

Save Start Address + 0 : readed module ID

0 ~ 99
<Table 1> Read command and contents of Smart Eye R4 communication driver

Smart Eye R4 communication driver store the same data in WORD, DWORD, FLOAT, DOUBLE memory, but the data format are different.

If you click the icon  in protocol option part at <Figure 1>, you can see the dialog box such as <Figure 2>. you can also set read schedule by using this part.  

<Figure 2> Example of Smart Eye R4 communication driver¡¯s Option dialog box

 

You can set read schedule by using , ,  button and listbox of <Figure 2>.

<Figure 3> Example of Smart Eye R4 communication driver¡¯s read schedule Add/Edit dialog box

 

When you click Add button or Edit button in dialogue box of <Figure 2>, dialogue box of <Figure 3> is shown.

 

2. Write settings

You can set Smart Eye R4 controller by using 'write settings'. 

 

Digital Write

Digital write and analog write have the same setting parameters except output value. 

 

Analog Write 

Analog write setting parameters are as follows:

1)  PORT                   Port no. (0 ~ 255)

2)  STATION             module ID number of controller, 0 ~ 99.

3)  ADDRESS          don't care.

4)  Extra1                  write command = ID.

5) Extra2                   don't care.

 

Write example 1) 

PORT : 0   STATION : 0   ADDRESS : 0000  EXTRA1 : ID  EXTRA2 : 0

The setting parameter shown above is module ID setting(writing value = 0 ~ 99) example for Smart Eye R4 controller.

 

Block Write

Block write use PlcScanWriteBlock script such as follows.

 CONS Block write command use 'double' script variable, also CALI Block write command 'ushort' script variable.

 

script function and parameters : @PlcScanWriteBlock(int port, int station, int address, string extra1, string extra2, object array_value, int array_size);

 

 

    Block write script example 1 ( CONS block write )

 

double  Val[9];

 

Val[0] = 0.1064;
Val[1] = 0.3064;
Val[2] = 0.2064;
Val[3] = 0.1064;
Val[4] = 0.1064;
Val[5] = 0.1064;
Val[6] = 0.1064;
Val[7] = 0.1064;
Val[8] = 0.1064;
@PlcScanWriteBlock(0, 0, 0, "CONS", 0, Val, 9);


    Block write script example 2 ( CALI block write )

 

ushort  Val[9];

 

Val[0] = 12286;
Val[1] = 255;
Val[2] = 32767;
Val[3] = 40000;
Val[4] = 65535;
Val[5] = 1026;
Val[6] = 32767;
Val[7] = 32769;
Val[8] = 40000;
@PlcScanWriteBlock(0, 0, 0, "CALI", 0, Val, 9);

 

3. Appearance of Smart Eye R4

<Figure 4> shows the appearance of Smart Eye R4 controller.

<Figure 4> Appearance of Smart Eye R4 controller