CSGW User Manual: Release 3.0.0 Issued Oct 10, 2013
CSGW User Manual: Release 3.0.0 Issued Oct 10, 2013
0
Issued Oct 10, 2013
Wire CSGW‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 1
Access to CSGW via Web Browser‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 3
System Setup‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 4
Modbus RTU Setup‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 7
Troubleshooting‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐15
Lua Script Programming‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 17
NAE/NCE Mappings‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 19
http://www.cs-controls.com Ⅰ
Release 3.0.0
Issued Oct 10, 2013
Wire CSGW
1. Connect the 24 VAC supply power wires from the transformer to the 3-terminal rising clamp
terminal block as shown in the figure below.
2. Connect the CAT5 cable between the RJ-45 jack on the CSGW and the network switch or hub.
You cannot directly connect CSGW to a PC unless using a “crossover” cable.
⑤ ⑦ ④ ⑤ ⑥ ④ ③ ② ①
NO.
⑤ ⑧
Description
④ ⑤ ⑨ ④ ⑩
http://www.cs-controls.com 1/ 23
Release 3.0.0
Issued Oct 10, 2013
NOTE:
<1> If the yellow Link LED is not on, check the cable to make sure it is connected properly. It should be on
any time power is applied and an Ethernet connection is present.
<2> CSGW takes about 45 seconds to boot up after power is applied. The Fault LED should be on and
web access won’t be available until it is completely started.
<3> There are RESTORE and RESET buttons within the housing. To restore factory default settings,
remove the upper cover, press the RESTORE button and hold for more than 5 seconds, and then press
the RESET button.
<4> To restart CSGW, you can re-applied power to the device or press the RESET button.
http://www.cs-controls.com 2/ 23
Release 3.0.0
Issue
ed Oct 10, 201
13
Acces
ss to CSGW via Web
W Bro
owser
1. Launch the browser
b (pre
eferably IE8 or
o Google Ch
hrome), and enter “http:///192.168.0.123/” as URL
in the addre
ess bar. Auth
hentication is
s required be
efore you can
n access the device.
2. Type in “sys
stem” as use
er name and “root” as pa
assword to lo
ogin the devicce.
3. After login, you
y will see the
t following page:
http://www
ww.cs-controls..com 3/ 23
Release 3.0.0
Issue
ed Oct 10, 201
13
Syste
em Setup
p
1. Change IP address:
a Sys
stem Setup> Setup> Loca
al Host
To enable BACnet
B IP ne
etwork, speciffy the param
meters as follo
ows:
① BAC
Cnet IP Netw
work Numberr = 1 (Enable
es BACnet IP
P Network).
② MS
S/TP Network
k Number = 0 (Disables MS/TP
M Netwo
ork).
③ Clicck the save button.
b
To enable BACnet
B TP1 network, specify the parameters
MS/T p as
a follows:
④ BAC
Cnet IP Netw
work Numberr = 0 (Disables BACnet IP Network).
1
Settingss about MS/TP
P does not app
ply to CSGW--4.
http://www
ww.cs-controls..com 4/ 23
Release 3.0.0
Issue
ed Oct 10, 201
13
⑤ MS
S/TP Network
k Number = 1 (Enables MS/TP
M Netwo
ork).
⑥ Spe
ecify a MS/TP MAC Addrress to CSGW
W and make
e sure it is un
nique on the MS/TP trunkk.
⑦ Clicck the save button.
b
http://www
ww.cs-controls..com 5/ 23
Release 3.0.0
Issue
ed Oct 10, 201
13
To back up the
t current configuration
c , do the followings:
① Clicck the downlo
oad button, and oose a directory to save the
a then cho t configura
ation file.
uration file2, d
To upload a new configu do the follow
wings:
② Clicck the browse button, bro
owse and sellect the confiiguration file..
③ Clicck the uploa
ad button. A page (show e below) will show up to
wn as figure o indicate th
he
uplo
oad result.
2
Configuration files can be download
ded or created
d by CSGWTo
ool. For more information off CSGWTool, please refer to
o
CSGW T Tool User Manual.
http://www
ww.cs-controls..com 6/ 23
Release 3.0.0
Issue
ed Oct 10, 201
13
Modb
bus RTU Setup
1. Setup Modb
bus RTU Local Device pa
arameters: Modbus> Mod
dbus RTU Seetup> Local Device
D
3
Registe
er number staarts from 1, equals
e to regiister address (which starts
s from 0) add ding 1. E.g.: 10003, registeer
number 3 represents re egister addresss 2.
4
Name sshould be shorrt (less than 14
4 characters),, plain and sim
mple. Suggeste
ed characterss are alphanummeric, dash, do
ot,
and spacce, otherwise it might not be
e correctly sho
own in MSEA.
http://www
ww.cs-controls..com 7/ 23
Release 3.0.0
Issue
ed Oct 10, 201
13
Click the up
pdate button to save chan
nges.
To check whether
w the newly created
d mapping works, do the followings:
① Connectt CSGW to PC
P using a “S
Serial to USB
B” cable with RS485 convvertor, find out
o the correcct
COM po
ort for the ca
able on PC.
② Run a Modbus
M slave
e simulator (e
e.g.: mod_RS
Ssim.exe).
③ Select and
a Setup the
e serial port parameters accordingly.
a
④ Select Digital
D Inputs from the I/O
O dropdown list, and set 10003 to 1.
http://www
ww.cs-controls..com 8/ 23
Release 3.0.0
Issue
ed Oct 10, 201
13
⑤ On CSG
GW, Modbus>
> Modbus RT
TU Data> RT
TU Registers
s, Register D
Data of BI 6 should
s be 1.
⑥ Click the
e update buttton, Time sin
nce Last upd
date will chan
nge periodicaally.
5
Coil registers supportt not only readd but also writtten, as well as
s holding regis
sters.
6
UInt16 ((16-bit unsigneed integer) is one of the daata formats. Fo or more inform
mation about th
he data forma
ats, please refe
er
to Part 100.
http://www
ww.cs-controls..com 9/ 23
Release 3.0.0
Issue
ed Oct 10, 201
13
Specify Inp
put Register for Remote Type, York-Sp16 for Re
emote Regisster Format, 1 for Remotte
Register# (register:
( 300
001), 1 for Remote
R Uni t# (slave: 1)), AI 1 for LLocal Objectt, 01RM-T fo
or
Name. Clickk the update button to sa
ave changes..
To check if the newly crreated mapp ing works, pllease refer to
o Part 2.
ues to Coil Registers
6. To write valu R (BO
O, e.g.: BO1, 00002 of sla
ave 1):
Modbus> Modbus
M RTU Setup> RTU
U Write Map
http://www
ww.cs-controls..com 10/ 23
Release 3.0.0
Issue
ed Oct 10, 201
13
④ On the Modsim.exe
M Window, vallue of Coil 2 should be 1.
http://www
ww.cs-controls..com 11/ 23
Release 3.0.0
Issue
ed Oct 10, 201
13
NOTE:
e object can
A read-write n read from a remote Mo
odbus registter to updatee the local BACnet
B objecct
and write th
he present value
v of the local
l BACne
et object whe
enever it is cchanged by other BACne
et
devices.
9. Detailed mapping configuration:
① ② ③
④
⑤
http://www
ww.cs-controls..com 12/ 23
Release 3.0.0
Issued Oct 10, 2013
① Bit mask:4 hexadecimal digits. Usually it’s used to remove undesired bits from data.
e.g.: AI3 is mapped to Modbus register 30002 and only the lower byte is needed. Bit mask is set
to 00FF. Register value A1B2H will be evaluated to 178 (i.e. B2H).
AI4 is mapped to Modbus register 30002 and only the higher byte is needed. Bit mask is set
to FF00 and scale is set to division 256 (i.e. right shift by 8 bits). Register value A1B2H will
be evaluated to 161 (i.e. A1H).
BI2 is mapped to Modbus register 40003 and only bit 0 is needed. Bit mask is set to 0001.
Register value 8001H will be evaluated to 1.
BI3 is mapped to Modbus register 40003 and only bit 5 is needed. Bit mask is set to 0020.
Register value 8001H will be evaluated to 0.
BI4 is mapped to Modbus register 40003 and only bit 15 is needed. Bit mask is set to 8000.
Register value 8001H will be evaluated to 1.
NOTE:
For non-binary objects, bit mask is often used together with scale to get the proper value.
For binary objects, please select Int16 or UInt16 as data format if you specify a bit mask.
② Scale: if the scale value is not zero, register value will be multiplied by it (if the multiplying
radio box is selected), or divided by it (if the division radio box is selected). Default is
multiplying.
e.g.: AI5 is mapped to Modbus register 30003 and one-tenth of the register value is desired. The
scale value is set to multiplying and 0.1. Register value 00C8H will be evaluated to 20.
③ Offset: if set, it will be added to the register value.
e.g.: AI6 is mapped to Modbus register 30003. Offset is set to -0.5, and then register value 000AH
will be evaluated to 9.5 (i.e. 10-0.5).
④ Free expression: For cases that cannot be processed by above parameters, you can use free
expression. For detailed information about supported math functions and operators,please
refer to the Quick Help within the page. x represents the initial value reading from the register.
e.g.: Below is the format representing temperature in a communication protocol, TH-TL is the
higher byte and lower byte respectively.
TH :
BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
0 0 1 0 F T6 T5 T4
TL :
BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
T3 T2 T1 T0 LT1 LT2 LT3 LT4
TH – F (BIT3): sign bit, 1 means negative temperature, 0 means positive temperature.
BIT7BIT4 in TH: reserved, always 0010.
BIT2 BIT0 in TH: the higher 3 bits of temperature data, T6 (BIT2) is the highest bit.
BIT7 BIT0 in TL: the lower 8 bits of temperature data, LT4 (BIT0) is the lowest bit.
The temperature resolution is 0.0625 ℃ (1/16 ℃).
http://www.cs-controls.com 13/ 23
Release 3.0.0
Issued Oct 10, 2013
11. For detailed information about Mapping, please refer to the Quick Help within the page.
http://www.cs-controls.com 14/ 23
Release 3.0.0
Issue
ed Oct 10, 201
13
Troub
bleshooting
1. When Mod
dbus Mapping
gs done, con
nnect a CSG
GW to actual Modbus devvices.
2. To check the reliability and status fllags(e.g.: BI)): Data Objec
ct> Binary> IInput Objects
s
http://www
ww.cs-controls..com 15/ 23
Release 3.0.0
Issue
ed Oct 10, 201
13
http://www
ww.cs-controls..com 16/ 23
Release 3.0.0
Issue
ed Oct 10, 201
13
Lua S
Script Pro
ogramming
1. Enable Lua Script7 function:
up> Setup> Module
System Setu M Settiings
②
①
①
T
To enable Lu
ua Script fun
nction, do the
e followings:
① Che
eck the box “Enable
“ Lua Script”.
② Asssign the COM
M (e.g.: COM
M2) to None (as
( vendor port, defined w
when develo
oping script).
③ Clicck the save button
b in Mod
dule Settings
s page.
2. Upload and run Lua Scripts: Program
mming> Scrip
pt Lua> Prog
gram File
T
To upload a script, do the
e followings:
① Clicck the browse button, bro
owse and sellect the scrip
pt file.
② Clicck the upload
d button. The
e page (show
wn as figure b
below) will sh
how to indic ate
a the
uplo
oad result.
7
Lua Scrripts can be deeveloped accoording to real need. For mo
ore information
n of how to dev
evelop Lua scrripts for CSGW
W,
please re
efer to the builtt-in CSGW La
anguage Help..
http://www
ww.cs-controls..com 17/ 23
Release 3.0.0
Issue
ed Oct 10, 201
13
T
To run a scriipt, do the followings:
③ Clicck on the dro
op-down list of
o “File” to se
elect the script you just u ploaded.
④ Clicck the button
n “Start” to ru n the file.
⑤ If it runs properlly, the Runniing file field will
w show the
e current runnning script file name.
3. Back up and
d delete the script:
s Progra
amming> Sc
cript Lua> Pro
ogram File
T
To back up th
he script, do the following
gs:
① Clicck on the dro
op-down list of elect the script you want tto back up.
o “File” to se
② Clicck the downlo
oad button to
o back up.
T
To delete the script, do the followings::
③ If th
he script is ru
unning, click the stop buttton to termin
nate it.
④ Clicck on the dro
op-down list o
of “File” to se
elect the script.
⑤ Clicck the delete button.
4. To make the
e script run automatically
a y at boot-up:
Programmin
ng > Script Lu
ua > Program
m File
http://www
ww.cs-controls..com 18/ 23
Release 3.0.0
Issue
ed Oct 10, 201
13
NAE/N
NCE Map
ppings
1. Mapping thro
ough IP trunk, do the foll owings:
① Insert In
ntegration.
② Select Object
O Type: BACnet.
http://www
ww.cs-controls..com 19/ 23
Release 3.0.0
Issue
ed Oct 10, 201
13
④ Invoke Auto
A Discove
ery.
⑤ Select Chen
C Sen Ne
etwork Gatew
way, and Las
st Finish Done.
⑥ Inset Fie
eld Points.
http://www
ww.cs-controls..com 20/ 23
Release 3.0.0
Issue
ed Oct 10, 201
13
⑦ Invoke Auto
A Discove
ery.
http://www
ww.cs-controls..com 21/ 23
Release 3.0.0
Issue
ed Oct 10, 201
13
⑨ Now BA
ACnet objects
s created in CSGW
C are listed in NAE//NCE.
NOTE:
an change na
<1> You ca ames of devicces and units of points.
<2> You ca
an create fold
ders before m
mapping poin
nts when devvices inserteed (shown as
s figure below
w).
It is recom
mmended to place points
s into different folders if there’re a large number of pointts
mapped.
http://www
ww.cs-controls..com 22/ 23
Release 3.0.0
Issue
ed Oct 10, 201
13
② Select Object
O Type: Field Bus.
③ Please refer
r to Part 1.
NOTE:
If the superrvisor device is NCE, you
u can add de
evice directly under the FFCB trunk witth no need fo
or
adding Integ
gration and Field
F Bus.
8
Mapping
g through MS//TP trunk does
s not apply to CSGW-4.
http://www
ww.cs-controls..com 23/ 23