JC_2310 communication driver

 

JC_2310 communication driver is the driver to communicate with Lighting controller of JoongAng Control CO., LTD. in Korea.

 

1. Read Settings

 

<Figure 1> is read setting example of JC_2310 communication driver.

<Figure 1>  Read setting example of JC_2310 communication driver

Device part of  <Figure 1> input Com Port(COM1), Baud Rate(2400), Parity Bit(0), Data Bit(8), Stop Bit(1) respectively, according to controller.

 

JC_2310 communication driver read schedule 

Read schedule setting parameters are as follows:

1) Station – 0 ~ 31 controller station number.

2) Status or Upload –  UP = setting status Upload command, ON = Online status check, 0 or etc = read of current status.

3) Read data type – 0 or etc =  1 : relay operation time,  2 : current relay status,  3 : group, pattern status,  4 : photh sensor status,  5  : blackout monitoring data,  6 : relay operation time delete,  7 : check of mater switch,  9 : check of illumination value.

UP =  1 : upload of switch data,  2 : upload of group data,  3 : upload of schedule data,  4 : read of current date, time,  5  : upload of module data,  6 : upload of pattern data,  7 : upload of history data.

ON –  don't care.

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

5) Read Size – 1 ~ 32 read data size. ( UP = fixed to read size )

6) Read start address – Read start address when 'UP' data type.

7) Sorting method – Decimal or Hex-decimal sorting method. 10 = decimal, 16 = hex-decimal.

 

Read schedule example) 

READ, 1,    0,  2,  0,  1,  1,  16,

READ, 1,    0,  3,  5,  1,  1,  16,

READ, 1,  UP,  2, 10,  1,  1,  16,

 

When the status upload command is 'On', error status data save as follows :

Start addr + 0 bit  :  Date & Time error (error status : 0 bit = ¡®1¡¯(ON)).

Start addr + 1 bit  :  Schedule error.

Start addr + 2 bit  :  Switch Module Enable Data Checksum error.

Start addr + 3 bit  :  Switch Data Checksum error.

Start addr + 4 bit  :  Pattern Data Checksum error.

Start addr + 5 bit  :  Group Data Checksum error.

Start addr + 6 bit  :  Always filxed to 1.

 

The readed data of relay operation time save as follows.

Start addr + 0  : relay count.

Start addr + 1  : minute of operation time for 1st relay.

Start addr + 2  : hour of operation time for 1st relay.

Start addr + 3  : minute of operation time for 2nd relay.

Start addr + 4  : hour of operation time for 2nd relay.

¡¦

 

The readed data of relay status save as follows :

Start addr + 0 ~ : 0 bit ~ 63 bit : relay On/Off status.

 

The readed data of group, pattern status save as follows :

Start addr + 0 ~  : 0 bit ~ 31 bit : group status data.

Start addr + 3 : last pattern operation number( 1~ 16). 0 = don't operate(pattern).

 

The readed data of photo sensor save as follows :

Start addr + ) : 0 bit ~ 3 bit : photh sensor 1 ~ 4 status.

 

The readed data of blackout status save as follows :

Start addr + 0  : 66H – blackout,  27H - return form blackout .

 

The readed data of illumination value save as follows :

Start addr + 0 ~ 3  : sensor 1 ~ 4 illumination value( 1 ~ 127).

 

The readed data of switch upload data save as follows :

Start addr + 0 ~ 5  : switch relay number.  1 ~ 64 – relay number,  65 ~ 96 – group number,  97 ~ 112 – pattern number.

 

The readed data of group, pattern data upload save as follows :

Start addr + 0bit ~ 63bit  : group, pattern data.

 

The readed data of schedule upload data save as follows :

Start addr + 0  : operation status  0 – OFF,  1 – ON,  schedule number 1.

Start addr + 1  : operation time(hour).

Start addr + 2  : operation time(minute).

Start addr + 3  : schedule data,  1 ~ 64 – relay,  65 ~ 96 – group,  96 ~ 112 – pattern.

¡¦

Start addr + 12  : operation status  0 – OFF,  1 – ON,  schedule number 4.

Start addr + 13  : operation time(hour).

Start addr + 14  : operation time(minute).

Start addr + 15  : schedule data,  1 ~ 64 – relay,  65 ~ 96 – group,  96 ~ 112 – pattern.

 

The readed data of data/time upload data save as follows :

Start addr + 0  : year 2digit (00 ~ 99).

Start addr + 1  : month (1 ~ 12).

Start addr + 2  : day (1 ~ 31).

Start addr + 3  : hour (0 ~ 23).

Start addr + 4  : minute (0 ~ 59).

Start addr + 5  : second (0 ~ 59).

 

The readed data of switch module Enable upload data save as follows :

