Opc Da Com Guide

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 172 [warning: Documents this large are best viewed by clicking the View PDF Link!]

K-SpiceDCSLink:OpcDaCom
UserGuide
Release1
1/A
July2014©KongsbergOil&GasTechnologiesAS
Documenthistory
Document34148/H
Rev.AJune2014Createddocument.ArbortextversionofvariousWikipages.
Thereader
ThisuserguideisintendedasareferencemanualfortheK-Spice®user.Themanualisbasedonthe
assumptionthattheuserisfamiliarwithprocessmodelling,aswellasoilandgasproductionsystems.
Note
©2014KongsbergOil&GasTechnologiesAS.Allrightsreserved.Theinformationcontainedinthis
documentremainsthesolepropertyofKongsbergOil&GasT echnologiesAS.Nopartofthisdocument
maybecopiedorreproducedinanyformorbyanymeans.Theinformationcontainedwithinitisnottobe
communicatedtoathirdparty,withoutthepriorwrittenconsentofKongsbergOil&GasTechnologiesAS.
KongsbergOil&GasTechnologiesASendeavourstoensurethatallinformationinthisdocumentis
correctandfairlystated,butdoesnotacceptliabilityforanyerrorsoromissions.
Comments
Toassistusinmakingimprovementstotheproductandtothismanual,wewelcomecommentsand
constructivecriticism.
e-mail:kogt.documentation@kongsberg.com
FormoreinformationonK-Spice®,visitourwebsite:www.kongsberg.com/K-Spice
KongsbergOil&GasTechnologiesAS
www.kongsberg.com/kogt
UserGuide
Tableofcontents
1INTRODUCTION...............................................................7
1.1ControlsystemsandK-SpiceDCSlinks................................................................8
1.2Acronymsandconcepts........................................................................................10
1.3StructureofaDCScommunicationsystem..........................................................11
1.4DCSdriverfunctionality......................................................................................11
2SETTINGUPASIMLINKAPPLICATION..........................13
2.1ThecreationofaSimLinkapplication.................................................................13
2.2TheleHostnames.txt..........................................................................................15
2.3SimRemoteLauncher............................................................................................17
2.4CreatealinkapplicationintheK-Spiceproject...................................................18
2.5Creationofanewdatabase...................................................................................25
2.6Thecommandlineoption—database...................................................................28
3THESIMLINKGUI..........................................................29
3.1BrowseOPCServers............................................................................................31
3.2SyntaxinSimLinklogles..................................................................................34
3.3UsingExcelconditionalformattingonSimLinklogles..................................35
3.4WatchanitemintheSimLinkGUI......................................................................39
3.5Tagconnectionerrors...........................................................................................41
3.6Tagconnectionsuccess.........................................................................................42
3.7Theksimendoftheconnectionhasfailed...........................................................44
3.8Missingnode........................................................................................................45
3.9DcsError...............................................................................................................46
3.10CoCreateInstanceEx.............................................................................................47
4THEACCESSDATABASE.................................................48
4.1Tables....................................................................................................................50
4.2Standarddatabasetables.......................................................................................52
4.2.1TheCongtable.Standardkeywords........................................................52
4.2.2TheCongtable.AllOPCclientlinks......................................................55
4.2.3TheDataTypeInfotable...........................................................................59
4.2.4TheDiagnosticstable..............................................................................60
4.2.5TheDiagnosticstable.TheDataTracekeyword.........................................61
4.2.6TheDiagnosticstable.TheGroupTracekeyword.......................................66
4.2.7TheKSIM_XREFtable.Standardkeywords............................................69
4.2.8TheKSIM_XREFtable.Examples..........................................................73
4.2.9TheKSIM_XREFtable.Anexample:Twodataitems..............................75
4.2.10TheSimLink_XREFtable.......................................................................78
4.2.11TheSubServerstable..............................................................................78
4.2.12TheUpdateRatetable..............................................................................79
1/A3
KONGSBERGK-Spice®
4.2.13TheWatchdogItemstable........................................................................80
4.3ConguringSimLink.NETtoSimLink.NET.......................................................81
4.3.1CongureSubServersTable......................................................................81
4.3.2CongureItemConnectionsinSimLink_XREF.........................................81
4.3.3ActivateSimLinkTWICEfornewconnections..........................................81
4.3.4Conguringunitconversionforlink-to-link...............................................82
5SOFTINGANDMATRIKONOPCTESTTOOLS..................83
5.1TheSoftingOPCclienttool.................................................................................85
5.2ErrormessagesinSoftingOPCclienttool...........................................................90
5.3TheMatrikonOPCServer.....................................................................................91
5.4TwotagsintheMatrikonOPCServer...................................................................92
5.5TwotagsintheOpcDaComlink........................................................................100
5.6TheMatrikonOPCHDAExplorer.....................................................................104
6OPCDCOMCONFIGURATION.......................................112
6.1DCOMcongurationforAbbItsCom................................................................112
6.2Checkthelocalsecuritypolicysettings............................................................121
6.3ModifytheDCOMconguration.......................................................................122
6.4ODBCDataSourceAdministrator.....................................................................125
7VARIABLETRANSFERBETWEENDCSAND
K-SPICE.......................................................................126
7.1DCSconnectionphilosophy...............................................................................126
7.2InterfacestotheDCSServers.............................................................................127
7.3Modelvariablesubscriptions..............................................................................128
7.4DCSdriverfunctionality....................................................................................128
7.5Packingandunpackingvariables.......................................................................128
8THECROSSREFERENCELIST.......................................129
8.1CreationoftheCrossReferencelist...................................................................130
8.2ItemConnections................................................................................................133
8.2.1SourceItemConnections(DCSloopback)..............................................133
8.2.2DcsUnit.................................................................................................133
8.2.3Attributes..............................................................................................134
8.2.4BinaryCopy..........................................................................................134
8.2.5BitAddressing.......................................................................................135
8.2.6ItemconnectionQuality.........................................................................135
9TIPSANDTROUBLESHOOTING....................................136
9.1DOScommands..................................................................................................136
9.2SystemV alues.....................................................................................................137
9.3DisableExplicitReadAfterConnect....................................................................140
9.4ChangingDateandTimesetting........................................................................141
9.5Reconnectsupport..............................................................................................142
41/A
UserGuide
9.6K-SpicePIDControllerconnection....................................................................143
9.7PIIntegration......................................................................................................145
9.8RemotelyStartingControllers............................................................................147
9.9DataorganizationontheOPCserver.................................................................149
9.10UseraccountsinWindows.................................................................................150
9.10.1Sharingthe$Adminfolder......................................................................150
9.10.2SavingCredentialsSecurely...................................................................151
9.11SQLtipsandtricks.............................................................................................153
9.11.1CreatingaSQLqueryintheSimLinkdatabase........................................153
9.11.2RunningQuery......................................................................................154
9.11.3Clearconnectedonallitems...................................................................155
9.11.4Setconnectedforallitems......................................................................155
9.11.5Clearconnectedforaparticularitemnode...............................................155
9.11.6FindingDuplicatesinKsimName............................................................155
9.12BasicTerminology..............................................................................................157
9.12.1DCS......................................................................................................157
9.12.2OPC......................................................................................................157
9.12.3OLEandCOM......................................................................................159
9.12.4DCOM.................................................................................................159
9.12.5PLCandPAC........................................................................................159
9.12.6Sockets..................................................................................................159
9.12.7SCADA.................................................................................................160
9.13FAQs...................................................................................................................161
9.13.1FAQsaboutallSimLinks........................................................................161
9.13.2FAQsaboutOPCDAbasedSimLinks.....................................................163
9.13.3FAQsaboutOpcDaCom.........................................................................163
10SWITCHOVERFUNCTIONALITY...................................164
10.1DCSconnectionphilosophy...............................................................................164
10.2DCSconnectivityrequirements..........................................................................165
10.3CommonDCSinterfacingmodules....................................................................165
10.4BasicDCSCongurations..................................................................................167
10.5Typicalswitchoverprocedure.............................................................................170
1/A5
KONGSBERGK-Spice®
61/A
Introduction
1Introduction
ThisisauserguidefortheDistributedControlSystem(DCS)communicationslink
betweenK-Spice®modelsandanysupportedDCS.Thelinkisaseparateprogramthat
connectstotheK-Spice®SimulationManagerandhandlesallI/Oexchangesbetween
activetimelinesandtheremoteDCS.
SomeofthelinksrelatestoanAPIspeciedbytheDCSvendors.Otherlinksarebased
ontheOPCstandard.TheOPClinkscommunicatewiththeDCSvendormachine
followingtheOPCprotocol.TheDCSvendormachineisthenconguredasanOPC
server.
Mostoftheimagesinthisguidearefromatestmodel,withatestlinkconguration.
Manyoftheimagesarescreenshotsfromrealinterfacingprojects.Effortismadeto
disguisethedataproject’sdatastructureandtherealproject’stagnames.Someof
theseimagesarebitmanipulated,charactersaremovedaround.Somethetagnames
intheimagesareshorteneddownversionsoftherealnames.Typicallyaprojecttag
PI-430–754.PVispresentedintheimageasPI-754.PV ,oraninternetaddress11.45.23.97
ispresentedintheimageas11.11.11.97.Ifthereareerrorsintheimages,orinconsistency
betweenimages,theerrorcouldbetheresultofunfortunateimagemanipulation.
1/A7
KONGSBERGK-Spice®
1.1ControlsystemsandK-SpiceDCSlinks
ThecompaniesthatdelivercontrolsystemshaveproprietaryDCSserversthat
K-Spicecanconnectto.
Table1Existinglinks
K-SpicelinkDCSvendorControl
system
Linktype
AbbItsComABB800xAVendorAPIfor
commandsin
combinationwith
OPCfordata.
AimInterfaceCom
AimWinPsStarter
Kongsberg
Maritime
AIM2000
AutoswitchComlink-to-link
CccOpcComCompressor
Controls
Corporation
OPC
DeltaVComEmersonProcess
Management
DeltaVOPC
ExatifComYokogawaCentumCSVendorAPI
HimaComHIMAHIMAX-OTS
Simulator
OPC
HimaElopIIComHIMAHIMAX-OTS
Simulator
VendorAPIfor
commandsin
combinationwith
OPCfordata.
OpcDaComDatasource:
StandardOPC
OPCDA
OpcHdaComDatasource:
StandardOPC
OPCHDA
ProSimComOyEndatLtdProsimVendorAPI
SimitComSiemensSimaticPCS7
Noinstallerfor
Sim4MeCom
InvensysFoxboroEvoVendorAPIfor
commandsanddata.
SoftLogixComAllen-BradleyControlLogix
TelepermMComSiemensTelepermM
OPC
VendorAPIfor
commandsin
combinationwith
OPCfordata.
81/A
Introduction
Table1Existinglinks(cont'd.)
VirtuosoComVirtuoso
Automation
Solutions
VendorAPI
WmiComDatasource:
Windows
Management
Instrumentation
none
1/A9
KONGSBERGK-Spice®
1.2Acronymsandconcepts
ThebasicconceptsOPC,DCSandSCADAhaveashortexplanationinthechapterTips
andTroubleShooting.SeeBasicTerminologyonpage157
AcronymFulltextDescription
AspectServernoneNameoftheABBITSdata
servers
BucketBrigade.Int4noneMatrikon.Defaulttagnamein
theMatrikonTesttool.
COMComponentObjectModelStandardinteractiveobject
creationandinterprocess
communication
DCOMDistributedComponent
ObjectModel
Microsoft.Communication
amongapplicationsdistributed
acrossnetworkedcomputers.
DCSDistributedControlSystemStandard
EWSEngineeringWorking
Station
Yokogawa
FCSFieldControlSystemYokogawa
ITSIndustrialTraining
Simulator
ABBITSisthenameofthe
communicationpackageused
ininterfacestotheABBcontrol
system.
OLEObjectLinkingand
Embedding
Microsoft
OPCOLEforProcessControlStandard
PIServernoneOSIsoft.Storageofanyform
ofreal-timedata.
PLCProgrammableLogic
Controllers
Standard
ProplusnoneNameoftheDeltaVsystem
dataservers
SCADASupervisoryControlAnd
DataAcquisition
Standard
WMIWindowsManagement
System
Microsoft.Management
ofdataandoperationson
Windows-basedoperating
systems.
101/A
Introduction
1.3StructureofaDCScommunication
system
TheDCSLinkconnectstoK-Spice®viatheSimulationManager,asshowninthe
gurebelow.TherearedifferentversionsofaDCSLinkdependingontheDCStobe
connectedto,suchasABB,EmersonorYokogawa.However,theinterfacetoK-Spiceis
stillthesame.TheK-Spice®DCSLinkareconnectedtoaMicrosoftAccessdatabase
thatcontainsI/Omappings,alsocalledtheCrossReferenceList,andDCSdriver
connectioninformation.
Figure1K-SpiceDCScommunicationsystem
TheDCScommunicationlinkconsistsoftwolayers.Therstlayerismodelvariable
subscriptions,whichisindependentoftheDCSsystemandconnectedtoSimulation
Manager.Thesecondlayerisacommunicationsdriverwhichistospecictothe
DCSsystem.
1.4DCSdriverfunctionality
TheDCSdriverforaparticularDCSisafunctionalblockwithadenedinterface
towardsthemodelvariablesubscriptionsandinternallogicimplementingthesystem
speciccommunicationtasks.
Thetaskssolvedbyadriverare:
1Transfervaluesbetweentheexternalsystemandthemodel.Tagnamesusedto
identifyavalueintheexternalsystemarefoundasparametersintheentryfora
variableintheIOlist.
2Ifapplicable,convertcommandsreceivedfromthemodelvariablesubscriptions
andforwardthemtotheexternalsystem.Onceacommandhasnished,returnthe
properacknowledgementtothemodelvariablesubscription.
TheappropriatedriverforadenedexternalDCSsystemisaddedthroughtheAccess
databasebyselectingtheappropriateDCSlinkforthecontrolsystem.
1/A11
KONGSBERGK-Spice®
Packingandunpackingvariables
TheDCSdriverisalsoresponsibleforpackingandunpackingdataincaseswhere
multiple,individualmodelvariablesaresharingacommonDCSvariable(forexample,a
maskofvaluelimitswitches.)
ThisHimaElopIIComisalinkforHIMAH41/H51-qSystemsprogramedwithELOP
II.TheinterfacingisdonethroughaVizualizationGatewayapplicationfromKirchner
Softandlogi.calsGmbH.TheHIMAOPCserverisusedfordatacommunicationand
VisualizationGatewaywithstandardWindowsCOMtechnology,isusedforcommands.
ThelinkmustrunonthesamePCasVisualizationGateway.
121/A
SettingupaSimLinkapplication
2SettingupaSimLink
application
HowtoinstallthelinkonthePC
IfyouhaveanolderversionofK-Spiceinstalled,uninstallK-Spice,anduninstallthe
oldlink.
Gotothebuildmachine,andndtheactualversion.DoubleclickonKSpice.exe.
ThendoubleclickonKSpiceExatifCom.exe.
OftenanewversionofK-SpiceandthelinkmustbeinstalledonaPCthatcannotaccess
thebuildcomputerdirectly.Theinstallationprogrammustcopiedtoamemorystick.
Fori.e.theExatifComlink,bringwithyouthefollowinglesanddirectoriesfrom
thebuildmachine:
KSpice.exe
KSpiceExatifCom.exe
directory:packages
directory:redist
IfyoudonothaveaK-Spicelicenseinstalled,youmustalsobringwithyou:
KOGTLicenseUtility.exe
2.1ThecreationofaSimLinkapplication
Thisisageneraldescriptionforlinkinstallationandtheinitiallinkconguration.To
makethedescriptioneasiertoread,itisnecessarytoselectanameastheexampleforall
thelinks.TheExatifComlinkandYokogawa’sEngineeringWorkingStationareusedas
examplesinthischapter.Thestepsaremoreorlessthesameforallthelinks.
TheModelPCandtheEWSmachine.
ThenormalcongurationwillbethatalltheK-SpiceexecutablesandtheK-Spicemodel
areinstalledononemachine,calledtheModelPC.TheDCSvendorwillnormallyset
upadataserveronadifferentmachine.ForaYokogawasystem,themachinewiththe
dataserveriscalledaEngineeringWorkingStation(EWS).FortheABBITSsystem,
1/A13
KONGSBERGK-Spice®
themachinewiththedataserveriscalledtheAspectServer.ForDeltaVsystemsthe
dataservers,normallyonecentralserverwithmultiplesatelliteservers,arerunningon
aProplusmachine.
ThelinkrunningonModelPCorontheEWSmachine
Therearetwopossibilitieshere.IfthelinkisinstalledontheModelPC,the
communicationbetweenK-SpiceSimManagerandtheK-SpiceSimLinkissimpleand
straightforward.WiththissetuptheSimLinkmusthavereadandwriteaccesstoaDCS
dataserveronaremotemachine.Therearerewallissuesinvolved.FortheOPClinks
themainissueistoopenupforDCOMaccessontheremotemachine.
SeethesectionDCOMcongurationforAbbItsComonpage112
TheotherpossibilityisthatthelinkisinstalledonthesamemachineastheDCSdata
server.Thissimpliesthecommunicationbetweenthelinkandthedataserver,but
complicatesthecommunicationbetweenSimManagerandtheSimLink.Thelink
hastobestartedbyK-SpiceSimManagerontheremotemachine.Theapplication
SimRemoteLauncher.exe,installedontheremotemachine,isusedtostartthelink
application.TherearerewallissuesandDCOMaccesscongurationforthissolution
also.
Onelinkapplicationortwolinkapplications
Ifthereismorethan1nodeintheOPCserver,thenormalcongurationisthatyou
createoneSimLinkapplicationforeachnode.ToreaddatafromtheHIMAserversin
thegurebelow,onelinkapplicationmustbecreatedtoreaddatafromPLC_1–DA,one
linkapplicationmustbecreatedtoreaddatafromPLC_2–DA.
Figure2TheOPCServerBrowserforaHimaComlink
ToreaddatafromaDeltaVsystemyouwillonlycreateonelinkapplication.The
linkwillinterfacetowhatiscalledtheProplusServer.TheProplusOPCServerwill
communicatewiththeothernodesintheDeltaVsystem.
InstallerfortheK-Spicelink
TosetuptheExatifComlinkitsnecessarytoinstallExatifCom.exeinthedirectory
C:\ProgramFiles(x86)\Kongsberg\K-Spice\bin.
141/A
SettingupaSimLinkapplication
Thedifferentlinksareinstalledwithdifferentinstallationles,i.e
KSpiceExatifCom.exe
EithertheinstallerneedstoberunontheK-SpiceModelPC,ortheinstallerneedstobe
runontheYokogawaEngineeringWorkingStation(EWS)machinewheretheYokogawa
FieldControlStation(FCS)testfunctionsarelaunched.
TheoptionwherethelinkrunsontheK-SpiceModelPC:
Inthedirectory:
\\xray\03208\KSPICE\Installations\KSpiceCombined\Official
Releases\2.8.2.0\Installers\
DoubleclickonKSpiceExatifCom.exe
Theoptionwherethelinkrunsontheremotemachine.
CopythefollowingdirectoriesandlestotheEWSmachine:
From:\\xray\03208\KSPICE\Installations\KSpiceCombined\Official
Releases\2.8.2.0\Installers\
Thedirectory:packages
Thedirectory:redist
Thele:KSpiceExatifCom.exe
Thele:SimRemoteLauncher.exe
Ontheremotemachine,doubleclickonthetwoexecutables.
IfafullK-Spicerunsonaremotemachine:
Inadditiontothetwodirectoriesandthetwolesintheprevioussection,copythe
followingtwoles:
Thele:KOGTLicenseUtility.exe
Thele:KSpice.exe
2.2TheleHostnames.txt
ThesetupoftheExatifComlinkalsoneedsaleHostnames.txttobeplacedinsidethe
projectfolder.ThislecontainsthenamesofthedifferentEWSmachines.
1/A15
KONGSBERGK-Spice®
Figure3Hostnames.txtintheprojectfolder
Thistextleconsistsofnamesoftheremotemachinewherethedifferentlinksare
running.InthiscaseitmustcontaintheYokogawaEWSmachinenamefore.g.
WR1814MDL01.
Figure4Hostnames.txt
161/A
SettingupaSimLinkapplication
2.3SimRemoteLauncher
IfthelinkExatifComisinstalledontheEWSmachine,theSimRemoteLaunchermustbe
launchedontheremoteEWSmachinerunningtheFCStestfunctionspriortostarting
theExatifComlink.
CreateastartupbatchlefortheSimRemotelauncherontheEWSmachine.The
batchlecontainsthefollowingscript.
Figure5ScripttolaunchSimRemoteLauncher
Doubleclickthebatchle.ThiswilllaunchtheSimRemoteLauncherontheEWS
machine.
1/A17
KONGSBERGK-Spice®
2.4CreatealinkapplicationintheK-Spice
project
Tosetupalink,anewlinkapplicationmustbecreatedintheprojectfolder,inparallel
totheProcessModelandotherapplications.Whenthelinkapplicationexists,K-Spice
SimExplorerwilllaunchthelinkapplication,whentheTimelineoftheprojectis
activated.
TheAccessdatabaseinthenew.NETbasedlinks
AnewAccessdatabaseiscreatedbythelinkapplicationwhenyoufollowthesteps
below.Whenthecongurationofthelinkapplicationisnished,theAccessdatabase
hasallthevaluesinit,thatmakesupthecongurationofthelinkintheactualproject.
Thedatabasecreatedinthestepsbelowhasallthenecessarytablesinit.Someofthe
keywordsinthetableshavedefaultvalueswhenthedatabaseisrstcreated.
Preparationsbeforecreatingalinkoftheoldtype.
WiththeoldC++links,anAccessdatabasemustexistintheprojectfolder,beforethe
linkapplicationiscreatedintheK-Spiceproject.Thisisthecasewiththeoldversion
oftheAbbItsComlink,2013andolder.Adatabaseinthe.mdbformat,withalotof
congurationparametersinit,mustbegeneratedupfront,basedondatabasesfromother
projects.Createthefolderbelow,andcopyoverthedatabasele:
C:\K-Spice-Projects\DemoProject\TimeLines\Engineering\
Applications\AbbItsCom\AbbItsCom.mdb
181/A
SettingupaSimLinkapplication
Createalinkapplication
ThelinkfortheExatifDCSsystemisusedasanexample.Whenyouhavenished,you
havecreatedanewapplicationwiththenameExatifintheprojectfolder.
Figure6Startproject
ClickStart.
1/A19
KONGSBERGK-Spice®
Figure7Setupthelinkasanewapplication
OpentheSimExplorer.RightclickontheTimelineEngineeringandselect→New
Application
201/A
SettingupaSimLinkapplication
Figure8ExatifinNavigator
Typethenameofthenewapplication,inthiscaseExatif
1/A21
KONGSBERGK-Spice®
ThedialogApplicationPropertieswillcomeupautomaticallywhenyoucreate
theapplication.Enterthefollowing:
Figure9Applicationtype
1SelectExatifComastheApplicationTypefromthedropdownlist.
221/A
SettingupaSimLinkapplication
2ThedefaultvalueisthatEnabledischecked.Acceptthedefaultvalue.When
Enabledischecked,theapplicationwillstartautomaticallywhentheTimelineis
activated
Figure10Enabled
3SelectHostnamefromthedropdownlist.Thislististhemachinenamesinthe
leHostnames.txt.
Figure11Hostname
4SavetheApplicationtypeandHostnamecongurationintheK-Spiceproject.In
K-SpiceSimExplorer:
File→SaveProjectProperties
1/A23
KONGSBERGK-Spice®
NowwhentheTimelineisactivated,theK-SpiceSimManagerwillautomaticallycreate
thenewfolderExatifintheexistingfolderTimelines/Engineering/Applications.
Activationofthetimelinewillalsoopenthemainwindowforthelink,thewindow
K-SpiceExatifCom,normallycalledtheSimLinkGUI
Thersttimeyouactivatethetimeline,theK-SpicedialogProgresswillopenwiththe
textInitializingmodelandarunningaprogressbar.
Figure12Theprogressdialogopenswhenthetimelineisactivated
ThedialogProgress,withtherunningprogressbar,willnotdisappearuntilyouhave
createdthelinkdatabase,andreloadedthedatabase,asdescribedinthenextsection,
Creationofanewdatabase.
Note
TheinitializationoftheK-Spicemodelwillnotnishuntilyouhavealinkdatabaseup
andrunning,asdescribedinthenextsection.
241/A
SettingupaSimLinkapplication
2.5Creationofanewdatabase
Thesearethestepsforall.NETbasedlinks.ThelinkExatifComisusedasexample.
Note
AllSimLinkapplicationsrequirethe32-bitversionoftheAccessDatabaseengineand
donotworkwiththe64-bitversion.Thatalsomakesthemincompatiblewiththe64bit
versionofMSOfce.Consequently,MSOfcefor64-bitcannotbeinstalledonthesame
machineasaSimLink.
Figure13K-SpiceExatifComdialog,alsocalledtheSimLinkGUI
TocreateanewdatabaseclickonFile→CreateemptydatabaseintheSimLinkGUI.The
SimLinkGUIisthedialogwiththetitleK-SpiceExatifCom.
1/A25
KONGSBERGK-Spice®
Figure14Savedatabaseas
Reloaddatabase
Afterthedatabaseiscreated,itisnecessarytoloadthevaluesintothelink.Thisisdone
withthebuttonReloaddatabase
Whenthedatabaseisreloaded,theactivationoftheK-Spicetimelineisnished.The
SimExplorerdialogProgresswiththeprogressbarindicatingthataninitializationis
goingon,willbeclosed.ThedialogcloseswiththetextFinished.
Figure15Reloaddatabase
261/A
SettingupaSimLinkapplication
DirectorystructurewithremotelinkinstallationfortheStandardlinks
Ifalinkisrunningonaremote(DCSvendors)server,thecrossreferencedatabasewill
resideinthelink’sworkingdirectoryonthatserver.AnyserverrunningaK-Spicelink
musthaveacopyoftheproject’sfolderstructureinstalled.Thefolderstructuremust
haveapathidenticaltotheonefoundontheModelPC.I.e.ifC:\K-Spice-Projects\”My
project”isusedontheModelPC,thedirectoryC:\K-Spice-Projects\”Myproject”must
befoundontheremoteserveraswell.Theprojectfolderontheremoteservermaybea
leshare,exposingtheprojectfolderontheModelPC.
1/A27
KONGSBERGK-Spice®
2.6Thecommandlineoption—database
-database<name>
Thedefaultdatabasefolderistheapplicationfolderintheprojecttimeline.Thedefault
databasenameisthenameoftheapplicationcreatedfortheSimLink.Forexample,a
projectmightcongureanExatifComlinkwiththenameExatif.Thedefaultdatabase
namewillbeExatif.accdb
Werecommendthatyouusethedefaultfolderanddefaultnameforthedatabase.
However,acommandlineoptionisprovidedtooverridethedefaults.
Thecommandlineoption-database<name>instructstheSimLinktoopenthat
database.
Exampleprojectspecicdatabase:
-database“C:\Configuration\Virtuoso.accdb”
TheK-SpiceprojectcanbeconguredfromSimExplorertoaddthecommandline
optionfortheSimLink.
281/A
TheSimLinkGUI
3TheSimLinkGUI
The.NETlinkdialogforcongurationandmonitoringandtroubleshooting,iscalledthe
SimLinkGUI.ThedialogopensupwhenthetimelinewiththeK-Spicelinkisactivated.
ThetitleofthedialogisK-SpiceExatifComfortheExatifComlink.
TheSimLinkGUIisusedforfourimportanttasks:
AnewAccessdatabaseiscreatedviatheGUIthersttimethetimelinewithalink
applicationisactivated.
SeeCreationofanewdatabaseonpage25
TheAccessdatabasethatisusedforlinkconguration,isnormallyopenedfrom
theSimLinkGUI.
ThefeatureTheOPCServerBrowserintheSimLinkGUIwillndthecorrecturl
adressesoftheexistingOPCservers.
ThelogwindowintheSimLinkGUIisessentialwhenitcomestomonitoringand
troubleshootingtheinterface.
1/A29
KONGSBERGK-Spice®
Figure16TheSimLinkGUIwithworkspaceLog
301/A
TheSimLinkGUI
3.1BrowseOPCServers.
AnimportantpartoftheOPClinkcongurationistogetthenameandaddressofthe
OPCservercorrectintheCongtableintheAccessdatabase.Theactualkeyword
intheCongtableiscalledOpcServer.
DifferentapplicationswillshowyoutheOPCserversandthecorrespondingurl’sonthe
localnet.YouwillndtheminMatrikonOPCExplorerandinSofting’sSOClient.The
besttoolforgettingthevalueofthekeywordOpcServercorrect,istheSimLinkGUI,and
thebuttonBrowseOPCServers.Seethedetailedstepsbelow.
TheOpcServerconnectionURL
TondtheURL,clickBrowseOPCServersintheSimLinkmainwindow.
Figure17TheSimLinkmainwindow
Whenthepanelopens,clickShow
IftheOPCserverisonanothermachine,entertheIPaddressoftheothermachinein
theeldHostComputer.
1/A31
KONGSBERGK-Spice®
Figure18TheOPCServerBrowserdialog
Figure19TheOPCServerBrowserforaHimaComlink
YoucancopytheOPCserverconnectionURLfromhere.TheURLshallbepastedin
theValuecelloftheoftheOpcServerkeywordinCongtable.TocopytheURLto
clipboard,youmustdouble-clicktheline!
Ifyoudoubleclickonthelineandpastetheurldirectlyfromtheclipboard,asdescribed
above,youaresafe.Ifyouforsomereasonpastetheurltoaneditoranddoactrl-C
intheeditor,andactrl-VintheAccessdatabase,youmustlookoutforextractrl-LF
(linefeed)intheAccessdatabasestring.SeeDcsErroronpage46
Note
UsetheURLastheSimLinkGUIpresentsit.Ifyou,inanOpcDaComlinkGUI,ask
fortheURLforanOPCServer ,therst8charactersofthestringisopcda://Ifyou,in
anOpcHdaComlinkGUI,askfortheURLonthesamemachine,theURLwillstart
withthe9charactersopchda://
321/A
TheSimLinkGUI
ExampleofOpcServervalue
opcda://localhost/Matrikon.OPC.Simulation
/{f8582cf2-88fb-11d0-b850-00c0f0104305}
TheurlofMatrikonOPCServerpresentedaboveistherealandcorrecturl.Pleasenotice
thatmanyscreenshotsinthisguidearemanipulated.Thepolicyhasbeentodisguisethe
realurl’sandtherealnamesandstructuresoftheDCSdatabases.Dataitemsfroma
K-Spicedemoprojectarenormallyuntouched.Namesofdataitemsfromrealprojects
shouldallbemanipulated.TheDCStagnamesaremanipulated,andthecorresponding
K-Spicedataitemnamesaremanipulated.
1/A33
KONGSBERGK-Spice®
3.2SyntaxinSimLinklogles
Anempty><
Thebiggerthansymbolandthesmallerthansymbolisusedinlogmessagesto
demonstrateclearlywhereatextstartsandwherethetextends.Ifalinkoperationfails,
theoperationwilloftenproduceanerrortext.Theerrortextwillbepresentedasa
partofalogmessage,encapsulatedin>and<.Iftheoperationsucceeds,noerrortext
isproduced.Iftheoperationsucceeds,thelogmessagewillhaveanemptytextinit,
thetwosymbols><.
341/A
TheSimLinkGUI
3.3UsingExcelconditionalformattingon
SimLinklogles
ConditionalformattinginExcelcanbeapowerfultoolforanalyzingtheSimLinklogle.
Thelinkusedasanexampleinthissection,isanOPCbasedlink
InExcelthereisaformattingoptioncalledConditionalFormatting:TextthatContains...
Figure20ConditionalFormatting
ThesetupisconguredintheRulesManager:
1/A35
KONGSBERGK-Spice®
Figure21TheRulesManager
Thethreerules:
Textcontaining"OnUpdateFromServer"getstheyellowhighlighting
Textcontaining"ToServerHasChanged"getsthegreenhighlighting
Textcontaining"DestinationUpdate"getsthepinkhighlighting
Inotherwords:
YellowhighlightingiswhentheSimLinkreceiveddatafromtheOPCServer
GreenhighlightingiswhentheSimLinksenddatatotheOPCServer
PinkhighlightingiswhentheSimLinkupdatedvalues
Figure22TheSimLinklogleinExcel
361/A
TheSimLinkGUI
Thetagsintheimageaboveareheavilymanipulatedtodisguiserealdatastructure.The
manipulationhasintroducedinconsistencies.Nodoubt.
Thefollowingwilldemonstratehowavalueofaround60wentthroughthesystem
andthenwasresetbacktoaround5.
Step1
TrackdownwhenthevaluewassenttotheOPCserver.Thatisline1705.
Figure23V aluesent
Step2Backingupfromthere,wherediditcomeintothisSimLink?Inrow1700.Since
thevalueis2457,theprojectisusingGain/Biasonthislink-to-linktag
Figure24Thevaluecomesintothelink
Step3Thisisabidirectionalconnection,59.95098isechoedbacktothesourcelinkat
row1702
Figure25Thevalueisechoed
Step4Notethatdifferenceintimebetween1700and1705ishowlongtheSimLinkhad
thevaluebeforesendingitontotheOPCServer.Approximately1second.
Step5SincethereisasubscriptiontotheOPCitemforread&write,thedataisechoed
backtousatRow1711.Inthemessagetothelogle,weactuallyseethelogmessages
forupdatingtheconnectionforthistagrstatrows1709and1710.Butthesewere
actuallytriggeredbyreceivingthedatafromOPCatrow1711.
1/A37
KONGSBERGK-Spice®
Figure26UpdatedValue
Step6Thevalueof5.207...comesfromtheOPCServeratline1716whichtriggers
sendingittotheconnecteditemonrows1714and1714.
Figure27AnewvalueiscomingfromtheOPCServer
Thatnaleventiswhatwearelookingfor.Whatchangeditbacktoaround5afterwe
setittoaround60?TheansweristheDCS,usingtheOPCServer.Atleastaccordingto
ourdatatracemessages.
381/A
TheSimLinkGUI
3.4WatchanitemintheSimLinkGUI
Addingawildcardselectionoftags
TheSimLinkWatchwindowsupportsaspecialsyntaxforaddingmultipleitems
simultaneously.ThisonlyworkswhenthesearchmethodisWildcard.
Figure28SetsearchmethodWildcard
IfyouendthesearchpatternwithtwoasterisksbeforeclickingAdd,thisinstructsWatch
toaddallmatchingitems.
Thenormalsearchpatternforthisexamplewouldbe*hvm*whichindicatesthat
Watchshouldshowallitemswithhvminthemiddleofthename
1/A39
KONGSBERGK-Spice®
Figure29SetsearchItem
Byaddingthesecondasteriskattheend,WatchwilladdthemallwhenAddisclicked.
Figure30Searchitemendingwithtwoasterixes
401/A
TheSimLinkGUI
3.5T agconnectionerrors
Thelinkwillgointoadiagnosticmode,whenconnectionerrorsareencountered
ThisisanexamplefromExatifCom.Whenexaminingthelog,youwillseeinformation
similarto:
Figure31LogleintheSimLinkGUIwithconnectionerrors
WhenconnectingtotagsinaStation,Exatifeitherconnectsalltagssuccessfullyorit
connectsnotagswhenanyerrorisencountered.Sotheerrormessagesyouareseeing
maybeforvalidtags.
Whenanerrorisencountered,ExatifComwillenteradiagnosticmodeandconnecttags
onanindividualbasis.Thisissoitcanreporterrors.Itdoesnotautomaticallydisable
theincorrecttagsandconnectonlythecorrectones.Youwillseemessagesinthelog
lesimilarto:
Figure32LogleintheSimLinkGUIwithoneerror
1/A41
KONGSBERGK-Spice®
3.6T agconnectionsuccess
LoglefromatestsetupwithaDeltaVComlinkanddefaultvaluesinaMatrikontest
server
Figure33LogleintheSimLinkGuifromsuccessfulconnection
421/A
TheSimLinkGUI
Figure34Statuslogwith4successfuldcsconnections
Afulltagconnectionsuccessimpliesthatthereisatagconnectedinbothends.Whenthe
connectionsessionstarts,youwillseethismessageasavericationoftagconnection
inbothends,:
ConfigurationDetailsConnecting
dcs(OTS_R9.Global.R9_TAG-TAG-0002_DO)
->ksim(ProcessModel/HimaRead:DisplayValue#-#)
Note
ThevalueintheStatuslogforDCSItemsConnectedrefersonlytoasuccessonthe
DCSsideoftheconnection
TheDCSsideoftheconnectionisnormallyconguredrst,andsettingtheDCStags
correctlyisnormallythedifcultpartofthelinkconguration.Toavoidthatthelogsare
oodedwithwarningsaboutmissingK-Spicedataitems,thestatusloggivesfeedbackof
theDCSpartoftheconguration,only.
SeenextsessionTheksimendoftheconnectionhasfailed
1/A43
KONGSBERGK-Spice®
3.7Theksimendoftheconnectionhas
failed
Ifyouattheendoftheconnectionsession,seeinthestatuslogthat4DCSItemsare
connected,thisisanindicationthattheDCSsideoftheconnectioniscorrect.The
situationcanstillbethattheksimsideoftheconnectionhasfailed.I.e.ifthenameofthe
timelineiswrong,thereisnowarningintheSimLinkGUIlog.Thetimelinenameis
partoftheSubServerkeywordintheSubServerstable.Ifthetimelinenameiswrong,the
ksimendoftheconnectionfails.
IfyouaddtheitemundertheWatchtabintheSimLinkGUI,youwillseethatthereisa
problem.Withaloadedmodel,thelinkcannotndthevalueoftheK-Spicedataitem.
Thevalueofthedataitemisindicatedwith???.
Figure35NovalueintheWatchworkspace
Tagconnectedintheksimend
WhentheksimsideoftheconnectionisOK,youwillseethismessageintheSimLink
GUIlog:
ConfigurationDetailsTagconnected.StatusOK.Type:
TYPE_DOUBLE-ProcessModel/HimaRead:DisplayValue#-#
441/A
TheSimLinkGUI
3.8Missingnode
ThekeyKsimNodeinthetableKSIM_XREFwasnotgiventhecorrectnameofthe
KsimNode.
ConfigurationWarning:Missingnode,unabletoconnectto
HimaRead:Value#-#at1
Figure36MissingnodeintheSimLinkGUIlogle
Figure37KsimNodeintableSubServers
InthetableSubServers,thekeyKsimNodewasgiventhevalueProcessModel.
ProcessModeliscorrectandinagreementwiththemodelnameinK-Spice.
InthetableKSIM_XREFthevalueofthekeyKsimNodewasmisspelledas
ProsessModel.Theresultofthecongurationerrorwasthatthelinkwasnotableto
connecttheHimatagwithaK-Spicedataitem.
Figure38KsimNodeintableKSIM_XREF
1/A45
KONGSBERGK-Spice®
3.9DcsError
Figure39ThelogmessageE_NETWORK_ERROR
Thiserrorwascausedbytwocontrolcharacters,CarriageReturnandLineFeed,inthe
middleofthenameoftheOpcServer.ThestringusedinthekeywordOpcServerinthe
Congtable,wascopiedfromapageinatexteditorwithctrl-Cctrl-V .Tothissimple
string,theAccessdatabaseaddedtwocontrolcharacters.Onlythesecondpartofthe
string,thepartaftertheLineFeed,wasseenintheAccessdatabase.Whentherowwas
madehigher,thefulltext,twolines,wasvisible.
461/A
TheSimLinkGUI
3.10CoCreateInstanceEx
IftheOPCServerisonadifferentmachine,theoptionBrowseOPCServerscanfailwith
themessageinthebitmapbelow.SeeadescriptionoftheBrowseoptioninthechapter
TheSimLinkGUI.SeeBrowseOPCServers.onpage31
Figure40Accessisdenied
TherstpointinthechecklistforDCOMcongurationis:V erifythattheModelPCand
theOPCServeraremembersofthesamedomain.Ifnot,theerrormessageisAccessis
denied.SeeDCOMcongurationforAbbItsComonpage112
1/A47
KONGSBERGK-Spice®
4TheAccessdatabase
TheAccessdatabasechapterisaboutlinkconguration.
Allthecongurationdetailsofthedifferentlinksareorganizedasvalues,called
Keywords,inTablesintheMicrosoftAccessdatabase.Thischapterisadescriptionofthe
detailedcongurationthelink.ThecongurationisstoredwiththeMicrosoftAccess
database.
Somegeneraldatabaseissues:
TheCrossReferenceList
AnessentialpartofaworkinglinkistheCrossReferenceList.Alltagsreceivedfrom
theDCSsystemhasonelineintheCrossReferenceList.Thecorrespondingtagin
K-Spiceiswrittenonthesameline.
CreationandmaintenanceoftheCrossReferenceListforaspecicproject,isatask
thatisnotcoveredinthismanual.
ThisLinkGuideiswrittenwithassumptionthattheCrossReferenceListfortheproject
alreadyexists.
TheCrossReferenceListwillbeimportedintotheKSIM_XREFtableintheAccess
databaseandisanimportantpartofthelinkconguration.Seeasummaryinthechapter
CreationoftheCrossReferencelist.onpage130
ToSubServer
ToSubServerisanimportantbooleankeywordinthetableKSIM_XREF.ToSubServer
denesifK-SpiceisreadingthevaluefromtheDCSsystem,orifK-Spiceiswritingthe
valuetotheDCSsystem..
ToSubServerisinsomedatabasesimplementedasatickbox,inotherdatabasesasan
integer
Note
Read:ToSubServeristrue,tickedon,—1.K-SpicereadsavaluefromtheDCSsystem
Write:ToSubServerisfalse,tickedoff,0.K-SpicewritesavaluetotheDCSsystem
481/A
TheAccessdatabase
Connected
ConnectedisanotherimportantbooleankeywordinthetableKSIM_XREFK-Spicewill
innormaloperationreadavaluefromtheDCSsystemorwriteavaluetotheDCS
systemthroughthelink.ThisisifthevariableisConnected.(-1isconnected).Setting
thekeywordConnectedinthetableKSIM_XREFto0(0isdisconnected)willtakea
variableoutofthetransferofdata.Ifthevariableisdisconnected,thevariableisstilla
denedvariableintheAccessdatabase.Butnosubscriptionorconnectionisestablished.
Nodatawillbetransferredinanydirection.
Connectedisinsomedatabasesimplementedasatickbox,inotherdatabasesasaninteger
Note
Connected:theConnectedboxistickedon,equivalenttothevalue—1
Disconnected:theConnectedboxistickedoff,equivalenttothevalue0
BucketBrigade.Int4andSaw-toothedWaves.Real4
Youwillseethesetagnamesinmanyoftheimagesinthisguide.Thesearedefault
tagnamesinthetestserverMatrikonOPCServer.
Effortismadeinthismanualtoavoidpresentationoftagnamesfromrealprojects.Most
oftheimageswillbefromaK-Spicedemoproject.Andmostoftheimageswillnot
presentdatafromarealDCSsystemAtestserver,calledtheMatrikonOPCServer,is
usedtosimulatearealDCSsystemformostoftheimages.TheMatrikonOPCServer
canbeconguredtosenddatawithtagnamesthatareequalinformtothetagnamesyou
willndinarealDCSsystem.
ButtheMatrikonOPCServerhasalsoasetofdefaulttagnamesthatareconguredby
theMatrikonapplicationitself.Manyoftheimagesandbitmapsinthismanualwill
presentthedefaultMatrikontagnames.YouwillseethemintheItemNameeldinthe
KSIM_XREFtable.ExamplesofdefaultMatrikontagnamesare:
Random.Int4,BucketBrigade.Real8,BucketBrigade.Int4andSaw-toothedWaves.Real4
Savevalues
ItisnotnecessarytoexplicitlysavenewvaluesintheMicrosoftAccessdatabase.Once
anewvalueforakeywordisentered,thenewvalueisimmediatelysaved.Thatisat
leasthowitshouldbe.Thereisasavebutton,justincase.
1/A49
KONGSBERGK-Spice®
4.1Tables
TheOpcDaComandOpcHdaComAccessdatabasesbothhave12tables.
Figure41TablesintheAccessdatabase
Tables
Allthecongurationdetailsofthedifferentlinksareorganizedasvalues,called
Keywords.ATableintheMicrosoftAccessdatabaseisagroupofKeywords.
Thedatabaseusedinaprojectiscreatedaspartoftheinstallationandinitializationof
thelinkapplication.ThedatabaseisactuallycreatedduringtherstActivationofthe
timelinewherethelinkbelongs.SeeCreationofanewdatabaseonpage25
Thecongurationinthedatabasewillvaryfromlinktolink.Therewillbetablesinthe
Accessdatabaseforonelink,thatyouwillnotndintheAccessdatabaseforanother
link.ThetablesintheAccessdatabasearedenedbytheinstallationprogramforthe
linkapplication.
Thedatabasetablesaredescribedinthischapter,onebyoneinalphabeticalorder.The
twomostimportanttablesare:
1Congwithgenerallinkparameters
2KSIM_XREFwiththedescriptionofallthetagsthataresentthroughthelink.
501/A
TheAccessdatabase
Standardtablesvs.Specictables.
MosttablesarecommontoallthedifferentDCSlinks.Thecommontablesaredescribed
inthesectionStandarddatabasetables.InadditiontotheStandardtablessomelinks
haveSpecictables.I.e.theSoftLogixComlinkhasthetwoextratablesAbTypesand
PLC.ThesetwotablesareSpecictables,andwillonlybedescribedintheguidefor
theSoftLogixComlink.
TheOPClinksdonothaveSpecictables.
Standardkeywordsvs.Specickeywords
Manyofthesectionsinthisguide,describingoneandthesametable,aresplitintwo
parts.TherstpartdescribestheStandardkeywordsinthattable.Standardkeywordsare
commontoallthedifferentDCSlinks.Ifthereisasecondpart,thesecondpartdescribes
theSpecickeywords.SpecickeywordsareuniquekeywordsfortheactualDCSlink.
ForexampletheCongtableintheVirtusoComlinkhasakeyword
IntermediateInputClock.IntermediateInputClockisaSpecickeywordforthe
VirtusoComlink.ThiskeyworddoesnotexistintheotherDCSlinks.
1/A51
KONGSBERGK-Spice®
4.2Standarddatabasetables
Thedatabasetablesaredescribedinthissection,onebyone,inalphabeticalorder..
4.2.1TheCongtable.Standardkeywords
Table2TheCongtable,StandardkeywordssharedbyallSimLink.NETapplications
KeywordNotes
ConnectCheckIntervalSecondsOptional
Version:2.5.0.15
Realvaluethatindicateshowofteninseconds
theSimLinkcheckstoseeiftheDCSisstill
connected
Defaultis30.0
DefaultSubServerOptional
ValueisSubServernametouseasdefaultfor
tagshavingblankSubServereld.
Ifmissing*and*onlyasingle*should-connect*
SubServerisdened,SimLink.NETwilluse
thatSubServerasthedefault
DurationWarningMillisecondsOptional
Version:2.82.9
DcsServertimesmethodcallinitsprocessing
thread.Itlogsanymethodtoexecutethattakes
longerthanthisvalue
Defaultis200
EpochStartOptional
Version:2.9.5.0
Basedate/timetoaddtomodeltime(usedfor
real-timemodels)
Formatisyear,month,day,hour,minute,
second
Defaultis1970,1,1,0,0,0
521/A
TheAccessdatabase
Table2TheCongtable,StandardkeywordssharedbyallSimLink.NETapplications
(cont'd.)
ExitTimeoutMsOptional
HowlongtheSimLinkwaitsforDCSto
disconnectwhenshuttingdownorrestarting
Defaultis10,000ms,butindividual
SimLinksmayhaveadifferentdefault
ThisoverridesanydefaultbytheSimLink
FullUpdateOptional
FullUpdaterateforK-Spicesubscriptionsin
seconds.
TheSimLinkreceivesanupdateforeverytag
athaschangedvaluesincethelastupdate.
Defaultisthecommunicationlibrarydefaultof
30(2011/06/10).
ReconnectEnabledOptional
Version:2.5.0.15
Canbetrueorfalse.Defaultisfalse.Iftrue,
supportingSimLinkwillattempttoreconnect
toaDCSthathaslostconnection
ReconnectIntervalSecondsOptional
Realvaluethatindicateshowofteninseconds
theSimLinkshouldattempttoreconnectif
ReconnectedEnabledistrue
Defaultis30.0
SimLinkSaveFolderOptional
Defaultisemptyfordisabled.Enablessaving
ofbidirectionalvaluesinaSimLinksavele
(currently/typicallyusedbyOpcDaComright
now)
StepSlipMillisecondsOptional
Howmuchearly(inmilliseconds)toacka
SimStep
Defaultis200
1/A53
KONGSBERGK-Spice®
TheDefaultSubServerkeyword.Example
IftherearetwosubmodelsTopsidesandMarine.theusercanselecti.e.Marineasthe
defaultsubserver.
TopsidesandMarinemustbeaddedaskeywordsKsimNodeinthetableSubServers.See
TheSubServerstable.onpage78
541/A
TheAccessdatabase
4.2.2TheCongtable.AllOPCclientlinks
Table3TheCongtable.KeywordssharedbyallOPCClientlinks
KeywordNotes
OpcServerRequiredforOPCLinks
OPCServerConnectionURL
Example:
opcda://localhost/Matrikon.OPC.Simulation/
{f8582cf2-88fb-11d0-b850-00c0f0104305}
BestwaytosetisuseBrowseoptionfromSimLink
tocopytoclipboard.
TheBrowseoptionisdescribedbelow.
EnableDateTimeStampOptional
Version:2.9.4.0
Defaultstofalse
Whenenabled,thecurrentmodeltimeissenttothe
OPCDAserverasthetimestampforthedatavalue
EpochStartOptional
Version2.9.4.0
OnlyrelevantifEnableDateTimeStampistrue
Basedate/timetoaddtomodeltime
Formatisyear,month,day,hour,minute,second
Defaultis1970,1,1,0,0,0
SeethechapterTheSimLinkGUIonhowtondthecorrectvalueforthekeyword
OpcServer.SeeBrowseOPCServers.onpage31
1/A55
KONGSBERGK-Spice®
561/A
KONGSBERGK-Spice®
571/A
KONGSBERGK-Spice®
581/A
TheAccessdatabase
4.2.3TheDataTypeInfotable
Thistablegivesdetailsaboutthetypeofdataatsourceanddestination.Thistablecanbe
updatedbyclickingonSaveDataTypeinfoonthemainwindowforthelink.Thistableis
normallynotused.ForOPClinksitcanbekeptasitis.
1/A59
KONGSBERGK-Spice®
4.2.4TheDiagnosticstable
TheDiagnosticstableintheSimLink.NETdatabasecanbeusedtocongurevarious
diagnosticsavailableinaSimLink.
Table4KeywordsintheDiagnosticstablecommontoallSimLink.NETapplications:
KeywordNotes
ControlItemMonitorForSimLinksthatsupportitEvery5minutes,will
writecontrolitemvaluestothelogle.
Fromversion2.11.2.:AllOPCDAbasedlinks
supportthisdiagnostic.Logscontrolitemvalues
thatareenabledforread-from-OPC-Server.
Thisisusefulwhendiagnosingaproblemwhere
ControlItemTracesendstoomanymessagestothe
logle.
ControlItemTraceWhenenabledforSimLinksthatsupportit,enhanced
debugmessagestologleaboutdataupdatesfor
controlitems.SimilartotheDataTracemessages.
Fromversion2.9.11.0:AllOPCDAbasedlinks
supportthisdiagnostic
DataTraceOptions:semi-colonseparatedlistofItemnames
Enhanceddebugmessagestologleaboutdata
updatesforitemsintheOptionslist.
SeeTheDiagnosticstable.TheDataTracekeyword.
onpage61formoreinformation.
GroupTraceOptions:1)<none>indicates“all”
Options2)semicolonseparatedlistofrates.
Enhanceddebugmessagestologleaboutitem
groupsbasedonupdaterate.
Supportdependsonspeciclink
Fromversion2.10.2.0:OPCDAbasedlink
supportthis.IncludesWriteandOnWriteComplete
messages.
SeeTheDiagnosticstable.TheGroupTrace
keyword.onpage66formoreinformation.
ThreadRunCountsWhenenabled,addsaruncountfortheManager
andDCSthreadsrunning.Usedtodetermineifa
threadisfreezing.
601/A
TheAccessdatabase
Figure42TheDiagnosticstable.Anexample.
4.2.5TheDiagnosticstable.TheDataTracekeyword.
TheDataTracediagnosticsisausefultoolforidentifyingdatatransferproblemsina
project.SeeUsingExcelconditionalformattingonSimLinklogles(notwrittenyet)
foranexampleofusingDataTracetoanalyzeanissue.
UseExcel
Typicallyit'seasiertoseethemessageifyouuseExceltoviewthelogleinsteadof
aatexteditor.SeeSimLinkLogles(notwrittenyet)andUsingExcelconditional
formattingonSimLinklogles(notwrittenyet)formoreinformation.
ThetracemessagesinthelogleareofthetypeDebug,toit'seasytolterExceldisplay
toonlyshowthese.
1/A61
KONGSBERGK-Spice®
Figure43SelectMessageTypeDebuginalogleinExcel.
621/A
TheAccessdatabase
Figure44Debugmessagessortedout
WhatdoesDataTracedo?
IfyouenableDataTraceonanitem,itwillautomaticallyenabletracingonanyitemit's
connectedtoandtheconnectionitself.DataTraceenablestracingonanyitemwhosefull
namebeginswiththeoneoftheoptionstringsspecied.Soit'spossibletoinadvertently
enabletracingonmultipleitems.
Forexample,ifyouenabletracingonBucketBrigade,allitemsthatbeingwith
"BucketBrigade"willbeincludedinthetrace.Typically,youwillspecifythe
fullnameoftheitemyouwishtotrace.Inthisexample,tracewasenabledon
SoftLogixCom2/EMU40OTS1EMU02/LP_EMU_2/EMU_IO:6:O.Data[5]
HowdoIgureoutthenametouseforDataTrace?
FindthemessageintheloglethathastheConnectingsource->destinationinformation.
ThismessageshowsthefullnameoftheitemsfortheSimLink.
Figure45TheConnectingsourcemessage
1/A63
KONGSBERGK-Spice®
Here,thesourceitemis
SoftLogixCom2/EMU40OTS1EMU02/LP_EMU_2EMU_IO:6:O.Data[5]
ThedestinationitemisR6/Prog2.PF1_LSIC_270000.Command.man_target
VerifyDataTraceenabledfortheitem
Whenyouturnontracing,youshouldverifyyougotthenameandspellingcorrectby
lookingforthetracingstartupmessages.
Figure46V erifythespelling
DataTracewasenabledfor
SoftLogixCom2/EMU40OTS1EMU02/LP_EMU_2/EMU_IO:6:O.Data[5]which
automaticallyenabledtracingforR6/Prog2.PF1_LSIC_270000.Command.man_target
becausethereisaconnectiondenedforthem.
CommonTracemessages
ThetracemessagesabovearecommontoallSimLinks.Speciclinksmayhave
additiontracemessages.OPCDA-basedlinkshaveadditionalmessages,forexample
DestinationUpdate,OnUpdateSourceandSendValue.
DestinationUpdate
Figure47DestinationUpdate
DestinationUpdateindicatesthatthedestinationitemvalueisbeingupdated.Thevalue
followingthewordsDestinationUpdateisthevaluebeingsenttothedestination.This
valueistheSourcevalueanddoesnotincludeanyinversion,gainorbiasthatmaybe
appliedbythedestination.
641/A
TheAccessdatabase
DataModelTimeisthemodeltimethattheSourceitemhastimestampedforthatvalue.
Ifit'scomingfromamodelsubscriptionupdate,thenmodeltimewassentbythemodel
server.Ifthesourcedataupdatedoesnotincludeamodeltimestamp,theSimLinkwill
useit'scurrentvalueformodeltime,whenitsavesthesourcevalue.
OnUpdateSource
Figure48OnUpdateSource
OnSourceUpdateindicatesthelinkhasreceivedanupdateonthesourcedataitem.The
numberfollowingSourceUpdatesisacounterofhowmanyoftheseeventshavebeen
received.ThismessageistypicallyfollowedbyDestinationUpdatemessageasthe
connectiontakesthesourcevalueandpropogatesittothedestinationitem.
SendValue
Figure49SendV alue
SendValueindicatesthattheSimLinkisgettingthecurrentvalueoftheitemsoitcanbe
transmittedtoitsdestination(ModelServer,DCS,etc).
ThevaluethatfollowsSendValueisthevaluebeingsent.
ModelTimeindicatesthecurrentmodeltimeaccordingtothelink.
dataModelTimeindicatesthattimestampassociatedwithwhenthevaluewas
originallyupdatedbylink.
ForcedisatrueorfalsevalueindicatingwhethersomecomponentintheSimLink
requestedthatthevaluebesentregardlessofanytolerancevalue.
Triggerisaninternaltrue/falsevaluewithinthelinkforitemsthatshouldhavetheir
valuessentafterspeciceventsregardlessofanytolerancesetting.
Typically,ifForcedandTriggerarebothfalse,thatindicatesthatvalueisbeingsent
becausethechangeisoutsidetheconguredtolerance.
1/A65
KONGSBERGK-Spice®
OPCTracemessages(OpcDaCom,CccOpcCom,DspiceCom,HimaCom,etc)
OnUpdateFromServerandToServerHasChangedareOPCspecictracemessagefor
allOPC-DAbasedlinks.
OnUpdateFromServer
Figure50OnUpdateFromServer
OnUpdateServerindicatesthattheOPCServerhassentthelinkavaluefortheOPCitem.
ThevalueisdisplayednextinthemessagefollowedbytheQualityfortheitem.
ToServerHasChanged
ToServerHasChangedindicatesthattheSimLinkissendingavaluetotheOPCServer.
Thewritetotheserveroccursalmostimmediatelyafterthismessage.
TSisthetimestampthatissenttotheserver,where"—"indicatesthisfeatureisnot
enabled.
4.2.6TheDiagnosticstable.TheGroupTracekeyword.
GroupTraceisintendedtobeacommondiagnosticforallSimLinkforprovidingtrace
messagesinvolvinggroupsoftags.Itwillbeimplementedasneededovertime.The
rstimplementationisforallOPCDAbasedlinksincludingOpcDaCom,DspiceCom,
CccOpcCom,etc.
GroupTraceisenabledbytheratenumberusedforupdatingtags.Youcanenableitfor
multipleratesbyseparatingthevaluesbysemi-colon.Iftheoptioneldisblank,then
theGroupTraceisenabledforallrates.
GroupsalsogettraceenabledifanytaginthatgrouphasDataTraceenabled.
661/A
TheAccessdatabase
GroupTraceoptions
Figure51Allratesareenabled
Figure52Justthe2000rateisenabled
Figure53Groupswithrate500and2000areenabled
OPCGroupTrace
OPCDAbasedlinkswillgetmessagesforonBeforeWriteandonWriteComplete.
onBeforeWriteisjustbeforetheOPCclientmethodforwriteiscalled.onWriteComplete
occurswhentheserverhasindicatedithascompletedprocessingofthewrite.
EachwritefromagroupincludesatransactionID.TheonWriteCompleteforaparticular
groupwritewillhaveamatchingID
1/A67
KONGSBERGK-Spice®
Figure54onBeforeWriteandonWriteComplete
681/A
TheAccessdatabase
4.2.7TheKSIM_XREFtable.Standardkeywords
1IdAutomaticnumericidentierfortherecord.Usedinternally
2KsimNameNameofthemodeltag.SomeBlock:SomeV ariable
3KsimNodeSubServer(ModelServer)wheretagexists.Tobeleftblankifthetag
isfromthesubmodeldenedintheCongtableasaDefaultsubserver.Ifthetagis
fromadifferentsubmodelthenthenameofthesubmodelhastobeaddedhere.
4ItemNameNameoftheDCStag.
5ItemNodeRequiredforalllinksthathavea“Nodes”table.Givename
correspondingtooneoftheentriesin“Nodes”.BydisconnectinganodeinNodes,
allvariablesassociatedwiththisnodewillbedisabled.
6ItemtypeNotrequiredforallSimLinks.ForExatif,typeofIO,DigitalorAnalog.
7ItemAttributeAlternatemethodofenteringAttributes(BinaryCopy,etc).
Optional
8ToSubserverWhenchecked(-1),thedataisreadfromtheDCStoK-Spicemodel.
9BidirectionalWhenchecked(-1),ToSubServerisignoredanddataisread/write.
10ConnectedInordertotesttheIOithastobeconnected.Thisisdonebychecking
thiscell.IfanIOistobetemporarilydisconnectedorisabadtagthenonecan
uncheck(0)thiscell.
11SourceItemNameSourceDCSitemforwritingdatafromaDCStagtoanother
tag.Inwhichcase,KsimNameshouldbeblank.
12SourceFlagWhenchecked(-1),ItemNameisusedasasourceofdatafora
SourceItemName.
13StaticValueThiscellisusedwhenataghastobetestedontheDCSsidebuta
correspondingK-Spicetagisnotavailable.Astaticvaluecanbeenteredinthiscell
totestifthevaluegoesintotheDCS.Staticvalueisagoodwaytotestunknown
orbadDCStags.ItisastaticvaluetosendtotheDCSinsteadofconnectingtoa
ModelServertag.
14DCSunit-Optional.ThisindicatestheunitinwhichthedataissentfromtheDCS
toK-Spice.Note:TheModelServerdoesanyrequiredconversions
15ToleranceThisistheminimumfractionalchangeinthevalueoftheIOrequired
fortheupdatetotakeplace.
16InvertABooleansignalcanbeinvertedbychecking(-1)thiscell.
17KsimCommentThiscellistobelledbytheuserdoingtheIOasthetagsare
addedandtested.TexteldignoredbytheSimLinkavailableforProjectuse
18TestDateThiscellistobelledbytheuserdoingtheIOasthetagsareaddedand
tested.IgnoredbytheSimLink
19SignThiscellistobelledbytheuserdoingtheIOasthetagsareaddedand
tested.IgnoredbytheSimLink
20UpdateRateThisistherateatwhichtheIOvalueupdateswilltakeplace.
ShouldmatchaRateNameintheUpdateRatetable.ThiscanbechangedtoFast/
Medium/Slowasneeded.
21Length0Notcurrentlyworking.Usedforautomaticarrayconnections.
1/A69
KONGSBERGK-Spice®
22Length1Notcurrentlyworking.Usedforautomaticarrayconnections.
Note
Mostofthenamesarestoredinstrings256characterslong.
Note
Beginningwith2.10,theSimLinkwillnowissueanerrorforaninvalidunitanddisable
theDCSitem.
701/A
KONGSBERGK-Spice®
711/A
KONGSBERGK-Spice®
721/A
TheAccessdatabase
4.2.8TheKSIM_XREFtable.Examples
ThistableincludesalltheIOtagnames.
Fourimportantkeywords:
KsimNameNameoftheK-Spicemodeltag.SomeBlock:SomeVariable
ItemNameNameoftheDCStag.
ToSubserverWhenchecked(-1),thedataisreadfromtheDCStoK-Spicemodel
ConnectedInordertotesttheIOithastobeconnected.Thisisdonebychecking
thiscell.IfanIOistobetemporarilydisconnectedorisabadtagthenonecan
uncheck(0)thiscell.
SeethesectionTheKSIM_XREFtable.Standardkeywordsonpage69foradetailed
descriptionofthecolumnsintheKSIM_XREFtable.
ThetableKSIM_XREFistheimplementationoftheCrossReferenceListintheAccess
database.CreationoftheCrossReferenceListisoutsidescopeofthisDCSLinkGuide.
ThissectionpresentsimagesoftheKSIM_XREFfromdifferentprojects,meantas
areferenceintroubleshootingsituations.SeealsothechapterCreationoftheCross
Referencelist.onpage130
Figure55TheKSIM_XREFtablefromatestofthenewAbbItsComlink
TheItemNamesarefromaMatrikonOPCServersetupforlinktest.
Figure56TheKSIM_XREFtablefromaprojectwithaOpcDaComlink
1/A73
KONGSBERGK-Spice®
Figure57TheKSIM_XREFtablefromaprojectwithaHimaComlink
Figure58TheKSIM_XREFtablefromaprojectwithaSim4MeComlink
Pleasenotethatimagesfromrealinterfacesaremanipulated.Ithasbeenanissue
toprotectthedatastructureinrealsystemsfromexposureinthisguide.Ifthereare
inconsistenciesbetweentagsinanimageandtagsinthetext,thisisprobablynota
resultofinconsistenciesintherealsystem.Thisisprobablytheresultofpoortextand
imagemanipulation.
741/A
TheAccessdatabase
4.2.9TheKSIM_XREFtable.Anexample:Twodataitems
Figure59TwodataitemsintheSOClient
TheItemNamesarefromaMatrikonOPCServerusedforlinktest.Saw-toothedWaves
andBucketBrigadearedefaultitemsintheMatrikonServer.Theitemswillnotneed
anymodicationfromtheusersside.Theitemsarethere,andhavevalues,whenyou
startupanyMatrikonServer.
Figure60TwodataitemsdenedinKSIM_XREF
Figure61Twodataitemsconnected
FromtheSimLinkGUIlog.
1/A75
KONGSBERGK-Spice®
Figure62TwodataitemsintheSimLinkGUI
Figure63Finally.TwodataitemsinK-Spicewatchlist
761/A
KONGSBERGK-Spice®
771/A
KONGSBERGK-Spice®
4.2.10TheSimLink_XREFtable.
TheSimLink_XREFtablecanbeleftblankforOPClinks.
ForSimLink_XREFtableisusedinlinktolinkconguration.SeeConguring
SimLink.NETtoSimLink.NETonpage81
4.2.11TheSubServerstable.
TheSubServerstable.
TheSubServerstablemustcontainthenameoftheapplicationcontainingtheK-Spice
model.IntheexamplebelowthesimulationapplicationiscalledProcessModel,part
oftheEngineeringTimelineofK-Spice.
Figure64TheSubServerstable.Anexample
Figure65TheSubServerstable.Anotherexample
781/A
TheAccessdatabase
4.2.12TheUpdateRatetable
Figure66TheUpdateRatetable
ThekeywordUpdateRateintheKSIM_XREFtablecanbemodiedusingthistable.
Note
AsandwhentheIOtags/statictagsaremodiedintheAccessdatabase,thedatabase
hastobereloadedintotheExatifComlinkinordertodotheIOconnectionsbetween
theK-SpicemodelandYokogawaDCS.ThisisdoneusingtheReloaddatabasetabin
theSimLinkGUI.
1/A79
KONGSBERGK-Spice®
4.2.13TheWatchdogItemstable.
2.9.3.0ofSimLinksimplementedawatchdogfeatureforDCSitems.Theusercongures
DCStagsthatshouldbemonitoredbythelink.Ifthosetagsdon'tchangevaluesfor
TimeoutMillisecondswhilethemodelisrunning,itwilltreatedasawatchdogexpiration.
ComponentStatus.WatchdogAnyExpiredwillbesettotrueifanyconguredwatchdogis
expired.Speciclinksmayalsohavebuilt-inwatchdogs(SoftLogixCom,forexample).
ComponentStatus.WatchdogAnyExpiredcanchangebacktotruefromfalseifallvalues
havechangedwithintheirtimeoutperiod.
WatchdogitemsareconguredinthedatabasetableWatchdogItems.Currently
(2.9.3.0),elementsofarraysarenotsupported.
Table5CongurationofWatchdogitems
IdAutomaticrownumber
LocalNameNameoftheDCStag
LocalNodeNotrequiredforallSimLinks.
DCSnodewheretagexists.ThePLCinSoftLogixCom,
forexample.
ConnectedWhenunchecked(0),recordisignored.
UpdateRateUpdaterateofitem.ShouldmatchaRateNameinthe
UpdateRatetable.
TimeoutMillisecondsMaximumtimeinmillisecondsthevaluecanbe
unchangedbeforeawatchdogexpiration.Shouldbeat
leasttwiceaslongasUpdateRate.
CommentTexteldignoredbytheSimLinkavailableforProject
use.
ThisisasampleconguredusedfortestingwithOpcDaComandMatrikonOPCServer
forSimulation.Random.Int4changesfrequently.BucketBrigade.Int4doesnot
automaticallychange,soitwaseasytoseeWatchdogAnyExpiredtogglingbetween
falseandtrue
Figure67SampleofWatchdogItems
801/A
TheAccessdatabase
4.3ConguringSimLink.NETto
SimLink.NET
ThisisasectioninthechapterTheAccessdatabasethatdescribestheconguration
necessaryforsendingdatainoneDCSlinkdirectlytoanotherDCSlink.SeveralAccess
databasetablesareinvolved.ThemostessentialhereisthetableSimLink_XREF.
4.3.1CongureSubServersTable
InordertocongureaconnectionfromoneSimLink.NETtoanotherSimLink.NET,you
mustcongurethetargetSimLinkintheSubServersdatabase.
BelowisaCccOpcComapplicationconguredtoconnecttoanOpcDaComapplication
namedOpc.
Figure68TheSubserverstable.Linktolink.
4.3.2CongureItemConnectionsinSimLink_XREF
TheSimLink_XREFtableissimilartoKSIM_XREFtable.Youshouldcongurethe
SimLink_XREFtablefortaginaSimLinkthataregoingtoreceivedatafromtheremote
SimLink.
BelowisaCCCexamplethatconguresC1\Point2toreceivedatafromOpc\Bucket
Brigade.Real8.
Figure69TheSimLink_XREFTable
4.3.3ActivateSimLinkTWICEfornewconnections
ThersttimeaSimLinktriestosubscribetoaremotedatapoint,theconnectionmayfail
becausethetheremoteSimLinkmaynotknowtomakethepointavailable.However,
theremoteSimLinkwillsavetheinformationsoitcancreatethepointthenexttimeit
starts.ThisinformationissavedinthetableAdditionalDcsItems.
1/A81
KONGSBERGK-Spice®
BelowisanentryfromtheOpcapplicationaftertherstconnectionattempttoBucket
Brigade.Real8.
Figure70ThetableAdditionalDcsItems
4.3.4Conguringunitconversionforlink-to-link
Beginningwithversion2.10.0.0,link-to-Linkcandounitconversions.Inorderto
dotheconversions,youmustconguretheunitcategoryandtheitemunits.The
SimLink_XREFtablehas3eldsforthisconguration.
Conversionwillnotoccurif:
Invertisset
Anyoftheunitcongurationeldsareblank
Table6Unitkeywords
FieldPurpose
UnitCategoryTheUnitCategoryfortheitems
Example:temperature
LocalUnitTheunitofthelocalitem
Example:C
RemoteUnitTheunitoftheremoteitem
Example:F
Figure71UnitKeywords.Example
821/A
SoftingandMatrikonOPCtesttools
5SoftingandMatrikon
OPCtesttools
Thesearetwoveryusefultesttools.TheMatrikontesttoolscanbedownloadedfree
frominternet.
Softingtesttool
Softing’sSOClientisusedasaOPCclient.TheprogramreadsdatafromanyOPCsever.
TheSoftingOPCclientreadsthesamedataK-Spicereads.IftheSOClientcanread
them,itisagoodreasontobelievethatK-Spicecanreadthem.
Matrikontesttool
MatrikonOPCisusedtosetupatestOPCserver.
TheMatrikonOPCtestservercanbesetupwithtagswithinsameformatastagsinthe
actualDCS.Thetagsintheserveralsohavevalues.IfK-Spicecanexchangevalues
theMatrikonserver,itisagoodindicationthatK-Spicecanreaddatafromandwrite
datatotheDCSserver.
ThereisalsoaprogramcalledMatrikonOPCExplorerthatreadsOPCdata.The
MatrikonOPCExplorerandtheSOClientaretwoprogramsthatdothesamething.
ThecompanyMatrikonOPCdeliversOPCserversforautomationvendors.Fromtheir
websiteyoucandownloadfreeapplicationsfortestofOPCcommunication.
MatrikonOPCSimulationServer
MatrikonOPCExplorer
MatrikonOPCHDAExplorer
URLstotheMatrikondownloadpages:
IfyoudownloadtheMatriconOPCSimulationServer,itisnotnecessarytodownloadthe
Explorer.TheExplorerispartoftheSimulationServerdownload
www.matrikonopc.com/products/opc-drivers/opc-simulation-server.aspx
www.matrikonopc.com/products/opc-desktop-tools/opc-explorer.aspx
www.matrikonopc.com/products/opc-desktop-tools/opc-hda-explorer.aspx
1/A83
KONGSBERGK-Spice®
Note
Softing’ sSOClient.exeisnotavailableasfreedownload.Askafriendforacopy.
841/A
SoftingandMatrikonOPCtesttools
5.1TheSoftingOPCclienttool
SoftingOPCToolboxhasanapplicationtosetupanOPCtestclient.Theapplicationis
calledSOClient.exe.
TheSOClientcanbeusedtoreadOPCvaluesandwriteOPCvalues.Thesamevalues
thatK-Spiceissetuptoreadandwrite.Theapplicationwillbeatestprogram,in
paralleltoK-Spice.ItcanbeusedintheinitialphasetocheckiftheModelPC,andthen
K-Spice,hasaccesstotheDCSvalues.
SetupforaccesstodatainaMatrikonServeronthelocalPC.
RunSOClient.exe
IntheSOClientMainWindow
UndertabOPCServersTreeroot:LocalDataAccessV3(thisisOPCformatversion
3)→MatrikonOPCServerforSimulationandTesting
RighthandclickonMatrikonOPCServerforSimulationandTesting→AddServer
Verifythatadefaultsubscriptionopensintheleftwindow.Thedefaultsubscriptionis
calledGroup.
Figure72SoftingOPCToolboxDemoClient
OpentabDABrowse
RighthandclickonMatrikonOPCServerforSimulationandTesting→AddItems
forAlltags
VerifythatthedatasubscriptioncalledGroupislledwithalltheDefaulttagsinthe
MatrikonServer.
1/A85
KONGSBERGK-Spice®
OpentabDAItemsBothwindowsarelledwithtags.Seethegurebelow.
SetupforaccesstodatainaDeltaVServeronanothermachine.
RunSOClient.exe
IntheSOClientmainwindowManualTypeintheIPaddressoftheDeltaV
machine.Itcanbetrickytowritetheaddress,clickontheactualeldmorethanonce,
togetintowritemodeforatextstring.
Figure73FindanOPCServerwiththeIPaddress
OpenthetreeforserversanddatainserversontheOPCServermachine.Righthand
clickonthenameonthemachineAddServertoaddittolistofserversintheleft
eldofthemainwindow.
861/A
SoftingandMatrikonOPCtesttools
Figure74AddtheOPCServertothelistofservers
CheckavalueintheOPCServer
Figure75Transmittervalue24
1/A87
KONGSBERGK-Spice®
ComparethevalueintheSOClientwiththevalueinK-SpiceSimExplorer
Thesetupisthis:
TheDemoProjectisopenedinK-Spice
TheMatrikonOPCServerisstarted.NodataitemisaddedtotheServer.TheServer
hasonlythedefaulttags,i.eBucketBrigade.Real8
ThelinkapplicationAbbItsComisaddedtotheDemoProject,underthetimeline
OTS_ABB.
ACrossReferenceisenteredintheAccessdatabasethatispartoftheAbbItsComlink
TheCrossReferenceisbetweentagBucketBrigade.Real8intheMatrikonServerand
thedataitem23PT0001:MeasuredValueintheK-Spicemodel.
Figure76ThetableKSIM_XREFintheAccessdatabaseforAbbItsCom
ModifytheK-Spicevalue
SetanewvalueinK-Spice,andverifythatthevalueinSOClient,isupdated.
Figure77NewK-Spicetransmittervalue
TheSoClienthasasubscriptiontothetagBucketBrigade.Real8intheMatrikonServer.
BucketBrigade.Real8isnow26.
881/A
SoftingandMatrikonOPCtesttools
Figure78UpdatedvalueinSoftingOPCToolboxDemoClient
1/A89
KONGSBERGK-Spice®
5.2ErrormessagesinSoftingOPCclient
tool
AboutOPCEnum
TheOPCEnumeratorisabrowserforlocalorremoteOPCserverapplications.The
OPCFoundationisresponsiblefortheapplicationOpcEnum.exe,Theapplicationispart
ofresdistributablepackagesincludedinmostSCADAsoftware.Thisapplicationis
requiredbyOPCServers/ClientstolistdowntheOPCserversinstalledonacomputer.
Theapplicationwillbeinstalledonamachineaspartoftheinstallationofanyofthe
K-SpiceOPCSimLinks.
TheDCOMsecurityisnotopeneduponaDeltaVServer.
TherecanbesituationswheretheSOClientandtheK-SpiceSimLinkcanseeanOPC
Serveronanothermachine,butnodatacanbetransferred.TheOpcEnumproperties
ontheOPCServermachinemustbeopenedupforreadaccess.WhenanOPCClient
applicationconnectstoaremotecomputerandattemptstobrowseforOPCServers,itis
actuallyconnectingtoOpcEnum.exeontheremotePC.OpcEnumretrievesthelistof
OPCServersonthecomputeronwhichitresides.TheinabilitytoconnecttoOpcEnum
istypicallyaresultofauthenticationfailure.SeeModifytheDCOMcongurationon
page122
Figure79FailedtocreatemessageinSoftingtool
901/A
SoftingandMatrikonOPCtesttools
5.3TheMatrikonOPCServer
TheMatrikontesttoolconsistsoftheMatrikonOPCSimulationServerandthe
MatrikonOPCExplorer.TheMatrikonOPCServergeneratessimulatedDCSvalues
inOPCformat,andisthemostimportantofthetwoapplications.TheMatrikonOPC
ExplorerreadsOPCdata.TheSoftingOPCClienttoolandtheMatrikonOPCExplorer
dothesamething.
SeeSoftingandMatrikonOPCtesttoolsonpage83forURLstothedownloadpages.
Figure80TheMatrikonOPCServer
TheMatrikonOPCServerandK-Spicewillnormallyrunonthesamedesktopmachine.
TherecanalsobesituationswheretheDCSvendorhasinstalledaMatrikonOPCServer
ontheDCSmachinefortestpurposes.
TheMatrikonOPCServerisusedtoverifythattheDCOMsettingsontheModelPCare
correct.ThetestwillbeifK-SpicecanreadandwriteOPCvaluesintheMatrikonOPC
Server.Theapplicationwillbeatestprogram,inparalleltotheDCSOPCserver.If
thelinkcanaccesstheMatrikonvalues,itisanindicationthatitalsocanalsoaccess
theDCSvalues.
TheMatrikonOPCServerhastwodifferenttypesofdata.Inthenextsectionisdescribed
howtheservercanbesetuptosendtwoOPCvaluesinYokogawatagformattoK-Spice.
Theothertypeofdataisadefaultsetoftags.Youwillndthedefaultsetoftagson
anyMatrikonOPCServer.Thedefaulttagsethascharacteristicnames,Random.Int4,
BucketBrigade.Real8,BucketBrigade.Int4Saw-toothedWaves.Real4
1/A91
KONGSBERGK-Spice®
Note
IfyouhaveaMatrikonOPCServerinstalledonyourmachine,youcanexperiencethe
thatServerstartsautomatically.Ifalinkasksfordata,theServerwillstart.
Thiswillbethesituationwherethedefaultsettingsofalink,I.E.theHimaComlink,
hasMatrikonasthedefaultOpcServer .IfyoudonotmodifythetheOpcServerinthe
CongtablewhenyourstcreatetheAccessdatabase,andthenactivatethetimeline,
theMatrikonOPCServerwillstart.TheHimaComlinkwillconnecttotherunning
MatrikonOPCServer ,andthelinkwillconnectto4defaultMatrikontags.Atlink
startup,4defaultstaticvalueswillbewrittenfromtheHimaComlinktotheServer .
5.4TwotagsintheMatrikonOPCServer
Starttheserver
StarttheMatrikonOPCSimulationServerfromtheWindowsStartmenu→MatrikonOPC
ServerforSimulation
ImportAliases
Thetestserverwilltypicallybeconguredtosendawholearrayofvalues.Thestarting
pointwillthenbeanExcelsheetwithallthetagsintheactualY okogawaserver.To
simplifythedocumentation,wewillonlyhandletwotagshere.Thestartingpointisthe
leTwoTags.csv,acommaseparatedle,withtwotagsinit.Acommaseparatedlecan
easilybeexportedfromanExcelsheet.
DataType5isdouble.DataType11isboolean.
Figure81TwoTags.csv
InthetheMatrikonOPCServermainwindowFile→ImportAliasesTwoTags.csv
SavetheServercongurationasTwoTags.xml
921/A
SoftingandMatrikonOPCtesttools
CreateAliasesmanually
Onealternativeistoimportacommaseparatedle,theotheralternativeistocongure
theMatrikonOPCServermanually.Withmanualcongurationthestartingpointis
anemptyMatrikonOPCServer.
Inthepaneonthelefthandside,calledCurrentconguration,righthandclickonmenu
itemAliasConguration.SelectInsertAliasGroup.
Figure82InsertAliasGroup
RenamethenewaliasgrouptoPI-602–602.Righthandclickonthenewmenuitem
PI-602–602.SelectInsertAliasGroup
RenamethenewaliassubgrouptoPV .
DoubleclickonthenewmenuitemPV.Inpaneontherighthandside,calledContentsof
aliasgroup‘PV’,doubleclickontheemptyline.ThedialogInsertNewAliaspopsup.
1/A93
KONGSBERGK-Spice®
InthedialogInsertNewAliasllinName:PVandDataType:REAL8andUpdate
Rate:100.Savethesettings.
Figure83
CongurethesecondaliasPI-604–604inthesameway.
SavetheServercongurationasTwoTags.xml
ImportAliasesvs.CreateAliasesmanually.
Thereisnodifferencebetweenthetwowaysofsettingupthecongurationforthe
MatrikonOPCServer.Theresultisthesame.ThelesTwoTags.xmlcreatedwitha
commaseaparatedle,andTwoTags.xmlcreatedmanually,areidentical.
941/A
SoftingandMatrikonOPCtesttools
Figure84TheleTwoTags.xmlsavedfromMatrikonOPCServer
TheMatrikonOPCExplorer
IntheMatrikonOPCServermainwindowclickthebuttonViewOPCT agsforthisServer.
Figure85StarttheMatrikonOPCExplorerfromtheServer
IndialogMatrikonOPCExplorer(Group0)addtagsbyclickingonPI-602–602inthe
windowAvailableItems
InthewindowAvailableTagsdoubleclickonPV .
1/A95
KONGSBERGK-Spice®
Figure86AvailabletagsintheExplorer
VerifythatPI-602–602.PViswritteninthewindowTagstobeadded.Addbothtags.
961/A
SoftingandMatrikonOPCtesttools
Figure87TwotagsinMatrikonOPCExplorer(Group0)
ConrmthelistofaddedtagswithOK.
TheMatrikonOPCExplorermainwindowopens.YoumaysavetheExplorer
congurationasTwoTagsSession.xml
1/A97
KONGSBERGK-Spice®
Figure88Group0inTwoTagsSession.
Figure89TheleTwoTagsSession.xmlsavedfromMatrikonOPCExplorer
SetvaluesintheMatrikonOPCServer
IntheMatrikonOPCExplorermainwindow,doubleclickonPI-602–602.PV,inwindow
ContentsofGroup0.V erifythatthedialogWriteValuesopens.
InthedialogWritevaluessetPI-602–602.PVtoV alue22
DothesameforPI-604–604.PVandsetthatV alueto33.
981/A
SoftingandMatrikonOPCtesttools
Figure90DialogWriteValuesinMatrikonOPCExplorer
1/A99
KONGSBERGK-Spice®
5.5TwotagsintheOpcDaComlink
ThissectioncontinuestheexamplewithTwotagsintheprevioussection.TheTwotags
conguredintheMatrikonOPCServer,isreadinK-SpiceviathelinkOpcDaCom.
CongurationoftheOpcDaComlinkinK-Spice
SeeCreatealinkapplicationintheK-Spiceprojectonpage18foramoredetailed
description.ThefollowingisashortdescriptionofthethreerelevanttablesintheAccess
database.
ThersttableconnectsthevariableswiththeRealTimetimeline,viathekeyword
KsimNodeinthetwotablesSubServersandCong.
Figure91TheSubServerstabledenesthetimelineofthevariablesintheAccess
databasefortheOpcDaComlink
TheCrossReferenceListissetupasdifferentkeywordsintheKSIM_XREFtable
Figure92TheKSIM_XREFtableintheAccessdatabase
K-SpiceconnectstotheMatrikonOPCServerwiththeinformationintheCongtable.
1001/A
SoftingandMatrikonOPCtesttools
Figure93TheCongtablewiththeURLtotheMatrikonserver
1/A101
KONGSBERGK-Spice®
StartK-SpiceandreadtheTwotags
ThenextstepistoopentheprojectinK-Spice.ActivatetheRealTimetimeline,and
loadthemodel.
Figure94ActivetimelinewithanOpcDaComlink
WatchtheSimManagerconsole,andlookforerrormessages.TheSimLinkGUI,the
mainwindowfortheOpcDaComopens.
Openthelogleforthelink.V erifythattheOPCtagsandtheK-Spicetagsare
connected.
Intheloglebelowthemessageswithoutinterest,arelteredout.
1021/A
SoftingandMatrikonOPCtesttools
Figure95TheloglefortheOpcDaComlink
SetanewvalueintheOPCServer
DoubleclickononeofthetwotagsintheMatrikonOPCExplorer,andenteranewvalue
inthedialogWriteValues,asexplainedabove.TheK-SpicemodelcanbeinPause.
VerifythatthenewvaluesfortheTwotagsintheOPCservercomethroughto
K-Spice.
Figure96ThenewOPCServervaluesinK-Spice
1/A103
KONGSBERGK-Spice®
5.6TheMatrikonOPCHDAExplorer
VericationoftransferofdatafromanOPCHistoricaldatabasewithMatrikonOPC
HDAExplorer
UrltoMatrikon:
www.matrikonopc.com/products/opc-desktop-tools/opc-hda-explorer.aspx
DirectlinktoMatrikon
AfterrunningMatrikonOPCHDAExplorer,selectyourtargetserverinthedropdown
andthenclicktheconnecticon.
Figure97Connecttoserver
Thenright-clickontheserverintheconnectiontree.ThenleftclickonAddItems
1041/A
SoftingandMatrikonOPCtesttools
Figure98Additemsinserver
Youcannavigatetothedesireditemthentherightclickonitandthenleftclick"AddTo
TagList"
1/A105
KONGSBERGK-Spice®
Figure99Additemstotaglist
YoucanalsotypethenameintheItemIdtextbox.Thenclickthebluearrow.
1061/A
SoftingandMatrikonOPCtesttools
Figure100AddrstitemtotheMatrikonOPCHDAExplorer
ClicktheOKbuttontoaddtheitemstotheMatrikonOPCHDAExplorer.
1/A107
KONGSBERGK-Spice®
Figure101AddmoreitemstotheMatrikonOPCHDAExplorer
1081/A
SoftingandMatrikonOPCtesttools
Figure102ItemsaddedtotheMatrikonOPCHDAExplorer
OpcHdaComusestheReadRawcalltogetdatafromtheserver.Todothiswiththe
MatrikonOPCHDAExplorer,clickonthedesiredtagtoselectit.ThenclicktheRA W
buttonintheribbon.
1/A109
KONGSBERGK-Spice®
Figure103UseReadrawtogetdata
Enterastarttimeandanendtimeinthedialogbox.MaxNumValuesof0instructsthe
servertoreturnalldatawithintimerange.ClickReadRawtogetthedatafromtheserver.
Figure104SetintervalintheReadRawdialog
Ifsuccessful,MatrikonOPCHDAExplorerwillshowtheresults.
1101/A
SoftingandMatrikonOPCtesttools
Figure105SuccessfulreadingintheMatrikonOPCHDAExplorer
1/A111
KONGSBERGK-Spice®
6OPCDCOMconguration
Aboutthischapter.
Therearethreeimportantsectionsinthischapter.
DCOMcongurationforAbbItsComonpage112.Thenamesarespecicforthe
ABBITSsystem.ThestepsshouldberelevantforconguringDCOMcommunication
onanysystem.
Checkthelocalsecuritypolicysettingsonpage121andModifytheDCOMconguration
onpage122ThesetwosectionsaremoreorlessanalternativetothesectionDCOM
congurationforAbbItsCom.Thesetwosectionshavefocusonopeningupanysecurity
settingthatcanblockthecommunication.
6.1DCOMcongurationforAbbItsCom
Aboutthissection
ThisisadescriptionspecicforthetheAbsItsComlink.Ifyouareworkingwith
otherlinks,therearethingsinthissection,thatcanberelevant.Sothissectionisnot
proledtobepartofthelinkguidefortheAbsItsComlink,only.Thissectionispartof
allthelinkguides.
TheOPCservernameITSOPCDASERVER.ITSOPCDASurrogate.1isastandardname
onABB’sAspectServers.OnaHIMAServerthecorrespondingnameoftheOPC
ServercanbeHIMA.PLC_1.DA.1
Forgeneraldescriptionofinstallationofalink,SeeCreatealinkapplicationinthe
K-Spiceprojectonpage18
InstallationofABBsoftware
TheABBsoftwarepackagecalled"800xASimulatorLinkStandaloneClient"mustbe
installedontheModelPC.Notethatinolderversionsof800xA,thissoftwareiscalled
"ITSLinkStandaloneClient".Thepackageisalsoreferredtoasthe“ITSlink”
Thetextbelowrefertotheuseraccount800xAServiceAccount.Onotherinstallations
theuseraccountiscalled800xAServAcc!Y oucanopenServicesontheAspectServerto
ndthenameoftherelevantuseraccount.
1121/A
OPCDCOMconguration
OnsomeplantstheOPCDataServercanbeinstalledonathirdmachine,theEngineering
PC.InthissituationtheOPCDataServerontheEngineeringPCisareplicaofthe
OPCDataServerontheAspectServer.
Therearenoguresinthechecklistsbelow.Inthiswaythelistsarecompactandeasyto
read.Y ouwillndtherelevantguresattheendofthesection.
1/A113
KONGSBERGK-Spice®
DCOMcongurationforAbbItsCom
Checklistonbothmachines
1VerifythatboththeModelPCandtheAspectServeraremembersofthesame
domain.
Youcanverifythecomputersdomaininacmd.exewindow.Writesetuand
return.YouwillgettheUSERDOMAIN
ThecomputersdomainisalsoveriedintheControlpanel→User
Accounts→ManageUserAccounts
DomainonWindowsServer2003and2008
WindowsServerscanbesetupwithActiveDirectoryandDomains.TheServers
canalternativelybesetupwithonlyUsersandGroups.Iftherearenodomain,the
setuinthecommandwindowwillshowUSERDOMAINandthemachinename.
2Verifythattheclocksaremoreorlesssynchronized.
3TheWindowsusermusthaveAdministratorrightsonbothmachines.
ThisisnecessarywhentheAbbItsComlink,installedontheModelPC,startsthe
ITSOPCserver,ontheAspectServer.TheITSOPCserveristheapplication
ITSOPCDASurrogate.exe.
YoucansettheAdministratorrightsbyopeningAdministrativeTools→Computer
ManagementandndLocalUsersandGroups→Groups
1141/A
OPCDCOMconguration
DCOMcongurationforAbbItsComcontinued
ChecklistontheAspectServer
4VerifythattheuserortheusersgroupispartoflocalgroupAdministrators.
YoucandothatbyopeningComputerManagementandndLocalUsersandGroups
→Groups
5IftheWindowsFirewallisenabled,makeanExceptionfor
ITSOPCDASurrogate.exe.
ExceptiononaWindows7andServer2008:
ThisisdoneintheControlpanelOpenAdministrativeTools→WindowsFirewall
→AllowaprogramorafeaturethroughWindowsFirewall
IndialogAllowedPrograms:ChangesettingsAllowanotherprogram.IndialogAdda
program:Browse.LocateITSOPCDASurrogate.exe.Addtheprogramtothelist
ofallowedprogramswiththebuttonAdd.LeavetheBrowserwithOKandverify
thatITSOPCDASurrogateislistedinthewindowPrograms.
VerifythatITSOPCDASurrogateisinthelistAllowedprogramandfeaturesand
thatthebuttonDomainischecked.Seegurebelow:K-SpiceABBITSCominthe
listAllowedPrograms.
ExceptiononWindowsXPandServer2003:
MakeanExceptionintheWindowsFirewall.Seethegurebelow:Excpetions
onaWindowsServer2003machine.
6ITSOPCDASurrogatemustbesettorunasuser800xAServiceAccount.
Beforeyoucandothis,youmustknowthepasswordfortheuser
800xAServiceAccount.
Tosettheuser800xAServiceAccount:
StartwiththeControlpanel.OpenAdministrativeTools→ComponentServices.
IndialogComponentServices:GotoConsoleRoot→ComponentServices
→ComputersMyComputer→DCOMCongYouwillseeaeldoficonshere.
YoucanchangetheiconstoalistviewwitharightclickonDCOMCong.→View
Details
FindITSOPCDASurrogate
RighthandclickontheiconITSOPCDASurrogateorthecorrespondinglistitem,
then→Properties
IndialogITSOPCDASurrogateProperties:OpentabIdentifySelectThisuserEnter
User:800xAServiceAccountandPassword.
1/A115
KONGSBERGK-Spice®
DCOMcongurationforAbbItsComcontinued.
ChecklistontheModelPC
7AddthekeyHKEY_LOCAL_MACHINE\Software
\Classes\ITSOPCDASERVER.ITSOPCDASurrogate.1intheRegistry.
Awaytodothisistostartregedit.exeontheAspectServer,andexportthe
actualkeyasa.regle.Thenimportthe.regletotheregistryontheModelPCby
copyingtheleovertotheModelPCanddoubleclickonit.
Thisisanexampleofa.regle:
OPC/Vendor:ABBAS
CLSID:{023CD2A3–43BA-4435–BBF6–ECBC2D6BDDCE}
Seethegurebelow,RegistryleforaHimalink.
8IftheWindowsFirewallisenabled,itmaybenecessarytoopenTCPport135.
9IftheWindowsFirewallisenabled,makeanExceptionforAbbItsCom.exe.
ExceptiononaWindows7andServer2008:
ThisisdoneintheControlpanelOpenAdministrativeTools→WindowsFirewall
→AllowaprogramorafeaturethroughWindowsFirewall
IndialogAllowedPrograms:ChangesettingsAllowanotherprogram.IndialogAdda
program:Browse.LocateAbbITSCom.exe.Addtheprogramtothelistofallowed
programsthebuttonAdd.LeavetheBrowserwithOKandverifythatK-SpiceABB
ITSComislistedinthewindowPrograms.
VerifythatK-SpiceABBITSComisinthelistAllowedprogramandfeaturesand
thatthebuttonDomainischecked.Seegurebelow:K-SpiceABBITSCominthe
listAllowedPrograms.
ExceptiononWindowsXPandServer2003:
MakeanExceptionintheWindowsFirewall.Seethegurebelow:Excepetions
onaWindowsServer2003machine.
10Itmightbenecessarytoaddtheuser800xAServiceAccountunderDefaultAccess
permissionsandLaunchandActivationPermissions.
However,thisisoftenthestandardifbothcomputersareinthesamedomain.
ThisisdoneintheControlpanel(InControlpanelwith8items,openSystemand
security.)OpenAdministrativeTools→ComponentServices.
IndialogComponentServices:GotoConsoleRoot→ComponentServices
→ComputersMyComputer
ThesettingsforaddingauserisfoundinCOMSecurity:
RighthandclickonMyComputer→Properties→COMSecurity.
IndialogMyComputerPropertiesselecttabCOMSecurity
11CheckthatthenameoftheABBOPCserveriscorrectinthecongtableinthe
Accessdatabase.
WhenAbbItsComisrunningontheModelPCandconnectingtothe
OPCserverrunningontheAspectServer,thecorrectOPCnameis
ITSOPCDAServer.ITSOPCDASurrogate.1
1161/A
OPCDCOMconguration
Whenbothprogramsaresetuptorunonthesamemachine,thecorrectOPCname
isITSOPCDAServer.ITSOPCDAHandler.1
AnexampleofhowtosetthenameoftheOPCserverisshowninagurebelow:
NameoftheOPCServerintheCongtable
1/A117
KONGSBERGK-Spice®
TwodialogsforsettingException:
Figure106AllowedProgramswithK-SpiceABBITSComonaWindows7machine
1181/A
OPCDCOMconguration
Figure107ExcpetionsonaWindowsServer2008
1/A119
KONGSBERGK-Spice®
NameoftheOPCServerintheCongtable.
ThistableisfromtheoldC++versionoftheAbbItsComlink.
Figure108NameoftheOPCServerwhentheServerisrunningontheModelPC
Figure109RegistryleforaHIMAlink
File:PLCA.reg
Pleasenoticethatmanyscreenshotsinthisguidearemanipulated.Thepolicyhasbeen
todisguisetherealnamesandstructuresandtherealurls’softheDCSdatabases.Data
itemsfromaK-Spicedemoprojectarenormallyuntouched.Dataitemsnamesfrom
realprojectsarenormallymanipulated.
HIMA.PLCA.1and{AA8326BC-8FAA-8FAA-8FAA-8325832FB733}areboth
manipulations.TheformatisthesameastheformatfortherealHimadatabase.Usethe
functionalityBrowseOPCServersintheSimLinkGUItondtherealvalues.
1201/A
OPCDCOMconguration
6.2Checkthelocalsecuritypolicysettings
ThissectionisrstpartofaWikipagecalledOPCDCOMconguration
SeethesecondpartoftheWikipageinthenextsectionModifytheDCOMconguration
onpage122
ThefollowingsettingmaybeusedtoopenupOPCcommunications
GototheStartmenu→ControlPanel
OpenAdministrativeTools
OpenLocalSecurityPolicy
IndialogLocalSecurityPolicy:
BrowsetoSecuritySettings→LocalPolicies→SecurityOptions
IndialogLocalSecurityPolicy,pagePolicy
RightclickonDCOM:MachineAccessRestrictionsandselect→Properties
ClickonEditSecurity
IndialogAccesspermission:
AddAnonymous,Everyone,Interactive,Network,Systemwithalllocalandremote
permissionssettoAllow.
ClosethedialogwithOK
RightclickonDCOM:MachineLaunchRestrictionsandselect→Properties
ClickonEditSecurity
IndialogLaunchandActivationPermission:
AddAnonymous,Everyone,Interactive,Network,Systemwithalllocalandremote
permissionssettoAllow
ClosethedialogwithOK
RightclickonNetworkaccess:LetEveryonepermissionsapplytoanonymoususersand
select→Properties
IndialogNetworkaccess:LetEveryonepermissionsapplytoanonymoususers:
SelecttheEnabledradiobutton
ClosethedialogwithOK.
1/A121
KONGSBERGK-Spice®
6.3ModifytheDCOMconguration
ThissectionisthesecondpartofaWikipagecalledOPCDCOMconguration
SeetherstpartoftheWikipageintheprevioussectionCheckthelocalsecuritypolicy
settingsonpage121
ModifytheDCOMconguration.
GototheStartmenuandrundcomcnfg.exe:
InthebottomeldwiththetextSearchprogramesandlesenterdcomcnfgandenter .
ThiswillbringuptheComponentServicesbrowserwindow.
MycomputerProperties
IndialogComponentServices:
BrowsetoConsoleRoot→ComponentServices→Computers→MyComputer
RightclickonMyComputerandselect→Properties
InthedialogMyComputerProperties:
ThetabDefaultProperties
EnableDistributedCOMonthiscomputer
SetDefaultAuthenticationLeveltoConnect
SetDefaultImpersonationLeveltoIdentify
ThetabDefaultProtocols
Connection-orientatedTCP/IPshouldbetheonlyonelisted.
ThetabComSecurity
InframewithsubtitleAccessPermissions
ClickonEditDefault
IndialogAccessPermission:
AddAnonymous,Everyone,Interactive,Network,Systemwithalllocalandremote
permissionssettoAllow.
ClosethedialogwithOK
ClickonEditLimits
IndialogAccessPermission:
AddEveryonewithalllocalandremotepermissionssettoAllow.
ClosethedialogwithOK
InframewithsubtitleLaunchandActivationPermissions
ClickonEditDefault
IndialogLaunchandActivationPermission:
1221/A
OPCDCOMconguration
AddAnonymous,Everyone,Interactive,Network,Systemwithalllocalandremote
permissionssettoAllow.
ClosethedialogwithOK
ClickonEditLimits
IndialogAccessPermission:
AddEveryonewithlocalandremotepermissionsforbothlaunchandactivationset
toAllow.
ClosethedialogwithOK
OpcEnumProperties
IndialogComponentServices:
BrowsetoConsoleRoot→ComponentServices→Computers→MyComputer→DCOM
Cong
YoucanrighthandclickonDCOMCong→View→DetailsYouwillseetheobjectsin
alist,notobjecticons
Findtheicon/entryOpcEnum.RightclickonOpcEnumicon/entryandselect
→Properties
InthedialogOpcEnumProperties:
ThetabGeneral
SetAuthenticationlevelto→Default
ThetabLocation
SetRunapplicationonthiscomputerto→On
ThetabSecurity
SetLaunchandActivationPermissionsto→UseDefault
SetAccessPermissionsto→UseDefault
SetCongurationPermissionsto→Customize
ThetabSecurityintheframewiththesubtitleCongurationPermissions
ClickonEdit
IndialogChangeCongurationpermissions:
AddAnonymous,Everyone,Interactive,Network,Systemwithalllocalandremote
permissionssettoAllow.
ClosethedialogwithOK
ThetabIdentity
SetThesystemaccountto→On
1/A123
KONGSBERGK-Spice®
RSLinxProperties
RSLinxisthenameofaspecicOPCServer.DothiscongurationfortheactualOPC
Server.
YouwillndRSLinxonthesamepagethatyoufoundOpcEnumintheprevioussection.
Ifyoustartfromthetop,youwillndRSLinxhere:
IndialogComponentServices:
BrowsetoConsoleRoot→ComponentServices→Computers→MyComputer→DCOM
Cong
YoucanrighthandclickonDCOMCong→View→DetailsYouwillseetheobjectsin
alist,notobjecticons.
Findtheicon/entryRSLinx.RightclickontheRSLinxicon/entryandselect
→Properties
InthedialogRSLinxProperties:
ThetabGeneral
SetAuthenticationlevelto→Default
ThetabLocation
SetRunapplicationonthiscomputerto→On
ThetabSecurity
SetLaunchandActivationPermissionsto→UseDefault
SetAccessPermissionsto→UseDefault
SetCongurationPermissionsto→Customize
ThetabSecurityintheframewiththesubtitleCongurationPermissions
ClickonEdit
IndialogChangeCongurationpermissions:
AddAnonymous,Everyone,Interactive,Network,Systemwithalllocalandremote
permissionssettoAllow.
ClosethedialogwithOK
ThetabIdentity
SetThesystemaccountto→On
ClosethedialogwithOK
Note
Rebootthecomputer
1241/A
OPCDCOMconguration
6.4ODBCDataSourceAdministrator
Fortheoldlinks,thedirectoryfortheAccessdatabasemustbeaddedasacomputer
systemconguration.ThisisthecasefortheoldAbbItsComlink,andotheroldlinks.
Thiscongurationmustbemodied,ifnexttimeanotherlinkshallrunonthecomputer.
OnaWindows7machine,run:C:\Windows\SysWOW64\odbcad32.exe
Ona32bitmachine,run:C:\Windows\System32\odbcad32.exe
IndialogODBCDataSourceAdministratorbuttonAdd
IndialogCreateanewDataSource:select→MicrosoftAccessDriver(*.mdb,*.accdb)
andFinish
IndialogODBCMicrosoftAccessSetup:DataSourceName:AbbItsComandDatabase:
Select
IndialogSelectDatabasebrowseto
C:\K-Spice-Projects\Demo_ABB_CPP\TimeLines\OTS_ABB_CPP
\Applications\ABB\AbbItsCom.mdbExitwithOK
Figure110ODBCconguredtoreadtheAbbItsComdatabase
1/A125
KONGSBERGK-Spice®
7Variabletransfer
betweenDCSand
K-Spice
Thisischaptercoversthebasicdatatransferfunctionalityinthelinks.Notcovered
inthismanualareissueslikeTiming,Firewallghting,onewayversustwoway
communication,historicalvalues,IPaddresses,Handshakeprotocols,Portsandmore.
7.1DCSconnectionphilosophy
TheideaofconnectingaK-Spicedynamicsimulationmodeltoa“soft”controller
implementationofaDCSistostimulate(provideequivalentsignalrepresentations)the
systemsoitoperateslikeitisactuallyconnectedtoarealplant.Thissituationallows
themodeltorununderDCScontrolwithmodelvariablesbeingconnectedtotheeld
inputsandoutputsofthesystem.
TheDCSlinkshouldincludethefollowingfunctionality:
Conguringthefrequency(samplingrate)ofamodelvariable.
Conguringtheindividualtoleranceofavariabletodetermineiftherehasbeen
signicantchangesinthemodelthatrequiresthetransferofavariable.
MappingofvariablesbetweentheK-SpicemodelandK-Spice®.
Scalingofvariables.
SendingstaticvaluestoselectedDCSinputs.
Thecontrolsignalsrequiredtobemappedareusuallybetweentransmitters,valves,
electricmotors,localcontrolloopsandemulatedsequences.Thesafetysignalsfrom
K-Spice®arealsousuallyconnectedtoshutdowninputsonvalvesandelectricmotors.
Thebelowgureshowsasimplediagramdepictingtwocommonconnectionsbetweena
K-SpicemodelandaDCSsystem,wherethetransmittersignalinthemodelissentto
theDCScontrolfunctionblock.TheoutputoftheDCSfunctionblockshown,avalve
controlsignal,issentbacktothemodeltoregulatethecontrolvalve.
1261/A
VariabletransferbetweenDCSandK-Spice
Figure111AK-Spice/DCSinterface
AtypicalK-SpiceandDCSconnectionforasimplecontrolloop(I-1isatransmitterin
K-Spice).ThetransmittersignalissenttothefunctionblockintheexternalDCSsystem.
TheDCSsendsavalvecontrolsignalbacktoK-Spice.
7.2InterfacestotheDCSServers
TheK-SpicecommunicationwiththeDCSServerconsistsofdatatransfertwotypes.
Onetypeofdatatransferisgettingprocessdatafromthesystem,temperatures,pressures
etc.Theothertypeofdatatransferistwodirectional,sendingcommandslikeRun,
Pause,SaveConditions,LoadConditions.
ThedifferentDCSvendorsofferdifferentinterfacestotheirDCSdata.
OPC.Thisisastandardinterfaceforgettingprocessdata.Thisinterfacemayexistin
paralleltoapropritarystandardfortwodirectionaltransferofcommandsbetween
theDCSsystemandK-Spice
Propritaryinterfaces.
DCStoDCSlinks
TheSimLinkscanbesetuptogetdatafromoneDCSServer,andsendittoanother
DCSServer .Thisisusedwhentheprocesshastwodifferentcontrolsystemsthatcover
twodifferentsectionsoftheprocess.Intheactualsituationoneofthecontrolsystems
willnormallysenddataofsomekindtotheothercontrolsystem.Itcanbetransferof
processdataliketemperaturesetc.Link-to-linkistypicallyusedfordatabetweencontrol
systemstothelatencyofbringingittoamodeltagrst.Italsosavesonhavingto
createthosemodeltags.
ThisdatatransfercanbesimulatedwithaK-SpiceSimLinksendingdatafromonepart
ofthesimulatedprocess,toanotherpartofthesimulatedprocess.
1/A127
KONGSBERGK-Spice®
AutoswitchComutilizeslink-to-linktomanageautomaticallyswitchingbetween
historicaldataandcurrentdataforreal-timesystems.
7.3Modelvariablesubscriptions
ModelvariablesubscriptionsperformgeneraltaskscommontoallDCSconnections,
whichinclude:
organisingvaluestobeexchangedintogroupsaccordingtotransferdirection,value
typeandsamplerate(modelvariabletolerancerelated).
allowingeachgrouptobeconnectedtoadenedexternalsystem.
deninghandlingcharacteristics(foreachvaluewithinagroup)forthatparticular
variablebysettingvaluesonattributesassociatedwitheachvariable.
conveyingcommandsissuedinthesimulatortotheexternalDCSsoitispossibleto
actinsyncronisationwiththemodel(commandsincludeRun,Freeze,Change
Speed,SaveandLoadSnapshot).
Thegroupscontainingexchangevariablesforaparticularprocessmodelinstanceare
organisedinanAccessdatabase,whichisdenedinalatersection.
7.4DCSdriverfunctionality
TheDCSdriverforaparticularDCSisafunctionalblockwithadenedinterface
towardsthemodelvariablesubscriptionsandinternallogicimplementingthesystem
speciccommunicationtasks.
Thetaskssolvedbyadriverare:
Transfervaluesbetweentheexternalsystemandthemodel.Tagnamesusedto
identifyavalueintheexternalsystemarefoundasparametersintheentryfora
variableintheIOlist.
Ifapplicable,convertcommandsreceivedfromthemodelvariablesubscriptionsand
forwardthemtotheexternalsystem.Onceacommandhasnished,returntheproper
acknowledgementtothemodelvariablesubscription.
TheappropriatedriverforadenedexternalDCSsystemisaddedthroughtheAccess
databasebyselectingtheappropriateDCSlinkforthecontrolsystem.
7.5Packingandunpackingvariables
TheDCSdriverisalsoresponsibleforpackingandunpackingdataincaseswhere
multiple,individualmodelvariablesaresharingacommonDCSvariable(forexample,a
maskoflimitswitches.)
1281/A
TheCrossReferenceList
8TheCrossReferenceList
Scopeofthisguide
TheCrossReferenceListisessentialwhenthelinkisupandrunning.Onelineinthelist
hastwomainitems.OneitemisaDCSvalue.TheotheritemistheK-Spicedataitem
intheK-Spicesimulator.ThelinkwillreadtheDCSvalueandwritethevalueinthe
K-Spicedataitem.Orthereadandwriteistheotherwayround.
SettinguptheCrossReferenceListisoftendonewithqueriesandtablesinaseparate
Accessdatabase,suchprojectspecictablesandqueriesshouldnotbeenteredin
thelinkdatabaseitself.AftertheCrossReferenceListiscreated,theCrossReference
Listwillbecopiedintothelink’sAccessdatabase.Thenallistiscopiedtothetable
KSIM_XREF.
SettinguptheCrossReferenceListisoutsidescopeofthisguide.MakingaCross
ReferenceListisadifculttopictodocument.Muchoftheworkisbasedonexperience
andpersonalskills.Notmuchiswrittendown.
Note
ThetextinthisguideisbasedontheassumptionthattheCrossReferenceListalready
exists.
1/A129
KONGSBERGK-Spice®
8.1CreationoftheCrossReferencelist.
ThisguidewillnotcoverthecreationoftheCrossReferencelist.But4guresonthe
topicareshownbelow,asareferencetotheworkwiththelists.ThechaptercalledThe
AccessdatabasehaveexamplesofthetableKSIM_XREFfromdifferentlinktests.
SeeTheKSIM_XREFtable.Examplesonpage73
andCongurationoftheOpcDaComlinkinK-Spiceonpage100
Thefollowing4gures,areextractsofessentialpartsofthecreationoftheCross
Referencelist.
Importblockinstances
EachK-SpicesimulatorapplicationcontainsaBlockInstances.txtle.Thislecontains
alistofallthetagsintheapplication.
ClickontheImportBlockInstanselebutton.ThiswilllltheBlockModuletable
withvalidsimulatortags.
Figure112AnAccessformwiththebuttonImportBlockInstancele.inthedatabase
CrossReferenceList
1301/A
TheCrossReferenceList
ThetableItemConvert
ItemConvertisatableusedtomatchtheDCStagtotherelevantK-Spicetag.
TheDCS_Itemcolumnisahandmadelistoftextstringsthathavebeenextractedfrom
theDCSIOtags.TheDCS_V arcolumnisahandmadelistoftextstringsthatdenotethe
functionofthesignal.TheKsimTagcolumnisahandmadelistoftextstringsthatwillbe
usedbythescriptformatchingwithrelevantK-Spicetags.
Figure113TherstpartofthetableItemConvertinthedatabaseCrossReferenceList
1/A131
KONGSBERGK-Spice®
ThetableConnectRules
ConnectRulesisatableusedtoconverttheDCStagtotherelevantK-Spicetag.
TheModulecolumnisahandmadelistofK-Spicemodules.TheDCS_V arcolumnisa
handmadelistoftextstringsthatdenotethefunctionofthesignal.TheKsimDataItem
columnisahandmadelistofK-Spicemodulevariablesthatwillbeusedbythescriptfor
matchingtheDCSIOsignalwiththerelevantvariable.
Figure114ApartofthetableConnectRulesinthedatabaseCrossReferenceList
ACrossReferencelistforanOpcDaComlink
SeeCongurationoftheOpcDaComlinkinK-Spiceonpage100
ThisgureisfromthechapterMatrikonComdesktoptoolsintheDcsLinkGuidefor
OPClinks:
Figure115TheKSIM_XREFtableintheAccessdatabaseforaOpcDaComlink
1321/A
TheCrossReferenceList
8.2ItemConnections
ThelinkcongurationisnishedwhenanyiteminthelistofDCStagshasbeencoupled
toaK-SpicetaginthelistKSIM_XREF.
Thiswillbeconrmedinthelink’slogle.TherearenomorewarningsNotconnecting.
8.2.1SourceItemConnections(DCSloopback)
Youcongurethesourceofthedataby:
SpecifytheDCSconnectioninfoinItemNodeandItemName
ChecktheToSubServersetting
ChecktheSourceFlagsetting
LeaveKsimNameandKsimNodeblank
YoucongureaconnectionfromthesourceitemtoanotheriteminthesameDCS.
CongurethetargetitemwithItemNodeandItemName
ToSubServershouldbeunchecked
PutthefullItemNode/ItemNameasSourceItemName
LeaveKsimNameandKsimNodeblank
Figure116DcsLoopback
8.2.2DcsUnit
TheunitconversionisdonebytheModelServer.Ifitdoesn'tsupporttherequestedunit,
thereisawarningintheloglebutthesubscriptioncompletesandtheunconverted
valueisused.
Figure117Warningunitdoesnotexist
Link-to-Link(SimLink_XREF)doesnotcurrently(2013/07/03)supportunitconversion.
Note
Beginningwith2.10,theSimLinkwillnowissueanerrorforaninvalidunitanddisable
theDCSitem.
1/A133
KONGSBERGK-Spice®
8.2.3Attributes
ThissectiondescribesthecongurationoptionsfortheitemnamesinKSIM_XREFand
SimLink_XREF.Itappliestothefollowingelds:
KSIM_XREF.ItemName
SimLink_XREF.LocalName
SimLink_XREF.RemoteName
Itemnamescanincludeattributesformodifyingtheconnection.Theseattributes
appearimmediatelyafterthename(nospaces)withincurlybraces.Anitemmayhave
multipleattributesiftheyarecompatiblewitheachotherbyseparatingthemwitha;.
{A1;A2;A3}forexample
Figure118Itemnameswithattributes
8.2.4BinaryCopy
Syntax:BinaryCopy(ConversionType,NumberDcsElements)
Where:
ConversionTypeisthedesiredtypefortheconversion(ModelServerorotherSimLink).
Notethatthisisnotnecessarilythedatatypeofthetaginthepartner.Forexample,if
theDCSisstoringFloatvaluesinabufferofInt16values,youuseFloatasthe
ConversionTypeevenifyouareconnectingtoaDoubleinthepartnerapplication.
Validvaluesare:
Double
Float
Int32
NumberDcsElementsisthenumberofelementsrequiredintheDCStarget.
NumberDcsElements*sizeof(DCS-Type)shouldequalthe
sizeof(ConverstionType).
Forexample,connectionaFloattoanINTinSoftLogixComrequires2DCSElements.
Examples:
Int32Tag{BinaryCopy(Float,1)}
Thisconnectsa4-byteFloatfromthepartnertoa4-byteintegerintheDCS.
Int16Array[2]{BinaryCopy(Float,2)}
Thisconnectsa4-byteFloatto2elementsinaInt16arraybeginningatelement
#2.Thatis,thebinarycontentsofafloatarecopiedto/fromInt16Array[2]and
Int16Array[3].
1341/A
TheCrossReferenceList
Figure119Binarycopy
8.2.5BitAddressing
Thesyntaxforbitaddressis{.N[:S]}whereNisthestartingbitnumberandSis
thenumberofbits.
Bitsarenumberfrom0beginningwiththelow-orderbit.
Figure120Bitaddressing
{.1}indicatesthatthemodelisconnectingtoBit#1oftheItem.Thisitemwill
haveavalueof0or1.
{.2:2}indicatesthatthemodelisconnectingtoBits2and3.Thisitemwillhavea
valueof0-3.
8.2.6ItemconnectionQuality
Toconnecttothequalityassociatedwiththedata,usetheattributeQuality.Notall
SimLinksprovideaquality.SeeArethedataqualityagssupported?onpage163
Figure121Dataquality
1/A135
KONGSBERGK-Spice®
9Tipsandtroubleshooting
TheCrossReferencelist
TheCrossReferenceListisessentialwhenthelinkisupandrunning.Onelineinthelist
hastwomainitems.OneitemisaDCSvalue.TheotheritemistheK-Spicetagwhere
thisDCSvalueisreceivedintheK-Spicesimulator.SettinguptheCrossReference
ListisnormallydonewithqueriesandtablesinanAccessdatabase.AftertheCross
ReferenceListiscreated,itwillbecopiedintothelink’sAccessdatabase.Settingupthe
Crossreferencelistisnotdocumentedinthisguide.CreationofaCrossReferenceList
willbedocumentedlaterinaseparateguide.
9.1DOScommands
setu
Willdisplaytheuserandthedomain.
Figure122setu
ipcong/all
UsedtondtheIPaddressofthemachine.Thisisavirtualmachine10.0.0.3,on
atestnet.
1361/A
Tipsandtroubleshooting
Figure123ipcong/all
9.2SystemValues.
Thisisalistof"systemvalues"supportedbythe.NETSimLinksthatareavailable
forsubscription.
rwisreadfromtheSimLinkand/orwritetotheSimLink
Componentstatus
Table7Componentstatus
NameNotes
ComponentStatus.ExternalConnectedboolean
read
Version:2.5.0.15
1/A137
KONGSBERGK-Spice®
Table7Componentstatus(cont'd.)
booleantrueindicatestheDCSis
connected
ComponentStatus.LinkHealthGoodboolean
read
Version:2.9.3.0
booleantrueifLinkHealthisgood.
Incorporatesconnectionstatus,
watchdogstatusandotheritemssetby
speciclink
ComponentStatus.WatchdogAnyExpiredboolean
read
Version:2.9.3.0
booleantrueifanywatchdogis
currentlyexpired.Cangobacktofalse
ifamonitoredvaluechanges
Bucket
Table8Bucket
NameNotes
SimLink.Bucket.TestBoolboolean
read/write
Version:2.5.0.15
Bucketbooleanvalue
SimLink.Bucket.TestDoubledouble
read/write
Version:2.5.0.15
Bucketbooleanvalue
SimLink.Bucket.TestIntont
read/write
Version:2.5.0.15
Bucketbooleanvalue
1381/A
Tipsandtroubleshooting
ModelTime
OADatevaluesarecalculatedbyrstconvertingtheK-Spicetimetoadate/timeandthen
convertingthattoOADate.TheK-SpiceconversionusestheEpochStartconguration
foundinTheCongtable.Standardkeywordsonpage52
Table9ModelTime
NameNotes
ModelTime.Step.KSpicedouble
read
Version:2.9.5.0
Laststeptime(K-Spiceseconds)received
fromSimManager
ModelTime.Step.OADatedouble
read
Version:2.9.5.0
Laststeptime(OADate)receivedfrom
SimManager
ModelTime.SimLinkRun.KSpicedouble
read
Version:2.9.5.0
Laststeptime(K-Spiceseconds)
acknowledgedtoSimManager
ModelTime.SimLinkRun.OADatedouble
read
Version:2.9.5.0
Laststeptime(OADate)acknowledgedto
SimManager
Figure124SystemV alues.AnExample.
Inthisexample,theyarebeingsenttoDCSitems
1/A139
KONGSBERGK-Spice®
9.3DisableExplicitReadAfterConnect
Aftertestingforsomedayswehaveseenthatsomesignalsarenottransferedcorrectly
fromABBandintothelink/model.OneexampleisasignalsentfromABBwiththe
value255,lookingatthesameinthelink/modelshowsthevalueFALSE,noteven
anIntegerbutaBoolean.
Aftertryingtoputthetroublesignalsinit'sownUpdateRategroupitlooksbetter.But
moreandmoresignalsfailedandnewUpdateRategroupswereadded.Alltrouble
signalswereputinit'sowngroup.
Afteralotoftestingandcheckingafunctioninourlinkhandlingsomethingcalled
"ExplicitReadAfterConnect"wasdisabled,anditlooksliksthishavesolvedtheproblem.
Thisfunctionisdenedinacommondllforallthelinksandthereareobviouslysome
linkswhorequirethisfunction,butnottheABBlink.
1401/A
Tipsandtroubleshooting
9.4ChangingDateandTimesetting
Figure125TimeformatinTimelineproperties
Thelinkwassendingthedate01.01.1970toABBandthiscausedproblemswiththe
AlarmsontheABBside.WetriedtoacknowledgealarmsandthensaveIC,butafter
reloadofICthealarmswereunackedagain.
TheTimeformatwasthenchangedfromEngineeringtoDateAndTimetosolvethis.
RightclickandselectpropertiesontheTimelineEngineering.Onlypossibletochange
TimeformatwhentheTimelineisdeactivated.
1/A141
KONGSBERGK-Spice®
9.5Reconnectsupport
SimLinkssupportingReconnect
Table10Reconnect
NameVersion
OpcDaCom2.5.0.15
OpcHdaCom2.5.0.15
1421/A
Tipsandtroubleshooting
9.6K-SpicePIDControllerconnection
ConnectingOPCserveroutputtoK-SpicePIDControllerOutput
GotostartofmetadataInsomecaseswehavetosetvaluesofPIDcontrolleroutput
fromtheremotecontrolsystemviaOPCserver.Anexampleofsuchacaseiswhen
theK-Spicemodelisusedforoptimizationpurposebyconnectingittoanexternal
optimizerusinganOPCserver
InsuchacaseifwetrytoturntheK-SpicePIDcontrollerintomanualmodeand
writetothePIDControllerOutputfromtheOPCserver,itdoesnotallowitasthe
"ControllerOutput"isanOutputdataitemandtheinternalcodepreventsitfromgetting
writtenthroughanOPCservervalue.
Inordertomakethiswork,theuserneedstodothefollowing.
TheOPCserveroutputhastobemappedtoPIDController"ManualOutput"inthe
OpcDaComdatabase.
Figure126Pidcontrolleroutputtoconnectto
IntheK-Spicemodelweneedtosettheparameter"Optionsforuseofmanualoutput"
to"Usenotwriteback"
1/A143
KONGSBERGK-Spice®
Figure127PidControllerControlsetting
PleaserefertoOpcDaComsetupK-SpiceformoreinformationonOpcDaComlink
setup.
ThiscanalsobedonebysettingthecontrollertoComputermodeandconnecttheOPC
signaltoComputerOutputofthecontroller.
1441/A
Tipsandtroubleshooting
9.7PIIntegration
TheK-spicemodelwillcommunicatetothePIhistorianthroughanOPC:
Figure128DataowfromthePIdatabasetoK-Spice
Note
TheclientisresponsibletoensurethatthePIDatabaseisconguredinsuchawaysothe
valuesinPIaretruereectionsoftheprocessstateinreal-time.OPCinterface(orOPC
server)providedbyClientshouldhaveallrequesteddatatagscongured.Tagname
listtobeprovidedtoKongsbergtocongureOpcDaandOpcHdaComs.ThePIOPC
Interfacemustsupportconnectionfromexternalclients.
IfPIispopulatedbatch-wise,thenensurethatcompletesetispopulatedwithcorrect
timestamppartialupdatewillcreateinconsistenciesinthemodelwheresomedatais
realtimeandsome30minutesolderforexample.theK-SpicesimulatorassumesPIdata
isrealtimeandneedsacompletesetofconsistentdatatorunthesimulator.Seethe
gurebelow.
ThefollowingparametersarecongurableaspectsofthePIhistoricalbackll
service:
Figure129PIcongurationparameters
ThePIservershouldbesynchronizedbasedonUTCtime,thisisdonebyconguring
ascanclassinthePIOPCInterface.Thecorrectunitforeachmeasurementmustbe
providedintheHistorian.
1/A145
KONGSBERGK-Spice®
Itshouldbecheckedtoseeifitispossibletogetsomekindofstatussignal/timetag
fromPIshowingwhenthelastbatch-wiseupdatewasdoneinPI.KOGTrecommends
tocongurethisifpossible.(Thiswillbeusefulforusertoseewhichdatasetthe
modelisworkingwith)
IfadataqualitycodetagisavailableasanindependentOPCobject,itisrecommended
tocongurethisinPIsoitcanbetransferredtotheK-Spicemodel.
IftheK-Spicesimulatorshouldfollowrealtimedata(withsoftrealtimeconstraints),
therewillbeacertaindelaybetweenthedataaretransferredfromtheDCSandpopulated
intoPI.Ifthesimulatorisruninrealtimemodel,thelinkOpcDaCommustbecongured
torequestdataafterPIhascollectedthefullbatchoftags.Thiscanbedonebyincreasing
OpcDaComreadinginterval(From15to60se.g.).
K-Spicewillbeconguredtoreaddatawithagiventimestamp.Forthesystemthatwill
readdataonlineitisimportanttosetatimestampsufcientlyhightoallowtransferofa
fulldatabatchfromDCStoPIdatabase.ThedatapointsavailableinPImustreectthe
realprocesssignals,datalteringandaveragedvaluesshouldbehandledwithcare.
ForhistoricalrunsandofinecalibrationtheOpcHdaComisused.ThePIOPCinterface
shouldhaveOPCHDAserverforthistowork.
1461/A
Tipsandtroubleshooting
9.8RemotelyStartingControllers
InanOperatorTrainingSimulator(OTS)setting,itispreferabletotolaunchall
processesfromasingleinstructorstation.Thereareafewrequirementstolaunching
FCSandSCStestfunctionsremotely.Theusermusthavesufcientprivileges,the
instructionmustuseasuiteoftoolscalledPSTools,andtheYokogawamachinemust
sharethe$adminfolderwiththeinstructor.
Thersttaskistoensuretheinstructormachinehassufcientprivileges.Theaccount
mustbeanadministratorontheinstructormachineandeitherbeanadministratoron
theYokogawamachineortheusermusthaveaccesstoanadministrativeaccount.If
youdonotwanttheusertohaveadministrativeprivilegesontheYokogawamachine,
youcancreateatextdocumentwhichusesWindowsPowerShelltocreateanencrypted
stringthatcontainstheusernameandpasswordoftheaccountwithadministrative
privileges.Seealsotheguidetocreatingthetextdocumentwhichcontainsthesecure
accountpasswordunderTipsandtroubleshootinginsectionSavingCredentialsSecurely
onpage151.PlacetheleintheKongsbergdirectoryoftheYokogawamachinefor
usebythenalPowerShellscript.
Next,downloadthePSToolssuitefromtheMicrosoftwebsite:
http://technet.microsoft.com/en-us/sysinternals/bb897553
PlacetheseintheKongsbergfolderoftheinstructormachine.ThePSExecprogramis
whatwillallowyoutorunascriptonaremotemachine.Checkthewebformoredetails
onhowtousePSExecForthisprocedure,itiseasiesttocopy/pastethefollowingtext
intoabatchle(i.e.RunControllers.bat):
RunControllers.bat
D:
cdKongsberg
psexec\\computer[-uuser][-ppassword][-i[session][-w
directory]powershell[arguments]
Finally,youcanensurethattheYokogawamachineissharingthe$adminfolder.See
Sharingthe$Adminfolderonpage150Itrequiresyoutoedittheregistry
Aftercompletingthestepsabove,thetaskisassimpleasusingabatchscript
torunPSExec(i.e.RunControllers.bat)whichwillinturnrunabatch
script(i.eControllersBegin.bat)thatreferstoaPowershellscriptthat(i.e.
ControllersRunAs.ps1)containsinformationaboutthecredentialsandthenal
batchscript(FCSnSCS.bat)thatcontainsthecommandsthatwillrunthevarioustest
functions.
1/A147
KONGSBERGK-Spice®
1481/A
Tipsandtroubleshooting
9.9DataorganizationontheOPCserver
Thedataserverhasthreedivisions:
Server-Containsallofthegroupobjects
Group-MaintainsinformationaboutitselfandcontainsandorganizestheOPCitems
Item-Containsauniqueidentierheldwithinthegroup.Theidentieractsasa
referencefortheindividualdatasource,aswellasvalue,quality,andtimestamp
information.Thevalueisthedatafromthesource.Thequalitystatusgives
informationaboutthedevice.Thetimestampisthetimethatthedatawasretrieved
AnOPCapplicationaccessesallitemsthroughtheOPCgroupratherthanthroughthe
itemitself.Thegroupalsocontainsaspecicupdaterateforitself,whichtellstheserver
atwhatratetomakedatachangesavailabletotheOPCclient.Adeadbandspecicfor
eachgrouptellstheservertorejectvaluesiftheyhavechangedbylessthanaspecied
deadbandpercentage
Clientsoftwaredevelopersandusersoftheseapplicationshavegreaterexibilityin
implementingasolutionthatistailoredtotheirneedsbecausedataisorganizedinto
groupsandthenaming,ortagging,ofdatapointsisdeterminedbytheclientsoftware.
Groupingisbenecialindealingwithlargesetsofdatasourcesbecauseitprovides
greaterorganizationofthedataaswellaseasyreferencetosimilarsetsofdata.Inan
OPCapplication,ataggivesauniqueidentiertoanI/Opoint.BasedontheOPC
specication,theclientorserversoftwareisresponsiblefornamingtags.Thesoftware
canprogrammaticallynametagsorspecifythattheusernametags.Thisexibilityisa
signicantfactorintheabilityofclientsoftwaretoprovidesolutionsthataretailoredfor
high-channel-countapplications.
Clientsoftwarealsospeciestherateatwhichtheserversuppliesnewdatatotheclient.
Becausetheserverisresponsiblefordatapublication,theclientsoftwaredoesnotneed
toperformtime-consumingdatapolling,whichfreesupmoretimeforanalysisanddata
logging.Moreover,theclientsoftwareinsteadbecomesareactiveobjectthatwaitsfor
newdatatoarrive.Therefore,theclientbecomesevent-drivenandhandleslargesets
ofdatamuchmoreefciently.
Theclientalsospeciesdeadbandsontheserver,whichallowstheclienttodetermine
whichdataisimportantandthendisregarddatathatisinsignicant.Deadband
percentagesrejectvaluesthatdonotchangemorethanacertainpercentagefromthe
previousvaluerecorded.Byestablishingmoderatedeadbandvalues,theclientreceives
onlyinformationaboutchannelswhichtheclientdeemsessential.Thispreventsthe
clientfrombeingoodedwithsuperuousinformation.Inthisway,theclientcan
monitoramuchgreaternumberofchannels.
1/A149
KONGSBERGK-Spice®
9.10UseraccountsinWindows
9.10.1Sharingthe$Adminfolder
Accesstosomelesandprogramsarerequiredwhenperformingtasksacrossmultiple
servers,suchasremotelyrunningascriptorexecutableusingPSExec.Evenwhen
sufcientcredentialsareprovided,the$Adminfolderisnotshared.
1Openthestartmenu
2SearchforRegEdit.exe
3Opentheprogram,itmayaskforelevatedprivileges.
4Onceintheregistry,locatethefollowingdirectory:
HKLocalMachine\Software\Microsoft\Windows
\CurrentVersion\Policies\System
5CreateanewDWordcalledLocalAccountTokenFilterPolicy.
6Double-clickonthenewlycreatedDWordtoedititsproperties
7Enteravalueof1(Hexadecimal)
8ClickOKandexitRegEdit
Figure130RegistrysettingLocalAccountTokenFilterPolicy
Forfurtherinformation,pleaseseethisarticle:fromwhichallinformationwastaken.
1501/A
Tipsandtroubleshooting
9.10.2SavingCredentialsSecurely
VariousWindowstasksrequireadministrativeprivilegesbutthereareinstancewhen
theusermaynothaveaccesstoasufcientaccount.Itispossibletoautomatesome
proceduresusingasavedcredentialensuringthatalluserscanperformrequiredtasks
withoutexposingthepassword.
CreatingtheSecureString
TheencryptedpasswordmustbesavedonthedesiredserverorPC.Itcannotbecreated
onadifferentmachineandthentransferredtoanotherserverorPC.
OpenPowershellasanAdministrator
Pleasenote,thismeansusingtheRunasAdministratoroption,openingPowershell
whenloggedinasanadministratorisnotsufcient.
Copy/Pastethefollowingcommand:
read-host-assecurestring|convertfrom-securestring|out-file
D:\Kongsberg\securestring.txt
Youmaychangethesavedirectoryinthenalpartofthecommand
Enterthepasswordthatyouwouldliketosave.
Thetextwillappearasasterisks
AfterpressingEnter,thereshouldbeanewtextlecalledsecurestring.txt
WhencreatingaPowerShellscript(*.ps1),youcanusethefollowingvariablestostore
credentials:
$username="domain01\admin01"
$password=catD:\Kongsberg\securestring.txt|
convertto-securestring
$cred=new-object-typename
System.Management.Automation.PSCredential-argumentlist
$username,$password
Usingthe-credentialargumentalongwiththenewlycreated$credvariableshould
allowascripttorunwithsufcientprivilegeswithoutpromptforapassword.Besureto
changethesecurestring.txtdirectoryifitwasnotsavedinD:\Kongsberg
Exampleoftheuseofaleforcredentials
Thefollowingexampleshowstheuseofthe"securestring.txt"leforcredentialswhen
tryingtousetheRestart-Computercmdletonaremotecomputer.
RestartModel.ps1
$username="Kongsberg\admin"
$password=catD:\Kongsberg\securestring.txt|
convertto-securestring
1/A151
KONGSBERGK-Spice®
$cred=new-object-typename
System.Management.Automation.PSCredential-argumentlist
$username,$password
Restart-Computer-computerBGFOTS1MDL01-credential$cred-force
1521/A
Tipsandtroubleshooting
9.11SQLtipsandtricks
9.11.1CreatingaSQLqueryintheSimLinkdatabase.
WiththeSimLinkdatabaseopeninAccess,clickontheMainMenuCreateandthen
thebuttonQueryDesign.
Figure131Createanewquery
WhentheQuery1editordisplaystheShowTabledialog.ClickClose
Figure132TheQuery1editor
RightclickontheQuery1tabandthenclickonSQLView.
1/A153
KONGSBERGK-Spice®
Figure133Query1SQLView
YourQuery1editscreenshouldlooklikethis:
Figure134Thequery1editscreen
YoucantypeinthedesiredSQLstatement.
9.11.2RunningQuery
PresstheRunbuttontoruntheSQLquery.
Figure135Runthequery
1541/A
Tipsandtroubleshooting
9.11.3Clearconnectedonallitems
UPDATEKSIM_XREFSETConnected=0
9.11.4Setconnectedforallitems
Yes/Novalues(booleans)inAccesstypicallyhaveavalueof0or-1.
UPDATEKSIM_XREFSETConnected=-1;
9.11.5Clearconnectedforaparticularitemnode
NoticethattheItemNodenameisinsinglequotes
UPDATEKSIM_XREFSETConnected=0WHERE
ItemNode='SIM1_AA_AA2/VRR_Train_1';
9.11.6FindingDuplicatesinKsimName
UseQueryWizardfromCreateMenutondduplicatesinKsimName.Thiscanbeuseful
tondtwosignalsconnectedtovalvecontrolsignalinputoramotorstart/stopsignal.
Figure136SelecttableinFindduplicatesquerywizard
1/A155
KONGSBERGK-Spice®
Figure137SelecteldinFindduplicatesquerywizard
Continuewithnexttoaddanymoreeldswiththeduplicatedata.Thiswillgeneratea
tablewithduplicatevaluesinKsimName.
1561/A
Tipsandtroubleshooting
9.12BasicTerminology
ShortexplanationsofthebasicconceptsinDCSinterfacing
9.12.1DCS
DistributedControlSystem
DistributedControlSystemisacomputerizedcontrolsystemusedtocontrolthe
productionlineintheindustryTheentiresystemofcontrollersisconnectedbynetworks
forcommunicationandmonitoring.Theentiresystemofcontrollersisconnectedby
networksforcommunicationandmonitoring.
9.12.2OPC
OPC=OLEforProcessControl
OPCisasoftwareinterfacestandardthatallowsWindowsprogramsto
communicatewithindustrialhardwaredevices.
OPCwasdesignedtoprovideacommonbridgeforWindowsbasedsoftwareapplications
andprocesscontrolhardware.Standardsdeneconsistentmethodsofaccessingeld
datafromplantoordevices.
OPCisimplementedinserver/clientpairs.TheOPCserverisasoftwareprogramthat
convertsthehardwarecommunicationprotocolusedbyaPLCintotheOPCprotocol.
TheOPCclientsoftwareisanyprogramthatneedstoconnecttothehardware,suchas
anHMI.TheOPCclientusestheOPCservertogetdatafromorsendcommandsto
thehardware.
OPCisdesignedtobeanabstractionlayerbetweenindustrialnetworksandproprietary
PLCdrivers.TheOPCstandardspeciesthebehaviorthattheinterfacesareexpected
toprovidetotheirclients;andtheclientsreceivethedatafromtheinterfacesusing
standardfunctioncallsandmethods.Consequently,aslongasacomputeranalysis
ordataacquisitionprogramcontainsanOPCclientprotocol,andanindustrialdevice
driverhasanassociatedOPCinterface,theprogramcancommunicatewiththedevice.
Thespecicationalsoincludesaprotocolforworkingwithdatacontrolsystemsand
applicationdatabases,aswellasonlinedataaccess,alarmandeventhandling,and
historicaldataaccessforallofthesedatasources.
1/A157
KONGSBERGK-Spice®
OPCDataAccess
OPCDAisapartoftheOPCstandardthathandlesrealtimedata.Otherpartsofthe
OPCstandardhandleshistoricaldataandalarmsandevents.Therearethreeattributes
associatedwithOPCDA.Theseare(1)avalue,(2)thequalityofthevalue,and(3)
atimestamp.TheOPCDAspecicationstatesthatthesethreeattributeshavetobe
returnedtoanOPCclientmakingarequest.Therefore,ifthedatasourceisnotcapable
ofprovidingatimestamp,forexample,theOPCDAservermustcreateatimestamp.
OPCHistoricalData
InadditiontotheOPCDAspecication,theOPCFoundationalsomaintainstheOPC
HDA(HistoricalDataAcscess)specication.Incontrasttotherealtimedatathatis
accessiblewithOPCDA,OPCHDAallowsaccessandretrievalofarchiveddata.
OPCAlarmandEventhandling
TheOPCserveralsoprovidesalarmandeventhandlingtoclients.Withinaserver,
analarmisanabnormalconditionofspecialsignicancetotheclient-acondition
associatedwiththestateoftheserver,agrouporanitemwithintheserver.Forexample,
ifadatasourcevaluethatrepresentsthereal-worldtemperatureofamixerdropsbelowa
certaintemperature,theOPCserverwillsendanalarmtotheapplication,sothatthe
applicationwillproperlyhandlethelowtemperature.Eventsaredetectableoccurrences
thatareimportanttotheserverandclient,suchassystemerrors,systemconguration
changes,andoperatoractions.
1581/A
Tipsandtroubleshooting
9.12.3OLEandCOM
OPC=OLEforProcessControl
OLE=ObjectLinkingandEmbedding
COM=ComponentObjectModel
OLE
Objectlinkingandembedding(OLE)isaMicrosofttechnologythatfacilitatesthe
sharingofapplicationdataandobjectswrittenindifferentformatsfrommultiplesources.
Linkingestablishesaconnectionbetweentwoobjects.OLEisadenedstandardforthe
interfacebetweentheclientandtheserver.Theserverhasasetofroutinesitwillanswer.
Theclientusestheseroutinestogetdatafromtheserver.OLEisapartofmoregeneral
standardforinterprocesscommunication,calledComponentObjectModel,COM,.
9.12.4DCOM
DistributedComponentObjectModelisaproprietaryMicrosofttechnologyfor
communicationamongsoftwarecomponentsdistributedacrossnetworkedcomputers.
DCOM,whichoriginallywascalled"NetworkOLE",extendsMicrosoft'sCOM,and
providesthecommunicationsubstrateunderMicrosoft'sCOM+applicationserver
infrastructure.
9.12.5PLCandPAC
ProgrammableLogicControllersandProgrammableAutomationControllers
Mostsuppliersofindustrialdataacquisitionandcontroldevices,suchasProgrammable
LogicControllers(PLCs)andProgrammableAutomationControllers(PACs),are
designedtoworkwiththeOPCFoundationstandard.
9.12.6Sockets
Twoapplicatonsthatinterchangedata,usesockets,alsocalledports,tosetup
thecommunication.
Asocketisaphysical,existingareainsideacomputer.Theapplicationthatsenddata
willsetupelectricalsignalsonadenedsocket.Theapplicationthatreadsdatawill
listenforelectricalsignalsonthesamesocket.Thetwoapplicationssharethesocket.
Otherapplicationscannotaccessthesocket.Thesocketisalsoreferredtoastheport
numberusedforwriteorread.Fortwowaycommunication,anothersocketisassigned
forsignalsgoingintheotherdirection.Ifthesignaliscomingfromanothermachine,the
electricalsignalistransferredviawirestoasocketinthemachinethathasanapplication
thatreadthedata.ThestandardforInternetcommunicationfromsocketononemachine
1/A159
KONGSBERGK-Spice®
tosocketonanothermachine,isTCP/IP .OPCdoesnotuseTCP/IP.Adirectconnection
isestablishedbetweentheOPCserverandtheOPCclient.Dataistransferredwith
standardnetworkprotocols.ThecommunicationisbasedontheOPCstandards.
TheK-Spiceapplicationsandsockets
ThedifferentK-Spiceapplicationscommunicateviasockets.TheSimulationManager
willlistenforlogonrequestsfromanyapplicationonsocket16000.IfSimExplorer
isstartedwithInstance2,SimExplorerwillsendalogonrequesttotheSimulation
Manager.ThenSimExplorerwilllistenforlogonacceptfromtheSimulationManageron
port16202.IfSimExplorerisstartedwithInstance3,SimExplorerwilllistenforlogon
acceptfromtheSimulationManageronport16203.IftwoinstancesofSimExplorer
isrunningonthesamemachine,theymustlistenontwodifferentsockets.Thetwo
instancesofSimExplorermustbestartedwithtwodifferentinstancenumbers.
9.12.7SCADA
Supervisorycontrolanddataacquisition
ThetermSCADAusuallyreferstocentralizedsystemswhichmonitorandcontrolentire
sites,orcomplexesofsystemsspreadoutoverlargeareas(anythingfromanindustrial
planttoanation).MostcontrolactionsareperformedautomaticallybyRTUsorby
PLCs.Hostcontrolfunctionsareusuallyrestrictedtobasicoverridingorsupervisory
levelintervention.Forexample,aPLCmaycontroltheowofcoolingwaterthrough
partofanindustrialprocess,buttheSCADAsystemmayallowoperatorstochange
thesetpointsfortheow,andenablealarmconditions,suchaslossofowandhigh
temperature,tobedisplayedandrecorded.Thefeedbackcontrollooppassesthroughthe
RTUorPLC,whiletheSCADAsystemmonitorstheoverallperformanceoftheloop
1601/A
Tipsandtroubleshooting
9.13FAQs
9.13.1FAQsaboutallSimLinks
Doesitrun/hasitbeentestedonWindows7?
Yes
Arethereanysoftwareenvironmentrestrictions?
SimLinkshavethesameinstallationandOSrequirementsastherestofK-Spice.
Howisthecrossreferencingdone-isthisadatabase,spreadsheet,atle?
SimLinksuseanAccessdatabasetostorecongurationinformation
Canwehavedifferenttaggroupsrunningatdifferentupdatetimes?
Yes
Doesitsupportunitsconversionbothwaysordotheunitsneedtobeconsistent?
SimLinkssupportunitconversionbetweenalinkandaModelServer.Unitconversion
betweenlinks(Link-to-Link)isnotsupportedasof2.8
Beginningwith2.10,theSimLinkwillnowissueanerrorforaninvalidunitanddisable
theDCSitem.
ArethereoptionsonlinkstartforsynchronisingthemodeltagswiththeDCStags?
Therearenouseroptionsforsynchronisingdata.Whenaconditionleorsnapshotis
loaded,allitemssendtheirdatatoanysubscriber.
CanweeditthetaglistdynamicallyordoesthisneedaKSpicerestart?
Dynamically,butyoushouldunderstandtheimpact
IftheSimLinkhasbeenstartedasaninteractiveprocess,thereisaoptiontoReload
Database.ThisoptiondisconnectsfromtheDCSandthenreconnectsinordertouse
anyupdatedcongurationinformationinthedatabase.IftheSimLinkisforaDCSwith
apersistentinstance(SoftLogixCom,OpcDaCom),thenthereshouldbenoimpact
fromthereload.
However,iftheSimLinkisforaDCSthatisstartedbytheconnection(ProSimCom),
thenafreshinstanceoftheDCSiscreated.Thisinstancemaynothaveanyvaluesfrom
aconditionleloadorfromtheresultsofrecentmodelexecution.
DoestheSimLinkrunasaseparateprocessoristhisintegratedintomodel
server/simulationmanager?
EachinstanceofaSimLinkisaseparateprocessthatcanberunonthesamemachine
asthemodeloronadifferentmachine.
1/A161
KONGSBERGK-Spice®
Isthecommunicationstasksynchronizedwiththemodelexecution?
Asaseparateprocess,DCScommunicationdoesnotblockModelServerexecution.
SimManagerdoesensurethattimingremainssynchronizedamongallKSpice
applications.Thatis,SimManagerwillnotallowthemodeltotakeanotherstepuntilall
application(SimLinks,ModelServer,etc)acknowledgecompletionofthemodelstep.
(KSpicedoessupportacongurationforhowmanystepsmaybepending.)
IftheSimLinkrunsasaseparateprocess,canthisbeputonadifferentcore?
Yes,but...
Unlessyou'veseenaperformancewhitepaperorKongsberghasconductedextensive
testing,it'srecommendedthatyoudonotassignapplicationstospeciccores.Microsoft
hasspentthousandsofhoursoptimizingtheoperatingsystemforautomaticassignment.
Ifthecommunicationstaskissynchronised,willdelayedDCSresponseslowdown
themodelexecutionspeed?
Asaseparateprocess,datacommunicationwiththeDCSdoesnotblockmodel
execution.IftheSimLinkactivelyusesDCStimingtoacknowledgestepsbackto
SimManager,thenadelayedresponsefortimingwillslowdownmodelexecutionspeed.
LinksthatactivelymonitorDCStimingincludeProSimComandHimaCom.
IsitpossibletomeasuretheDCSresponsetime?
Currentlythereisnodiagnostictodothis.
Whatdiagnosticsareavailableineventthatwegetproblemswiththelink?Are
theseaccessiblewithinthemodel?
TheSimLinkhasLog,WatchandStatustabsthatcanbeusedtomonitorsomeaspectsof
SimLink.ForadditionaldiagnosticsSeeTheDiagnosticstableonpage60.
Otherthanlinkstatus,SimExplorerhasnodiagnosticsforaSimLink.Amodelcan
subscribetosystemvaluesdescribedinSystemV alues.onpage137andcongure
watchdogsaccordingtoTheWatchdogItemstable.onpage80
Doesthelinkautomaticallyreconnectafteradisconnection?Ifsowillit
automaticallypollalltagsafterareconnection?
SeealsoReconnectsupportonpage142
1621/A
Tipsandtroubleshooting
9.13.2FAQsaboutOPCDAbasedSimLinks
Whatdatatypesaresupported
Integer
Boolean
FloatingPoint
String
Arethedataqualityagssupported?
Yes.YoumaysubscribetothequalityagcomingfromtheOPCserver.Seealsothe
qualitysectioninItemconnectionQualityonpage135
Dothesystemsneedtobeinthesamedomain/Workgroup?Woulditbeadvisable
touseatunnellertopreventproblemshavingtosetupDCOM?
PreferredinstallationisOpcDaComisonthesamemachineasOPCServeryouare
connectingto.ThisallowsOpcDaComtoactastheOPCtunnellerforK-Spice.Ifthis
isnotfeasible,theprojectwillneedtogureoutDCOMsecurityissuesorpurchasea
tunneller.
Doesitsupportexceptionbasedupdatesorarealltagspolled?
Exceptionbased
9.13.3FAQsaboutOpcDaCom
Howisclient/serverfunctionalityhandled?Weneedonlyclientsupport.Isthis
thedefault?
Thisisclientonly
1/A163
KONGSBERGK-Spice®
10Switchoverfunctionality
InK-Spice,commonmodulesthatreceivesignalsfromtheDCShavethefunctionality
toswitchoverfromlocalcontrol(i.e.,controllersinternalinK-Spice)toremotecontrol
(signalsfromtheDCS).Thisswitchoverfunctionalityiseasilyaccessedbyleft-clicking
onasymbolinK-Spiceandbringingupthedefaultfaceplatethatcontainstheseswitches.
10.1DCSconnectionphilosophy
TheideaofconnectingaK-Spicedynamicsimulationmodeltoa“soft”controller
implementationofaDCSistostimulate(provideequivalentsignalrepresentations)the
systemsoitoperateslikeitisactuallyconnectedtoarealplant.Thissituationallows
themodeltorununderDCScontrolwithmodelvariablesbeingconnectedtotheeld
inputsandoutputsofthesystem.
TheDCSlinkshouldincludethefollowingfunctionality:
1Conguringthefrequency(samplingrate)ofamodelvariable.
2Conguringtheindividualtoleranceofavariabletodetermineiftherehasbeen
signicantchangesinthemodelthatrequiresthetransferofavariable.
3MappingofvariablesbetweentheK-SpicemodelandDCSLinks.
4Scalingofvariables.
5SendingstaticvaluestoselectedDCSinputs.
Thecontrolsignalsrequiredtobemappedareusuallybetweentransmitters,valves,
electricmotors,localcontrolloopsandemulatedsequences.Thesafetysignalsfrom
DCSLinksarealsousuallyconnectedtoshutdowninputsonvalvesandelectricmotors.
Thebelowgureshowsasimplediagramdepictingtwocommonconnectionsbetweena
K-SpicemodelandaDCSsystem,wherethetransmittersignalinthemodelissentto
theDCScontrolfunctionblock.TheoutputoftheDCSfunctionblockshown,avalve
controlsignal,issentbacktothemodeltoregulatethecontrolvalve.
1641/A
Switchoverfunctionality
10.2DCSconnectivityrequirements
ConnectingtocontrollersviaObjectLinkingandEmbeddingforProcessControl(OPC)
supportsthefollowingcommands:
1
2Run
3Freeze
4StepI.e.,steponetimestep,notnecessaryformostsystems
5Loadsnapshot/initialcondition
6Savesnapshot
7SettimeI.e.,ifK-Spiceneedstosynchronizewithanexternalclock
AllthecommandsarereservedOPCcommandswithinK-Spice.Iftheexternalsystem
doesnotsupportthesecommandsviaOPC,thecommandscanbesent‘outside’theOPC
link.TheexternalsoftcontrollerswillalsoneedtoSetandGetmodelvariables.
Note
NotalllinksuseOPC
10.3CommonDCSinterfacingmodules
K-SpicemoduleswhichcommonlyhaveDCSI/O:
Table11TheCommonDCSinterfacemoduletable
ModuletoDCSfromDCS
FieldTransmitterMeasuredValue
ControlSignalOut
ControlValveIsDenedOpen
IsDenedClosed
ValveStemPosition
RemoteControlSignalIn
MotorOperatedValveIsDenedOpen
IsDenedClosed
ValveStemPosition
RemoteOpen
RemoteClose
RemoteStop
PulseControlledValveIsDenedOpen
IsDenedClosed
ValveStemPosition
RemoteSetOpen
RemoteSetClosed
TrueClosesValveIsDenedOpen
IsDenedClosed
ValveStemPosition
RemoteOffOn
TrueOpensValveIsDenedOpen
IsDenedClosed
ValveStemPosition
RemoteOnOff
PulseControlledAsynchronousMachineMachineStatusRemoteControlSignalIn
RemoteSetOn
RemoteSetOff
1/A165
KONGSBERGK-Spice®
Table11TheCommonDCSinterfacemoduletable(cont'd.)
ModuletoDCSfromDCS
TrueStartsAsynchronousMachineMachineStatusRemoteOnOff
RemoteControlSignalIn
TrueStopsAsynchronousMachineMachineStatusRemoteOffOn
RemoteControlSignalIn
DcsPidControllerDcsMode
DcsSetpoint
DcsOutput
1661/A
Switchoverfunctionality
10.4BasicDCSCongurations
HerearekeywordcongurationsforDCSusedinK-Spice:
Figure138Abasiccontrolloop
ForcongurationbringupthefaceplatefortheControlV alve(20FV01),theController
(20FIC02)andtheDCSController(20FIC02dcs).
1/A167
KONGSBERGK-Spice®
Figure139Acascadecontrolconguration
ForcongurationbringupthefaceplateforthePulseControlledAsynchronousMachine
(20MA03),theMasterController(20LIC103),theslavecontroller(20FIC03),theDCS
MasterController(20LIC03dcs)andtheDCSSlaveController(20FIC03dcs).
1681/A
Switchoverfunctionality
Figure140Asplitrangecontrolconguration
ForcongurationbringupthefaceplatefortheMasterControlV alve(20PV01A),
theSlaveControlV alve(20PV01B),theSplitRangeRelay(20PY01),theController
(20PIC103)andtheDCSController(20PIC103dcs).
1/A169
KONGSBERGK-Spice®
10.5Typicalswitchoverprocedure
Whentheprocessmodelisrstbuilt,simplecontrollogicisimplementedtokeepthe
modelstablewhennotconnectedtotheDCS.WhenconnectingtoaDCS,rstallthe
I/Ovariablemappingsarecompleted,i.e.,matchingtheDCStagstotheprocessmodel
variables.
Usingacontrolvalveasanexample,toswitchoverthevalvetoremoteDCScontrol,
openthevalve’sfaceplateandselecttheremoteradiobutton,asshowninthebelow
gure.IftheDCSconnectionissuccessful,thevalvewillfollowtheDCSsignalbeing
senttothatvalve.
Figure141AK-Spicevalvefaceplatewithswitchingoptions
K-Spicevalvefaceplatewithlocal,remoteandmanualsignalswitchingoptions
highlighted.
1701/A
KONGSBERGK-Spice®
1711/A
©2014KongsbergOil&GasTechnologiesAS

Navigation menu