UUser A Man Adva fo ual antec or AD ch C DAM CODE M

advertisement
U
User Manual
Adva
A
antec
ch CODE
C ESYS
S
fo
or AD
DAM
M-556
60
CONTENTS
1. Introduction .......................................................................................................... 4 2. 3. 4. 1.1. About This Manual ............................................................................................... 4 1.2. Organization of This Manual ................................................................................ 4 Installations ....................................................................................................................... 7 2.1. CODESYS Installation ........................................................................................... 7 2.2. Add‐on Package Installation .............................................................................. 10 2.2.1 First‐time Installation............................................................................ 10 2.2.2 Updating the Package ........................................................................... 13 Create and run a project ................................................................................................. 16 3.1. Start CoDeSys ..................................................................................................... 16 3.2. Create a Project ................................................................................................. 17 3.3. Write a Program ................................................................................................ 19 3.4. Connect to the Target Device ............................................................................ 21 3.5. Run the Application ........................................................................................... 23 Advantech I/O Modules .................................................................................................. 26 4.1. Insert I/O Modules into CODESYS ...................................................................... 26 4.2. Map Variables to I/O Modules .......................................................................... 27 4.3. Support List ........................................................................................................ 29 4.4. Digital Input Modules ........................................................................................ 30 4.5. Digital Output Modules ..................................................................................... 32 4.6. Analog Input Modules ....................................................................................... 34 1 5. 4.7. Analog Output Modules .................................................................................... 35 4.8. Relay Output Modules ....................................................................................... 37 4.9. Counter/Frequency Modules ............................................................................. 38 Diagnosis and Troubleshooting ...................................................................................... 44 5.1. Error Notification ............................................................................................... 44 5.2. Log Information ................................................................................................. 44 5.3. Error ID ............................................................................................................... 45 2 Chapter
3 1
1. Introduction
1.1.
AboutThisManual
This document describes the use of the CODESYS programming environment and the Wince runtime system for the Advantech ADAM‐5560 series products. Advantech provides add‐on package for CoDeSys which allows developers and end users to connected I/O modules, perform configurations, and simple testing of the I/O. This manual supplies information about how to apply CoDeSys to control Advantech ADAM‐5560, including software installation, writing a new program in CoDeSys to testing ADAM I/O modules. 1.2.
OrganizationofThisManual
This user manual is divided into the following sections: 
Introduction 
Installations 
Create and run a project 
Advantech I/O Modules 
Diagnosis and Troubleshooting Introduction This section gives the user a basic idea of this manual. 4 Installations This section provides instructions on how to install CoDeSys and Advantech Add‐on Package Create and run a project This section gives the new user a walk‐through in creating a simple program. Advantech I/O Modules This section introduces the detail configuration and mapping variables of Advantech ADAM I/O modules Diagnosis and Troubleshooting This section provides instructions on how to troubleshooting and diagnose operation mistakes or module errors. 5 Chapter
6 2
2. Installlations
1.
2.1
CO
ODESYS
SInstalllation
Step
p1: Double click and execcute the “Settup_CODESY
YSV<Version>.exe” to staart the instaallation assisstant and the
en click Nextt to continue
e. 7 Step
p 2: You will then be prom
mpted for thhe installation location. B
By default, CooDeSys will instaall to C:\Proggram Files\3S CODESYS, but you can specify the location or foolder name o
of yourr choice. Clicck Next to proceed. Step
p 3: Select all features an
nd then click Next to procceed.. 8 Step
p 4: Complette to install C
CoDeSys and you’ll see Co
oDeSys icon
the desktop. Clicck "Finish" to
o close the innstallation w
wizard. 9 whicch is available on 2.2
2.
Ad
dd‐onP
PackaggeInsta
allation
n
Now
w that you haave CoDeSys on your systtem, you’ll w
want to do a few steps too install add‐on packkage on yourr environment. 2.2
2.1 Firrst‐tim
meInsta
allation
n
Step
p 1: Install th
he latest verssion of the addd‐on package by double
e‐clicking thee executable
e “Advvantech ADA
AM CODESYS ADD ON.ppackage”. Note!
If you get aan error statiing “you musst have administrative rights in orderr to install orr uninstall a package” on
n Window 7, you should turn UAC offf. 10 (a) Open User A
Account Conttrol Settings by clicking tthe Start button , and then clicking Conttrol Panel. In
n the search box, type ua
ac, and then click Changee User Accou
unt Control setttings. Never notify pposition, and
d then click O
OK. (b) Move the sliider to the N
If youu're prompte
ed for an admin
nistrator passsword or co nfirmation, ttype the password or proovide confirmation
n. You will ne
eed to restarrt your comp
puter for UAC to be turneed off. For more inform
mation about notification options, ple
ease refer to Microsoft w
website. Step
p 2: When yo
ou are asked to choose seetup type, ch
hoose the “T
Typical setupp” and then cclick Nextt. 11 Step
p 3: Select all versions an
nd then click next. Step
p 4: After thee files have in
nstalled, youu will see the
e completion screen. Clic k "Finish" to
o close the installaation wizard. 12 2.2
2.2 Up
pdating
gthePa
ackage
It's h
highly recom
mmended that you uninsstall the prevvious version package beefore updating and installing ne
ew add‐on p
package, so yyou can acce
ess to Contro
ol Panel and uninstall the
e prevvious version
n package ma
anually. Alteernatively, wee can start CoDeSys and perform com
mmand Pack
kage Manageer
from th
he men
nu (Tools ‐> P
Package Manager). Selecct the packagge you want to uninstall and then click “Uninstall”. Clickk "Close" to cclose the pacckage managger. Afteer uninstalling the old pacckage successsfully, pleasse refer to First‐time Insttallation. 13 14 Chapter
15 3
3. Create
eandru
unaprroject
1.
3.1
SttartCoD
DeSys
Starrt CoDeSys byy double‐cliccking the CoD
DeSys icon
which is available on the deskttop. Alteernatively, yo
ou can start tthe CoDeSys programmin
ng system with Starrt ‐> Program
ms ‐> 3S Software ‐> CoD
DeSys ‐> COD
DESYS V<verssion> Wheen you start the program
mming system
m the first tim
me after firstt installationn on the syste
em, you will be asked to choose the default ccollection of settings and
d features. Chhoose the “Pro
ofessional” aand then click Start to prooceed.
Befo
ore creating a project, make sure thaat Advantech
h ADAM add‐‐on package is installed succcessfully. Cho
oose Package Manger fr om the Tools menu: If the Advantech
h ADAM add‐‐on package didn’t show
w in manager, please refeer to Chapterr 2 and update yourr package. 16 3.2
2.
Cre
eateaP
Projectt
Step
p 1: To createe a new project, choose command N
New project ffrom the Filee menu: In th
he New Projeect dialog select Standarrd project in the ‘Templates’ field andd enter a Name and a Location p
path for the p
project file. PPress OK to cconfirm. 17 Step
p 2: You will then be prom
mpted for chhoosing devices. Choose device Advaantech ADA
AM‐5560 WinCE V3 (ADV
VANTECH) annd programm
ming languag
ge Structuredd Text (ST) (dep
pend on deveeloper) for P
PLC_PRG. Preess OK to ope
en the new p
project. 18 Step
p 3: The project name no
ow will appeaar in the title
e bar of the C
CoDeSys use r interface and the Devices wind
dow. 3.3
3.
WrriteaPrrogram
m
In th
he Devices w
window, doub
ble‐chick PLCC_PRG(PRG) and languag
ge editor winndow will op
pen. The editor consists of a decla
aration part (upper) and a body part (lower), sepparated by a 19 screeen divider. TThe declaratiion part show
ws line numb
bers at the le
eft border annd the emb
bracing keyw
words "VAR" and "END_V
VAR" for the vvariables decclaration. Declaraation paart Body part D
Device w
window In th
he declaratio
on part of the
e editor put the cursor behind VAR and press thee Return‐key. A neew empty lin
ne will be displayed wherre you enter the declarattion of variabbles. Heree, we write aa simple proggram to calc ulate the are
ea of triangle
e and circle, sso declare i_baase, i_heightt, i_radius wh
hich are of tyype INTEGER
R, d_area of type REAL: In th
he body partt of the PLC_PRG editor pput the curso
or in line 1 an
nd enter the following lin
nes: 20 We need to checck the program for syntaactic errors aand perform command BBuild from d ‐> Build) or press <F11>>: the menu (Build
Note!
ated in this caase. Error messages will be displayedd in the No code will be genera
window whicch is placed at the lowerr part of the user interfacce per default. Messages w
3.4
4.
Con
nnectttotheT
TargetD
Device
In th
his section, w
we want to discuss how tto connect to
o ADAM‐556
60. We need to set tthe active ap
pplication byy using Devicce editor. It d
displays an iccon of proggramming deevice, the current gatewaay and the taarget device with their cconnection sttatus. The Device edito
or opens by double clickiing the devicce name in th
he device treee. 21 Clickk the Scan ne
etwork butto
on to search for available
e devices in yyour local neetwork. You will then
n be prompteed for the de
evice selectioon. Choose yyour target d
device and cl ick OK to procceed. In Device editor,, it will show
w the connecttion status. P
Please checkk that the collored status poin
nts are all in green. Note! Meaning of the colored
d status poinnt on the gateway and the device: Red: Conneection canno
ot be establisshed Green: Con
nnection esta
ablished Black: Conn
nection not d
defined 22 3.5
5.
RuntheA
Application We can downloaad the appliccation by perrforming com
mmand Login
n from
m the menu Alt+F8>. You will then be
e prompted for choosing login options. (Onlline ‐> Login) or press <A
Heree, we choosee “Login with
h download”” for the first time and click OK to prooceed. Note!
Meaning of login options: “Login with
h online chan
nge”: Only thhe modified objects will be loaded. “Login with
h download””: The compl ete applicatiion will be lo
oaded and in itialized completelyy. “Login with
hout any chaange”: The laatest modificcations will nnot be loaded
d. 23 We run the proggram by perfforming com mand Start
from th
he menu (De bug ‐> Start)) or ned: In the upper part a ttable shows the presss <F5>. The online view of PLC_PRG will be open
watcch variables in applicatio
on. In the low
wer part you see the code lines as enttered in offliine mod
de, supplemeented by the
e little inline monitoring w
windows beh
hind each vaariable, show
wing the actual value. Stop
p the program
m by perform
ming commaand Stop
from the me
enu (Debug ‐> Stop) or p
press <Shiift+F8>. If yo
ou want to ch
hange into th
he offline moode and discconnect the p
programmingg system fro
om the ttarget devicee, perform command Loggout fro
om the menu
u (Online ‐> Logout) or p
press <Ctrrl+F8>. 24 Chapter
25 4
4. Advan
ntechI/
/OMod
dules
1.
4.1
InssertI/O
OModu
ulesinto
oCODE
ESYS
We can add and
d configure A
Advantech I/O
O modules as objects in tthe device trree. Note! ADAM‐556
60 does NOT support hott plugging for I/O module
es. An eempty slot is identified by icon
slot shows icon annd entry <Em
mpty> (<Empty>). An alreeady occupie
ed and the d
device namee. Choose one of available slot and click Pluug Device in context men
nu. PPlug Device
It wiill open the P
Plug Device dialog, wherre you can ch
hoose one off available deevices for the currrent slot. Thee existing enttry will be reeplaced by th
he new one in an occupieed slot. Clickk Plug Device
e to proceed
d and then prress Close to
o close the de
evice dialog.. Note!
You can remove the exxisting devicee by click Dellete 26 in ccontext mennu. 4.2
2.
Ma
apVaria
ablesto
oI/OM
Moduless
In th
his section, w
we want to discuss how tto map variable of progra
am to Advanntech I/O mod
dules. For mo
ore details on creating a new program
m please refer to chapteer 3. Heree, we declaree bValue in d
declaration ppart and set ttrue in body part. Opeen Module Ed
ditor by double clicking tthe device naame in the d
device tree. D
Double‐click on the vvariable colu
umn and cho
oose mappin g variable byy clicking the
e button
27 . In this exam
mple, we ttry to map th
he variable (b
bValue) to chhannel 0, so we double‐cclick on the ffirst row of variaable column. It wiill open the IInput Assista
ant Dialog, w
where you caan choose on
ne of availab le devices fo
or the current slot. The existingg entry will bbe replaced b
by the new o
one in an occcupied slot. e to proceed
d. Clickk Plug Device
28 Now
w, we can download the a
application bby performin
ng command Login and t hen perform
ming com
mmand Start.. The channe
el‐0 of I/O moodule will be
e lit up. Note!
If the Advaantech modu
ules are correectly configured, it will sh
how a green circle icon
next to thee device nam
me in the devvice tree. If itt shows a red
d triangle
, see the chapter 5 ffor troublesh
hooting. 4.3
3.
Sup
pportL
List
Advantech provides 21 types of ADAM‐55000 I/O mod
dules for varrious applicattions so far. Follo
owing table is the I/O mo
odules suppoort list. In the
e following ssection, we w
will introduce
e I/O mod
dules according to their ttypes. Mod
dule
Ana
alog Input
Ana
alog Output
Name
Spec
cification
Reference
ADAM-501
13
3-ch RTD Input
Isolated
ADAM-501
17
8-ch A
AI
Isolated
ADAM-501
17P
8-ch A
AI w/Indepen
ndent Input Range
R
Isolated
ADAM-501
17UH 8-ch Ultra High Speed AI (200
0KHz)
Isolated
ADAM-501
18
7-ch T
TC Input
Isolated
ADAM-501
18P
7-ch T
TC Input w/Independent Input Rangee Isolated
ADAM-502
24
4-ch A
AO
Isolated
ADAM-505
51
16-ch
h DI
Non-isolatted
29 Digital Input
Digital Output
ADAM-5051D
16-ch DI w/LED
Non-isolated
ADAM-5051S
16-ch Isolated DI w/LED
Isolated
ADAM-5052
8-ch Isolated DI w/LED
Isolated
ADAM-5053
32-ch Isolated DI
Isolated
ADAM-5056
16-ch DO
Non-isolated
ADAM-5056D
16-ch DO w/LED
Non-isolated
ADAM-5056S
16-ch Isolated DO w/LED
Isolated
ADAM-5056SO 16-ch Source Type Isolated DO w/LED
Isolated
ADAM-5057S
32-ch Isolated DO
Isolated
Digital I/O
ADAM-5055S
16-ch Isolated DI/O w/LED
Isolated
Relay Output
ADAM-5060
6-ch Relay Output
Isolated
ADAM-5069
8-ch Power Relay Output w/LED
Isolated
ADAM-5081
4-ch/8-ch High Speed Counter/Frequency Isolated
Counter/
Frequency
4.4.
DigitalInputModules
In this section, we are going to introduce digital input modules. The Module editor opens by double clicking the device name in the device tree. It consists of three tab pages, that is, Status I/O Mapping, Status and Information. Status I/O Mapping: Show the I/O mapping status between variable to module channel. It consists of seven columns. Mapping: The mapping status of each variable. Note! There are two categories of variables: Channel values and Error ID. Channel values: The data type of each channel is in single bit. If the value is “true”, it means that the channel is on; “false” for off. For detailed variable mapping information, see chapter 4.2. 30 Error ID: This variable holds the status of I/O module and its data type is in Word (16 Bits). Get module error ID by mapping the last variable in table. For detailed error ID information, see chapter 5.3. Address: The starting physical address of the variables for this I/O group. The board shown below has 16 digital inputs. This will require either 16 Boolean addresses or 2 Byte addresses. Note!
Meaning of address expression: % = Directly Mapped variable I = Physical Input X = Single bit $(N1). $(N2) = The starting address. The first number means the starting byte; the second number means the starting bit. Type: The data type of each variable. Description: The description of each variable. Status: The reserved page. Information: Provide the brief information to current module. 31 4.5
5.
Dig
gitalOu
utputM
Moduless
In th
his section, w
we are going to introducee digital outp
put modules. The Module editor opens byy double clic king the devvice name in the device trree. It consissts of threee tab pages,, that is, Stattus I/O Mappping, Status and Informa
ation. Stattus I/O Mapp
ping: Show the I/O mappping status between variable to moduule channel. It conssists of seven
n columns. Mapping: TThe mappingg status of eaach variable.. Note
e! Theree are two cattegories of v ariables: Cha
annel valuess and Error ID
D. Channel values: T
The data typee of each channel is in single bit. Set the value to
o “true” for switching on the chhannel; “false
e” for switch
hing off. For detailed variable mappingg information
n, see chapte
er 4.2. Error ID: This variable holds thhe status of I/O module and its data type is in Word (16 Bits). Get mod
dule error ID
D by mappingg the last varriable in tablee. For detaile
ed error ID informatiion, see chappter 5.3. 32 Address: TThe starting p
physical addrress of the vaariables for tthis I/O grouup. The board
d shown belo
ow has 16 digital inputs. This will req
quire either 1
16 Boolean aaddresses or 2 Byte addreesses. Note
e!
Mean
ning of addre
ess expressioon: % = D
Directly Mapp
ped variable Q = Physical Outp
put X = Siingle bit $(N1)). $(N2) = The starting adddress. The ffirst number means the sstarting byte; the secon
nd number m
means the staarting bit. Type: The d
data type of each variab le. Description
n: The description of eacch variable.
Stattus: The reseerved page. Info
ormation: Pro
ovide the briief informatiion to curren
nt module. 33 4.6
6.
Ana
alogIn
nputMo
odules
In th
his section, w
we are going to introducee analog inpu
ut modules. The Module editor opens byy double clic king the devvice name in the device trree. It consissts of us Configurattion, Status I/O Mapping
g, Status andd Informatio
on. fourr tab pages, tthat is, Statu
Stattus Configuraation: Provid
de the channnel status pagge for setting
g channel ra nges. Dou
uble‐click on the value column of the particular ch
hannel. Note!
For ADAM‐5013, ADAM
M‐5017 and ADAM‐5018
8, all channe
els are restriccted to the ssame channel range and basse on the firsst channel (cch‐0). ping: Show the I/O mappping status between variable to moduule channel. Stattus I/O Mapp
Mapping: TThe mappingg status of eaach variable.. Note
e! Theree are two cattegories of v ariables: Cha
annel valuess and Error ID
D. Channel values: T
The data typee of each channel is in REAL. For detailed variable mappingg information
n, see chapte
er 4.2. Error ID: This variable holds thhe status of I/O module and its data type is in Word (16 Bits). Get mod
dule error ID
D by mappingg the last varriable in tablee. For detaile
ed error ID informatiion, see chappter 5.3. 34 Address: TThe starting p
physical addrress of the vaariables for tthis I/O grouup. The board
d shown belo
ow has 8 ana
alog inputs. TThis will requ
uire 8 DWOR
RD addressess. Note
e!
Mean
ning of addre
ess expressioon: % = D
Directly Mapp
ped variable I = Ph
hysical Input D = D
Double word (32 Bits) $(N) == The startin
ng address. Type: The d
data type of each variab le. Description
n: The description of eacch variable.
Stattus: The reseerved page. Info
ormation: Pro
ovide the briief informatiion for current module. 4.7
7.
Ana
alogOu
utputM
Module
es
In th
his section, w
we are going to introducee analog output moduless. The Module editor opens byy double clic king the devvice name in the device trree. It consissts of fourr tab pages, tthat is, Statu
us Configurattion, Status I/O Mapping
g, Status andd Informatio
on. Stattus Configuraation: Provid
de the channnel status pagge for setting
g channel ra nges. Dou
uble‐click on the value column of the particular ch
hannel. 35 Stattus I/O Mapp
ping: Show the I/O mappping status between local variable to module chan
nnel. Mapping: TThe mappingg status of eaach variable.. Note
e! Theree are two cattegories of v ariables: Cha
annel valuess and Error ID
D. Channel values: T
The data typee of each channel is in REAL. For detailed variable mappingg information
n, see chapte
er 4.2. Error ID: This variable holds thhe status of I/O module and its data type is in Word (16 Bits). Get mod
dule error ID
D by mappingg the last varriable in tablee. For detaile
ed error ID informatiion, see chappter 5.3. Address: TThe starting p
physical addrress of the vaariables for tthis I/O grouup. The board
d shown belo
ow has 4 ana
alog outputs . This will require 4 DWO
ORD addressees. Note
e!
Mean
ning of addre
ess expressioon: % = D
Directly Mapp
ped variable Q = Physical Outp
put D = D
Double word (32 Bits) $(N) == The startin
ng address. Type: The d
data type of each variab le. Description
n: The description of eacch variable.
36 Stattus: The reseerved page. Info
ormation: Pro
ovide the briief informatiion for current module. 4.8
8.
RellayOuttputMo
odules
In th
his section, w
we are going to introducee relay outpu
ut modules. The Module editor opens byy double clic king the devvice name in the device trree. It consissts of threee tab pages,, that is, Stattus I/O Mappping, Status and Informa
ation. Stattus I/O Mapp
ping: Show tthe I/O mappping status b
between loca
al variable too module cha
annel. It co
onsists of sevven columns. Mapping: TThe mappingg status of eaach variable.. Note
e! Theree are two cattegories of v ariables: Cha
annel valuess and Error ID
D. Channel values: T
The data typee of each channel is in single bit. Set the value to
o “true” for switching on the chhannel; “false
e” for switch
hing off. For detailed variable mappingg information
n, see chapte
er 4.2. Error ID: This variable holds thhe status of I/O module and its data type is in Word (16 Bits). Get mod
dule error ID
D by mappingg the last varriable in tablee. For detaile
ed error ID informatiion, see chappter 5.3. Address: TThe starting p
physical addrress of the vaariables for tthis I/O grouup. The board
d shown belo
ow has 6 rela
ay outputs. TThis will requ
uire either 6 Boolean adddresses or 1 Byte address. 37 Note
e!
Mean
ning of addre
ess expressioon: % = D
Directly Mapp
ped variable Q = Physical Outp
put X = Siingle bit $(N1)). $(N2) = The starting adddress. The ffirst number means the sstarting byte; the secon
nd number m
means the staarting bit. Type: The d
data type of each variab le. Description
n: The description of eacch variable.
Stattus: The reseerved page. Info
ormation: Pro
ovide the briief informatiion to curren
nt module. 4.9
9.
Cou
unter/F
Freque
encyMo
odules
In th
his section, w
we are going to introducee counter/fre
equency modules. The Module editor opens byy double clic king the devvice name in the device trree. It consissts of fourr tab pages, tthat is, Statu
us Configurattion, Status I/O Mapping
g, Status andd Informatio
on. Stattus Configuraation: Provid
de the channnel status pagge for setting
g channel ra nges. Dou
uble‐click on the value column of the particular ch
hannel. The module conttains counter chan
nnels and DO
O/Alarm channels as sho wn image be
elow. 38 For counter chan
nnels, we offfer five typess of countingg mode (Bi‐d
direction, Up//Down, A/B Phasse) for differrent application purposess. The counter will countt up or downn according tto yourr application
ns. This countting functionn helps us ob
btain the most accurate ddata. Befo
ore starting ccounting, we
e have to set Startup Value, i.e. Initia
al value, and the default is 0. The data type off startup valu
ue is in DWO
ORD. evel minimum signal widdth to reduce
e We can also set Digital Filterr (in us) for hhigh or low le
noisse spike. Everry counter ch
hannel can m
measure the frequency of assigned time window and the rangge is from
m 0.1Hz to 1M
MHz. We can
n assigned Frrequency Accquisition Tim
me (in ms) too get counter num
mber within tthe time rangge. For DO/Alarm ch
hannels, you
u can change the setting by double‐clicking and seelecting an ittem from
m the pull‐do
own menus: Mode: Seleect "DO" or ""Local Alarm
m Latch" Alarm Type
e: Select "High" or "Low"", i.e. high alarm or low a
alarm. Alarm Limiit: Set alarm limit value. High alarm limit Sendingg High alarm Initial value Sendingg Low alarm 39 m limit Low alarm
Alarm Map
pping: Selectt counter chaannel numbe
er. Stattus I/O Mapp
ping: Show the I/O mappping status between local variable to module chan
nnel. Mapping: TThe mappingg status of eaach variable.. For detailed
d variable maapping information, see chapter 4.2. Note
e! Theree are three categories of variables: Sttatus variablles, Setting vvariables and
d Error ID. Statu
us variables: These variabbles are read
d‐only and ho
old the moduule status. Name Data typpe Information Coun
nting Number DWORD The
e total countting number.. Coun
nting Status Single Biit “true” for starting countingg; “false” for stop. Overflow Status Single Biit “true” for overfflow Latch
h Status Single Biit “true” for reach
h alarm latchh. Settin
ng variables:: These variaables are read‐write. You can change the setting by changging the colu
umn value.
Name Data typpe Information DO value Single Biit Sett the value to
o “true” for sswitching on
n the channel; “false” for switching off. 40 Clear to Startup Single Bit Set “true” for set current counting number to startup counting number. Clear Overflow Single Bit Set “true” for clear overflow. Clear Alarm Latch Single Bit Set “true” for clear the alarm latch. For detailed variable mapping information, see chapter 4.2. Error ID: This variable holds the status of I/O module and its data type is in Word (16 Bits). Get module error ID by mapping the last variable in table. For detailed error ID information, see chapter 5.3. Address: The starting physical address of the variables for this I/O group. The board shown below has 4 counter inputs and 4 digital outputs. This will require 4 DWORD addresses for counter channel values and 4 Boolean addresses for digital outputs. Note!
Meaning of address expression: % = Directly Mapped variable I = Physical Input Q = Physical Output X = Single bit D = Double word (32 Bits) $(N) = The starting address. Type: The data type of each variable. Description: The description of each variable. 41 42 Chapter
43 5
5. Diagno
osisan
ndTrou
ublesho
ooting
1.
5.1
ErrrorNottificatio
on
In ch
hapter 4, wee introduce h
how to write a program to control Ad
dvantech I/O modules. If the Advantech modules are corrrectly configuured, it will sshow a green
n circle icon
he next to th
deviice name in tthe device trree after perrforming com
mmand Login
n and Start. I f it shows a red trian
ngle
, it means that I/O
O module enncountered sseveral errors while runnning. 2.
5.2
Log
gInform
mation
n
We can get log information ffrom Advanttech CoDeSyys or target m
machine, i.e.. ADAM‐5560. In Advantech Co
oDeSys devellopment envvironment, double click the device naame in the deviice tree to op
pen Device e
editor. Selectt the Log diaalog and it will display thee log of the Advantech I/O m
module. A logg entry line ccontains the following information: egories: warnnings, errorss, exceptionss, informatio n. The displa
ay of Seveerity: There are four cate
the entries of eaach category can be switcched on or o
off by using the corresponnding button
n from
m the bar abo
ove the listin
ng. Each buttton always contains the ccurrent num
mber of loggin
ngs in th
he respectivee category. Timee Stamp: Date and Time. Desccription: Desscription of tthe event, foor example “Device not fo
ound or not matched." 44 Com
mponent: ID and name off the componnent Double click
On ttarget machiine, we can a
also get erro r ID from Co
oDeSys WinCE runtime. In th
he ADAM‐5560 environm
ment, open ruuntime by do
ouble‐clickin
ng the runtim
me icon
whicch is availablle on the low
wer‐right cor ner of the de
esktop.
Get error ID by p
performing ccommand Er rors from the menu (Info
o ‐> Errors). 5.3
3.
ErrrorID Follo
owing table is the error ID for I/O moodules. Erro
or ID Desscription 0x80000 The module didn’t exist or m
match the setting module
e. Makke sure that the setting m
module matcches for the device that iis being pluggged and che
eck your moddule is pluggged in ADAM‐5560 approopriately. 45 0x8001 The system failed to open the module. Please close all programs and reboot. If the system cannot returns to normal condition or the error occurred, please contact Advantech for technical support. 0x8002 The system was unable to complete configuration. Please power‐off the system and plug the module again. If the error occurred, please replace a new module and contact Advantech for technical support. 0x8003 The system failed to read value from the module. Please power‐off the system and plug the module again. If the error occurred, please replace a new module and contact Advantech for technical support. 0x8004 The system failed to write value to the module. Please power‐off the system and plug the module again. If the error occurred, please replace a new module and contact Advantech for technical support. 0x8005 For counter module, the system failed to start/stop counter. Please power‐off the system and plug the module again. If the error occurred, please replace a new module and contact Advantech for technical support. 0x8006 For counter module, the system failed to clear counting value. Please power‐off the system and plug the module again. If the error occurred, please replace a new module and contact Advantech for technical support. 0x8007 For counter module, the system failed to clear overflow flag. Please power‐off the system and plug the module again. If the error occurred, please replace a new module and contact Advantech for technical support. 0x8008 For counter module, the system failed to clear alarm flag. Please power‐off the system and plug the module again. If the error occurred, 46 please replace a new module and contact Advantech for technical support. 47 
Download