Sin Young Access Control Unit Communication Driver

 

Sin Young Access Control Unit is driver to communicate with access control system device of Sin Young E&T Corp., Ltd, in Korea.

 

1. Read settings

 

<Figure 1> is read setting example of Sin Young Access Control Unit communication driver.

<Figure 1> Read setting example of Sin Young Access Control Unit driver

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

Also, enter Read Period(0 ~ 65535 mSec(1000 = 1Sec) between each read schedule and whether to Save Read Card Data to MDB(1 : Save, 0 : Not save, Default = 1) by classifying as comma(,) at protocol Option part.

 

Reference) You can set Com Baud(2400, 4800, 9600) of Sin Young Access Control Unit at device, and Parity Bit etc are fixed as 0, 8, 1.

 

Sin Young Access Control Unit driver's read schedule

Read schedule setting parameters are as follows :

1) STATION – Device number between 0 and 63.

2) Read Data Type – SCAN : Reading scan op code,

CDUMP : Reading card data dump,

SDUMP : Reading schedule data dump,

SFLAG : Reading schedule flag check,

DISCAN : Reading initialize DI data scan op code.

3) Read Start Address – Read type is SDUMP : Group number between 0 and 49(Real = Group between no.1 and no.50) to Dump,

Etc : Don't care.

4) Save Start Address for Communication Server - Saving start address of Communication Server.

5) Read Size – Set as 1. (Fixed according to read data type, Refer to <Table 1>)

 

Read schedule example)

READ,     0,    SCAN,     0,    0,   1,

READ,     1,    SCAN,     0,   20,   1,

 

<Table 1> is read data type and contents of Sin Young Access Control Unit communication driver. 

Read Data Type Contents Save Address and Contents Remarks
SCAN
or Etc
scan op code
(If there is Card Data)

Save addr + 0 : Response command code(op code = A0h ),

Save addr + 1 : Number of read (Increase by 1 continuously, from 0),

Save addr + 2 : Card unique number(1 BYTE data),

Save addr + 3 : Card number(WORD data),

Save addr + 4 : Relay number,

Save addr + 5 : YNT value(Y = 59h, N = 4Eh, T = 54h),

Save addr + 6 ~ 10 : Occurred Month/Day/Hour/Minute/Second

In case of saving read card data as MDB file.

(Select from option)

 

Save the read value to DataSaveDirectory\CardData\CardData.mdb file, in order.

 

But if there is data,

(op code = A0h, A1h)

doesn't save the value.

scan op code(If there is only DI Data)

Save addr + 0 : Response command code(op code = A1h),

Save addr + 1 : Number of read(Increase by 1 continuously, from 0),

Save addr + 2 : Door status(Electronic Lock(N.O) = 1 : Close, 0 : Open,

D.B.(N.C.) =  0 : Close, 1 : Open),

Save addr + 3 : Meaningless data,

Save addr + 4 ~ 8 : Occurred Month/Day/Hour/Minute/Second

scan op code
(If there isn't Data)
Save addr + 0 : Response command code(op code = ADh)
CDUMP Reading card data dump

Save addr + 0 : 1st card unique number,

Save addr + 2 : 1st card number,

Save addr + 3 ~ 4 : 1st card On/Off Time(0, In case of 0, it is 24hour),

Save addr + 5 : 2nd card unique number,

Save addr + 6 : 2nd card number,

Save addr + 196 : 50th card unique number,

Save addr + 197 : 50th card number,

Save addr + 198 ~ 199 : 50th card On/Off Time(0, In case of 0, it is 24hour)

Always, 50 card data

SDUMP Reading schedule data dump

Save addr +  0 ~ 1 : On hour, min of 1st schedule,

Save addr +  2 ~ 3 : Off hour, min of 1st schedule,

Save addr +  16 ~ 17 : On hour, min of 5th schedule,

Save addr +  18 ~ 19 : Off hour, min of 5th schedule,

 

SFLAG Reading schedule flag check Save addr +  0 : The set Relay number

01h = Set the 1st schedule,

0Fh = Set the 1st ~ 5the schedule

DISCAN initialize DI data scan op code

Save addr + 0 : Door status(Electronic Lock(N.O) = 1 : Close, 0 : Open,

D.B.(N.C.) =  0 : Close, 1 : Open),

Save addr + 1 : Meaningless data,

Save addr + 2 ~ 6 : Occurred Month/Day/Hour/Minute/Second

 

<Table 1> Read data type and contents of Sin Young Access Control Unit communication driver

Notice) Read value of Sin Young Access Control Unit driver is saved at same save position of WORD/FLOAT/DWORD memory, and save value is different according to memory type.

 

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

<Figure 2> Sin Young Access Control Unit communication driver's Option dialog box
You can set read schedule by using , ,  button and listbox of <Figure 2>.

Also, you can set Read Period between Schedule(0 ~ 65535 mSec(1000 = 1Sec), Default = 0) and Whether to Save Read Card Data as MDB file(1 : Save, 0 : Not save, Default = 1) at 'Read Period' area and 'Save Read Card Data to MDB' area.

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

<Figure 3> Sin Young Access Control Unit communication driver's read schedule Add/Edit dialog box
2. Writing settings

You can set card data etc of Sin Young Access Control Unit by using writing setting.

 

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             Connected communication port number. (Not COM number)

2) Station         Input device number between no.0 and no.63.

3) Address      Input card number, group number and etc according to writing type,

                        DOWN : Input card number between 0 and 1499(card between 1st ~ 1500th),

                        CLR : Input group number between 0 and 49(1 ~ 50 group),

                        GDOWN : Input group number to download between 0 and 49(1 ~ 50 group),

                        SDUMP : Input group number to dump(read) between 0 and 49(1 ~ 50 group),

                        Etc : Don't care.

