Skip to content

Commit

Permalink
Merge pull request #62 from ghalym/master
Browse files Browse the repository at this point in the history
ENH: Adding TwinCAT AppInfo that includes more diagnositcs records.
  • Loading branch information
klauer authored Sep 18, 2020
2 parents f9978a2 + 294c224 commit 0874c45
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/Db/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ DB += EthercatMCslit_hard.template
DB += EthercatMCslit_soft.template
DB += caPutLog.db
DB += TwinCAT_TaskInfo.db
DB += TwinCAT_AppInfo.db

DB_INSTALLS += $(IOCADMIN)/db/iocSoft.db
DB_INSTALLS += $(IOCADMIN)/db/devIocInfo.db
Expand Down
122 changes: 122 additions & 0 deletions app/Db/TwinCAT_AppInfo.db
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
record(longin,"$(PREFIX):AppInfo:TaskCnt"){
field(PINI, "1")
field(TSE, -2)
field(DTYP, "asynInt32")
field(INP, "@asyn($(PORT),0,1)ADSPORT=851/TwinCAT_SystemInfoVarList._AppInfo.TaskCnt?")
field(SCAN,"I/O Intr")
info(archive, "monitor 1: VAL")
}

record(longin,"$(PREFIX):AppInfo:OnlineChangeCnt"){
field(PINI, "1")
field(TSE, -2)
field(DTYP, "asynInt32")
field(INP, "@asyn($(PORT),0,1)ADSPORT=851/TwinCAT_SystemInfoVarList._AppInfo.OnlineChangeCnt?")
field(SCAN,"I/O Intr")
info(archive, "monitor 1: VAL")
}

record(longin,"$(PREFIX):AppInfo:Flags"){
field(PINI, "1")
field(TSE, -2)
field(DTYP, "asynInt32")
field(INP, "@asyn($(PORT),0,1)ADSPORT=851/TwinCAT_SystemInfoVarList._AppInfo.Flags?")
field(SCAN,"I/O Intr")
info(archive, "monitor 1: VAL")
}

record(longin,"$(PREFIX):AppInfo:AdsPort"){
field(DTYP, "asynInt32")
field(INP, "@asyn($(PORT),0,1)ADSPORT=851/TwinCAT_SystemInfoVarList._AppInfo.AdsPort?")
field(SCAN,"I/O Intr")
info(archive, "monitor 1: VAL")
}

record(bi,"$(PREFIX)AppInfo:BootDataLoaded"){
field(PINI, "1")
field(TSE, -2)
field(DTYP, "asynInt32")
field(INP, "@asyn($(PORT),0,1)ADSPORT=851/TwinCAT_SystemInfoVarList._AppInfo.BootDataLoaded?")
field(SCAN,"I/O Intr")
field(ZNAME,"FALSE")
field(ONAM,"TRUE")
info(archive, "monitor 1: VAL")
}

record(bi,"$(PREFIX):AppInfo:OldBootData"){
field(PINI, "1")
field(TSE, -2)
field(DTYP, "asynInt32")
field(INP, "@asyn($(PORT),0,1)ADSPORT=851/TwinCAT_SystemInfoVarList._AppInfo.OldBootData?")
field(SCAN,"I/O Intr")
field(ZNAME,"FALSE")
field(ONAM,"TRUE")
info(archive, "monitor 1: VAL")
}

record(bi,"$(PREFIX):AppInfo:KeepOutputsOnBP"){
field(PINI, "1")
field(TSE, -2)
field(DTYP, "asynInt32")
field(INP, "@asyn($(PORT),0,1)ADSPORT=851/TwinCAT_SystemInfoVarList._AppInfo.KeepOutputsOnBP?")
field(ZNAME,"FALSE")
field(ONAM,"TRUE")
field(SCAN,"I/O Intr")
info(archive, "monitor 1: VAL")
}

record(bi,"$(PREFIX):AppInfo:ShutdownInProgress"){
field(PINI, "1")
field(TSE, -2)
field(DTYP, "asynInt32")
field(INP, "@asyn($(PORT),0,1)ADSPORT=851/TwinCAT_SystemInfoVarList._AppInfo.ShutdownInProgress?")
field(ZNAME,"FALSE")
field(ONAM,"TRUE")
field(SCAN,"I/O Intr")
info(archive, "monitor 1: VAL")
}

record(bi,"$(PREFIX):AppInfo:LicensesPending"){
field(PINI, "1")
field(TSE, -2)
field(DTYP, "asynInt32")
field(INP, "@asyn($(PORT),0,1)ADSPORT=851/TwinCAT_SystemInfoVarList._AppInfo.LicensesPending?")
field(ZNAME,"FALSE")
field(ONAM,"TRUE")
field(SCAN,"I/O Intr")
info(archive, "monitor 1: VAL")
}

record(bi,"$(PREFIX):AppInfo:BSODOccured"){
field(PINI, "1")
field(TSE, -2)
field(DTYP, "asynInt32")
field(INP, "@asyn($(PORT),0,1)ADSPORT=851/TwinCAT_SystemInfoVarList._AppInfo.BSODOccured?")
field(ZNAME,"FALSE")
field(ONAM,"TRUE")
field(SCAN,"I/O Intr")
info(archive, "monitor 1: VAL")
}


record(waveform,"$(PREFIX):AppInfo:AppName"){
field(PINI, "1")
field(TSE, -2)
field(DTYP, "asynInt8ArrayIn")
field(INP, "@asyn($(PORT),0,1)ADSPORT=851/TwinCAT_SystemInfoVarList._AppInfo.AppName?")
field(NELM,63)
field(SCAN,"I/O Intr")
field(FTVL,"CHAR")
info(archive, "monitor 1: VAL")
}

record(waveform,"$(PREFIX):AppInfo:ProjectName"){
field(PINI, "1")
field(TSE, -2)
field(DTYP, "asynInt8ArrayIn")
field(INP, "@asyn($(PORT),0,1)ADSPORT=851/TwinCAT_SystemInfoVarList._AppInfo.ProjectName?")
field(NELM,63)
field(SCAN,"I/O Intr")
field(FTVL,"CHAR")
info(archive, "monitor 1: VAL")
}
1 change: 1 addition & 0 deletions iocBoot/templates/st.cmd.template
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ dbLoadRecords("caPutLog.db", "IOC=${IOC}")

## TwinCat System Databse files ##
dbLoadRecords("TwinCAT_TaskInfo.db", "PORT={{ asyn_port }}, PREFIX={{prefix}}")
dbLoadRecords("TwinCAT_AppInfo.db", "PORT={{ asyn_port }}, PREFIX={{prefix}}")

cd "$(IOC_TOP)"

Expand Down

0 comments on commit 0874c45

Please sign in to comment.