Start addr + 0 ~ 16  : switch module enable/disable,  0 – disable,  1 – enable.

 

2. Writing settings

You can control JC_2310 controller by using write settings.

  

Digital Write

Analog write setting parameters are as follows:

1)  PORT                   Port no. (0 ~ 255)

2)  STATION             0 ~ 31 controller station number.

3)  ADDRESS          Writing address.

0,  GRP, PTN writing command : 1 ~ 64 relay number, 1 ~ 32 group number, 33 ~ 48 pattern number,

indivisual download command : number of download data. 

4)  Extra1                  Write command.

0 – relay control, SET – delete of relay operation time,  GRP – group control, PTN – pattern control,  PON – return from blackout ON control,  POFF – return from blackout OFF control,

SCHG – downolad of Off control extension, SDN – downolad of switch data, GDN – downolad of group data, PDN – downolad of pattern data,

SCH – downolad of schedule data,  DAT – downolad of current time, SCTL – downolad of switch module use or not. 

5)  Extra2                  Download option when SDN,  GDN,  PDN,  SCH write command. 

0 = total data download,  1 – indivisual data download.

 

Write example 1)

PORT:0,  station:1, ADDRESS:0001, Extra1:0,  Extra2 : 0

The setting parameter shown above is a relay control example for 1st relay.

 

Write example 2)

PORT:0,  station:1, ADDRESS:0002, Extra1:GRP,  Extra2 : 0

The setting parameter shown above is group control example for 2nd group.

 

Write example 3)

PORT:0,  station:1, ADDRESS:0005, Extra1:GDN,  Extra2 : 1

The setting parameter shown above is indivisual group download control example for 5th group. The download setting data read from ¡°work folder\SCAN\GDN_101.000¡±.

 

Write example 4)

PORT:0,  station:1, ADDRESS:0005, Extra1:GDN,  Extra2 : 0

The setting parameter shown above is total(1 ~ 32) group download control example. The download setting data read from ¡°work folder\SCAN\GDN_01.000¡±.

 

Note) Download setting data input such as follows.

Write command Total/Indivisual Folder and filename Remarks
SCHG (Off control extension)   work folder\SCAN\SCHG_%02d.%03d %02d =
station(00 ~ 31),
%03d =
port number(000 ~ 255)
SDN (switch data) Total work folder\SCAN\SDN_%02d.%03d
Indivisual work folder\SCAN\SDN_1%02d.%03d
GDN (group data) Total work folder\SCAN\GDN_%02d.%03d
Indivisual work folder\SCAN\GDN_1%02d.%03d
PDN (pattern data) Total work folder\SCAN\PDN_%02d.%03d
Indivisual work folder\SCAN\PDN_1%02d.%03d
SCH (schedule data) Total work folder\SCAN\SCH_%02d.%03d
Indivisual work folder\SCAN\SCH_1%02d.%03d
DAT (date/time setting)   download of current computer time
SCTL (switch module use or not)   work folder\SCAN\SCTL_%02d.%03d
<Table 2> Folder and filename for each write command
Write command Total/Indivisual Contents of download data Remarks
SCHG (Off control extension)   ON/OFF, hour, minute, schedule data,  
SDN (switch data) Total switch data 1 ~ 6 of switch number 0,
switch data 1 ~ 6 of switch number 1,
¡¦
switch data 1 ~ 6 of switch number 15.
16 switch data
Indivisual switch data 1, switch data 2,¡¦switch data 6,  
GDN (group data) Total  word data, group 1 ~ 4 of group number 1,
word data, group 1 ~ 4 of group number 2,
¡¦
word data, group 1 ~ 4 of group number 32,
1 WORD 16 bit,
16 x 4 = 64 relay.

32 group data.
Indivisual word data, group 1 ~ 4.  
PDN (pattern data) Total  word data, pattern 1 ~ 4 of pattern number 33,
 word data, pattern 1 ~ 4 of pattern number 34,
¡¦
 word data, pattern 1 ~ 4 of pattern number 48.
1 WORD 16 bit,
16 x 4 = 64 relay.

16 pattern data.
Indivisual  word data, pattern 1 ~ 4  
SCH (schedule data) Total number of 1 ~ 4 ON/OFF, hour, minute, schedule,
number of 5 ~ 9 ON/OFF, hour, minute, schedule,
¡¦
number of 61 ~ 64 ON/OFF, hour, minute, schedule.
4 x 16 schedule
Indivisual ON/OFF, hour, minute, schedule, ~ ON/OFF,.., 4 schedule
DAT (date/time setting)   download of current computer time don't use download data
SCTL (switch module use or not)   6 bit switch use or not 1 ~
6bit switch use or not 16
6 bit x 16 =
96 switch
<Table 3>Contents of download data for each write command

 

Analog Write

Analog write and digital write have the same setting parameters except output value.