4) Extra1          Write/Read Command,

                        DOWN : Download card data (one by one),

                        ACLR : All the card data buffer clear,

                        CLR : Card data by group buffer clear,

                        TIME : Synchronize device time with computer time,

                        ARELAY : Control all relays,

                        RELAY1 : Control each relay(OFF after ON),

                        RELAY2 : Control each relay(ON or OFF maintain type),

                        SCH : Download schedule data,

                        ONTIME : Set holding time of relay ON,

                        GDOWN : Download card data by group,

SCAN, CDUMP, SDUMP, SFLAG, DISCAN : Read command(Refer to <Table 1>),

5) Extra2          Set card unique number, save address and etc according to writing type,

DOWN: Input card unique number(value between 0 and 255) to set,

SCAN, CDUMP, SDUMP, SFLAG, DISCAN : Memory start address to save read value(read command),

Etc : Don't care.

 

<Table 2> is description for output type and output parameter of Sin Young Access Control Unit communication driver, and <Table 3> is input method of download data.

Output Type(Extra1) Address
(Decimal Number)
Extra2 Output/Download data Contents Remarks
DOWN Card order number
(0 ~ 1499)
Card unique number
(Value between 0 and 255)
Card number
(Value between 0 and 65535)
Download each card data  
ACLR Don't care Don't care Don't care Clear all card data buffer  
CLR Group number(0 ~ 49) Clear card data buffer by group  
TIME Don't care Synchronize device time with computer time  
ARELAY 0 = Off, 1 = On Control all relay  
RELAY1 Don't care Control each relay(OFF after ON)
RELAY2 0 = Off, 1 = On Control each relay(ON or OFF maintain type)  
SCH Send after entering data, such as <Table 3> method Download schedule data Input twenty(4 * 5) data, in order
(On hour and min, Off hour and min)
ONTIME Value between 0 sec and 10 sec Set holding time of relay ON
GDOWN Group number(0 ~ 49) Send after entering data, such as <Table 3> method Download card data by group Input 200(4 * 50) data, in order
(Card unique number(0 ~ 255), Card number(0 ~ 65535), On time, Off time)
SCAN, CDUMP, SDUMP, SFLAG, DISCAN SDUMP=Group number
(0 ~ 49)

Etc = Don't care
Memory start address to save read value Don't care Read command Refer to <Table 1>
<Table 2> Description for output type and output parameter etc of Sin Young Access Control Unit communication driver

File name

Input WorkDirectory\SCAN\comm%03d.ini command

(%03d : PORT number, file is deleted automatically after reading)

Writing Method

Enter number which are classified by comma(,) to single line

Remarks

 

<Table 3> Input method of download data of Sin Young Access Control Unit communication driver

(Importance) Setting data download enters data to download to designated file.

 

Write example 1)

PORT : 0   STATION : 0   ADDRESS : 0000  EXTRA1 : DOWN  EXTRA2 : 155

If you set as above and write 38711 value, you can download no.0(first) card value of Sin Young Access Control Unit's no.0 device connected with no.0 port.

 

Write example 2)

PORT : 0   STATION : 0   ADDRESS : 0005  EXTRA1 : DOWN  EXTRA2 : 155

If you set as above and write 38716 value, you can download no.5(5th) card value of Sin Young Access Control Unit's no.0 device connected with no.0 port.

 

Write example 3)

PORT : 0   STATION : 0   ADDRESS : 0191  EXTRA1 : TIME  EXTRA2 : 0

If you set as above and write analog value, you can synchronize time for Sin Young Access Control Unit's no.0 device connected with no.0 port with computer time.

 

Write example 4)

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

If you set as above and write analog value, you can control(OFF after ON) relay of Sin Young Access Control Unit's no.0 device connected no.0 port.

 

Write example 5)

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

If you set as above and write analog value, you can download schedule data of Sin Young Access Control Unit's no.0 device connected with no.0 port. ( But, schedule data has to be entered at 'WorkDirectory\SCAN\comm000.ini' file. )

 

Reference) Input schedule data  Ex) 14,1,14,2,15,35,16,0,・.  ( ON at 14:01, OFF at 14:02, ON at 15:35, OFF at 16:00, ・,)

 

Write example 6)

PPORT : 0   STATION : 0   ADDRESS : 0003  EXTRA1 : GDOWN  EXTRA2 : 0

If you set as above and write analog value, you can download no.3(4th) Card group data of Sin Young Access Control Unit's no.0 device connected with no.0 port. ( But, group download data has to be entered at 'WorkDirectory\SCAN\comm000.ini' file. )

 

Reference) Input card group data  Ex) 1155,38711,8,15,155,38712,0,0,・.  ( 155 card unique number, 38711 card number, ON at 8:00, OFF at 15:00, 155 card unique number, 38712 card number, ON at 00:00, OFF at 00:00(Use 24 hours), ・,)

 

Write example 7)

PORT : 0   STATION : 0   ADDRESS : 0003  EXTRA1 : SCAN  EXTRA2 : 100

If you set as above and write analog value, it saves value to no.100 address of WORD/DWORD/FLOAT memory first after reading scan op code of Sin Young Access Control Unit's no.0 device connected with no.0 port.

 

3. Communication cable

Connect general RS-232C communication cable to COM1 terminal of Sin Young Access Control Unit device.

<Figure 4> is appearance of Sin Young Access Control Unit device.

<Figure 4> Appearance of Sin Young Access Control Unit device