Export translations
Views
Special page
From OpenSCADAWiki
Jump to:
navigation
,
search
Settings
Group
About
Documents
Documents/API
Documents/DAQ
Documents/FAQ
Documents/How to
Documents/How to/Build from source
Documents/How to/Crash report
Documents/How to/Create module
Documents/How to/Create multi language project
Documents/How to/Cyclic programming
Documents/How to/Debug
Documents/How to/Install
Documents/How to/Live disk
Documents/How to/Release
Documents/How to/Transferring project configuration
Documents/How to/Violations, alarms and notifications
Documents/Program manual
Documents/Quick start
Documents/Release 0.8.0
Documents/Release 0.8.0/Update10
Documents/Release 0.8.0/Update11
Documents/Release 0.8.0/Update12
Documents/Release 0.8.0/Update13
Documents/Release 0.8.0/Update14
Documents/Release 0.8.0/Update15
Documents/Release 0.8.0/Update16
Documents/Release 0.8.0/Update17
Documents/Release 0.8.0/Update18
Documents/Release 0.8.0/Update19
Documents/Release 0.8.0/Update20
Documents/Release 0.8.0/Update3
Documents/Release 0.8.0/Update4
Documents/Release 0.8.0/Update5
Documents/Release 0.8.0/Update6
Documents/Release 0.8.0/Update7
Documents/Release 0.8.0/Update8
Documents/Release 0.8.0/Update9
Documents/Release 0.9
Documents/Release 0.9/Update 7
Documents/Release 0.9/Update1
Documents/Release 0.9/Update2
Documents/Release 0.9/Update3
Documents/Release 0.9/Update4
Documents/Release 0.9/Update5
Documents/Release 0.9/Update6
Documents/Release 0.9/Updating 0.8.0 LTS
Documents/Terms
Documents/User API
Functions and demands
Home
Libs
Libs/Devices
Libs/Documents
Libs/Electrical elements
Libs/Generic list
Libs/LowLevelDevices
Libs/Main
Libs/Main graphical elements
Libs/Mnemo elements
Libs/Prescriptions
Libs/Regulation elements
Libs/Service procedures
Libs/Technological apparatuses
Modules
Modules/BFN
Modules/BlockCalc
Modules/Comedi
Modules/DAQGate
Modules/DBArch
Modules/DBF
Modules/DBGate
Modules/DCON
Modules/DiamondBoards
Modules/FireBird
Modules/FLibComplex1
Modules/FLibMath
Modules/FLibSYS
Modules/FSArch
Modules/GPIO
Modules/HTTP
Modules/ICP DAS
Modules/JavaLikeCalc
Modules/LDAP
Modules/LogicLev
Modules/ModBus
Modules/MySQL
Modules/OPC UA
Modules/PostgreSQL
Modules/QTCfg
Modules/QTStarter
Modules/SelfSystem
Modules/Serial
Modules/Siemens
Modules/SMH2Gi
Modules/SNMP
Modules/Sockets
Modules/SoundCard
Modules/SQLite
Modules/SSL
Modules/System
Modules/SystemTests
Modules/UserProtocol
Modules/VCAEngine
Modules/Vision
Modules/WebCfg
Modules/WebCfgD
Modules/WebUser
Modules/WebVision
Sub-projects
Sub-projects/Automatic Builder of OpenSCADA
Sub-projects/Automation Linux distributive
Sub-projects/Embedding and PLC
Sub-projects/Server
Sub-projects/VCA
User:RomanSavochenko
Using
Using/HouseSpirit
Using/Kramatorsk Ball Mills
Using/Kramatorsk Water
Using/Model AGLKS
Using/Model Boiler
Using/OpenWrt TELEOFIS RTU968
Using/Yaroslavskij broiler
Works
Works/Road map
Works/Technical Support
Works/Technical Support/Agreement
Works/To do
Language
aa - Afar
ab - Abkhazian
ace - Achinese
ady - Adyghe
ady-cyrl - адыгабзэ
aeb - Tunisian Arabic
aeb-arab - تونسي
aeb-latn - Tûnsî
af - Afrikaans
ak - Akan
aln - Gheg Albanian
am - Amharic
an - Aragonese
ang - Old English
anp - Angika
ar - Arabic
arc - Aramaic
arn - Mapuche
arq - Algerian Arabic
ary - Moroccan Arabic
arz - Egyptian Arabic
as - Assamese
ase - American Sign Language
ast - Asturian
av - Avaric
avk - Kotava
awa - Awadhi
ay - Aymara
az - Azerbaijani
azb - تۆرکجه
ba - Bashkir
bar - Bavarian
bbc - Batak Toba
bbc-latn - Batak Toba
bcc - Southern Balochi
bcl - Bikol Central
be - Belarusian
be-tarask - Belarusian (Taraškievica orthography)
bg - Bulgarian
bgn - Western Balochi
bho - Bhojpuri
bi - Bislama
bjn - Banjar
bm - Bambara
bn - Bengali
bo - Tibetan
bpy - Bishnupriya
bqi - Bakhtiari
br - Breton
brh - Brahui
bs - Bosnian
bto - Iriga Bicolano
bug - Buginese
bxr - буряад
ca - Catalan
cbk-zam - Chavacano de Zamboanga
cdo - Min Dong Chinese
ce - Chechen
ceb - Cebuano
ch - Chamorro
cho - Choctaw
chr - Cherokee
chy - Cheyenne
ckb - Central Kurdish
co - Corsican
cps - Capiznon
cr - Cree
crh - Crimean Turkish
crh-cyrl - Crimean Turkish (Cyrillic script)
crh-latn - Crimean Turkish (Latin script)
cs - Czech
csb - Kashubian
cu - Church Slavic
cv - Chuvash
cy - Welsh
da - Danish
de - German
de-at - Austrian German
de-ch - Swiss High German
de-formal - German (formal address)
diq - Zazaki
dsb - Lower Sorbian
dtp - Central Dusun
dty - डोटेली
dv - Divehi
dz - Dzongkha
ee - Ewe
egl - Emilian
el - Greek
eml - Emiliano-Romagnolo
en - English
en-ca - Canadian English
en-gb - British English
eo - Esperanto
es - Spanish
et - Estonian
eu - Basque
ext - Extremaduran
fa - Persian
ff - Fulah
fi - Finnish
fit - Tornedalen Finnish
fj - Fijian
fo - Faroese
fr - French
frc - Cajun French
frp - Arpitan
frr - Northern Frisian
fur - Friulian
fy - Western Frisian
ga - Irish
gag - Gagauz
gan - Gan Chinese
gan-hans - Simplified Gan script
gan-hant - Traditional Gan script
gd - Scottish Gaelic
gl - Galician
glk - Gilaki
gn - Guarani
gom - Goan Konkani
gom-deva - Goan Konkani (Devanagari script)
gom-latn - Goan Konkani (Latin script)
got - Gothic
grc - Ancient Greek
gsw - Swiss German
gu - Gujarati
gv - Manx
ha - Hausa
hak - Hakka Chinese
haw - Hawaiian
he - Hebrew
hi - Hindi
hif - Fiji Hindi
hif-latn - Fiji Hindi (Latin script)
hil - Hiligaynon
ho - Hiri Motu
hr - Croatian
hrx - Hunsrik
hsb - Upper Sorbian
ht - Haitian Creole
hu - Hungarian
hy - Armenian
hz - Herero
ia - Interlingua
id - Indonesian
ie - Interlingue
ig - Igbo
ii - Sichuan Yi
ik - Inupiaq
ike-cans - Eastern Canadian (Aboriginal syllabics)
ike-latn - Eastern Canadian (Latin script)
ilo - Iloko
inh - Ingush
io - Ido
is - Icelandic
it - Italian
iu - Inuktitut
ja - Japanese
jam - Jamaican Creole English
jbo - Lojban
jut - Jutish
jv - Javanese
ka - Georgian
kaa - Kara-Kalpak
kab - Kabyle
kbd - Kabardian
kbd-cyrl - Адыгэбзэ
kg - Kongo
khw - Khowar
ki - Kikuyu
kiu - Kirmanjki
kj - Kuanyama
kk - Kazakh
kk-arab - Kazakh (Arabic script)
kk-cn - Kazakh (China)
kk-cyrl - Kazakh (Cyrillic script)
kk-kz - Kazakh (Kazakhstan)
kk-latn - Kazakh (Latin script)
kk-tr - Kazakh (Turkey)
kl - Kalaallisut
km - Khmer
kn - Kannada
ko - Korean
ko-kp - 한국어 (조선)
koi - Komi-Permyak
kr - Kanuri
krc - Karachay-Balkar
kri - Krio
krj - Kinaray-a
ks - Kashmiri
ks-arab - Kashmiri (Arabic script)
ks-deva - Kashmiri (Devanagari script)
ksh - Colognian
ku - Kurdish
ku-arab - كوردي (عەرەبی)
ku-latn - Kurdish (Latin script)
kv - Komi
kw - Cornish
ky - Kyrgyz
la - Latin
lad - Ladino
lb - Luxembourgish
lbe - лакку
lez - Lezghian
lfn - Lingua Franca Nova
lg - Ganda
li - Limburgish
lij - Ligurian
liv - Livonian
lmo - Lombard
ln - Lingala
lo - Lao
loz - Lozi
lrc - Northern Luri
lt - Lithuanian
ltg - Latgalian
lus - Mizo
luz - Southern Luri
lv - Latvian
lzh - Literary Chinese
lzz - Laz
mai - Maithili
map-bms - Basa Banyumasan
mdf - Moksha
mg - Malagasy
mh - Marshallese
mhr - Eastern Mari
mi - Maori
min - Minangkabau
mk - Macedonian
ml - Malayalam
mn - Mongolian
mo - молдовеняскэ
mr - Marathi
mrj - Western Mari
ms - Malay
mt - Maltese
mus - Creek
mwl - Mirandese
my - Burmese
myv - Erzya
mzn - Mazanderani
na - Nauru
nah - Nāhuatl
nan - Min Nan Chinese
nap - Neapolitan
nb - Norwegian Bokmål
nds - Low German
nds-nl - Low Saxon
ne - Nepali
new - Newari
ng - Ndonga
niu - Niuean
nl - Dutch
nl-informal - Nederlands (informeel)
nn - Norwegian Nynorsk
nov - Novial
nrm - Nouormand
nso - Northern Sotho
nv - Navajo
ny - Nyanja
oc - Occitan
olo - Livvi-Karelian
om - Oromo
or - Oriya
os - Ossetic
pa - Punjabi
pag - Pangasinan
pam - Pampanga
pap - Papiamento
pcd - Picard
pdc - Pennsylvania German
pdt - Plautdietsch
pfl - Palatine German
pi - Pali
pih - Norfuk / Pitkern
pl - Polish
pms - Piedmontese
pnb - Western Punjabi
pnt - Pontic
prg - Prussian
ps - Pashto
pt - Portuguese
pt-br - Brazilian Portuguese
qu - Quechua
qug - Chimborazo Highland Quichua
rgn - Romagnol
rif - Riffian
rm - Romansh
rmy - Romani
rn - Rundi
ro - Romanian
roa-tara - tarandíne
ru - Russian
rue - Rusyn
rup - Aromanian
ruq - Megleno-Romanian
ruq-cyrl - Megleno-Romanian (Cyrillic script)
ruq-latn - Megleno-Romanian (Latin script)
rw - Kinyarwanda
sa - Sanskrit
sah - Sakha
sat - Santali
sc - Sardinian
scn - Sicilian
sco - Scots
sd - Sindhi
sdc - Sassarese Sardinian
sdh - Southern Kurdish
se - Northern Sami
sei - Seri
ses - Koyraboro Senni
sg - Sango
sgs - Samogitian
sh - Serbo-Croatian
shi - Tachelhit
shi-latn - Tašlḥiyt
shi-tfng - ⵜⴰⵛⵍⵃⵉⵜ
si - Sinhala
sk - Slovak
sl - Slovenian
sli - Lower Silesian
sm - Samoan
sma - Southern Sami
sn - Shona
so - Somali
sq - Albanian
sr - Serbian
sr-ec - Serbian (Cyrillic script)
sr-el - Serbian (Latin script)
srn - Sranan Tongo
ss - Swati
st - Southern Sotho
stq - Saterland Frisian
su - Sundanese
sv - Swedish
sw - Swahili
szl - Silesian
ta - Tamil
tcy - Tulu
te - Telugu
tet - Tetum
tg - Tajik
tg-cyrl - Tajik (Cyrillic script)
tg-latn - Tajik (Latin script)
th - Thai
ti - Tigrinya
tk - Turkmen
tl - Tagalog
tly - Talysh
tn - Tswana
to - Tongan
tokipona - Toki Pona
tpi - Tok Pisin
tr - Turkish
tru - Turoyo
ts - Tsonga
tt - Tatar
tt-cyrl - Tatar (Cyrillic script)
tt-latn - Tatar (Latin script)
tum - Tumbuka
tw - Twi
ty - Tahitian
tyv - Tuvinian
tzm - Central Atlas Tamazight
udm - Udmurt
ug - Uyghur
ug-arab - Uyghur (Arabic script)
ug-latn - Uyghur (Latin script)
uk - Ukrainian
ur - Urdu
uz - Uzbek
uz-cyrl - ўзбекча
uz-latn - oʻzbekcha
ve - Venda
vec - Venetian
vep - Veps
vi - Vietnamese
vls - West Flemish
vmf - Main-Franconian
vo - Volapük
vot - Votic
vro - Võro
wa - Walloon
war - Waray
wo - Wolof
wuu - Wu Chinese
xal - Kalmyk
xh - Xhosa
xmf - Mingrelian
yi - Yiddish
yo - Yoruba
yue - Cantonese
za - Zhuang
zea - Zeelandic
zh - Chinese
zh-cn - Chinese (China)
zh-hans - Simplified Chinese
zh-hant - Traditional Chinese
zh-hk - Chinese (Hong Kong)
zh-mo - 中文(澳門)
zh-my - 中文(马来西亚)
zh-sg - Chinese (Singapore)
zh-tw - Chinese (Taiwan)
zu - Zulu
qqq - Message documentation
Format
Export for off-line translation
Export in native format
{{DISPLAYTITLE:Библиотеки/Основная}}<languages/> {| class="wikitable" |- ! Название !! Версия !! Лицензия !! Источник !! Языки !! Автор !! Описание |- <section begin=info /> | [[Special:MyLanguage/Libs/Main|Основная библиотека]] | 2.3 || GPLv2 || OscadaLibs.db ([http://oscada.org/svn/trunk/OpenSCADA/data/LibsDB/OscadaLibs.sql SQL], [[:File:OscadaLibs.db.gz|GZip]]) > DAQ.tmplb_base || en, uk, ru <section end=info /> | [[User:RomanSavochenko|Roman Savochenko]] | Library of the main templates of the DAQ-sources processing and related services. * '''Founded:''' January 2006 * '''Sponsored by:''' depending on the item ... * '''Used by:''' [[Special:MyLanguage/Using|most projects on OpenSCADA]] <section begin=ToDo /> :+ finish of implementation the Partial Content requests (chunks) in [[Special:MyLanguage/Libs/Main#fileServerHTTP|WebUser: HTTP File Server]] after support the HEAD request in [[Special:MyLanguage/Modules/HTTP|Protocol.HTTP]] (generic function of transition). <section end=ToDo /> |} Библиотека создана для предоставления основных шаблонов обработки DAQ-источников и производных сервисов. Названия элементов и их параметров доступны на языках: Английский, Украинский и mRussian. Их исходный код написан в языко(человеческий)-независимом режиме с вызовом функции перевода ''tr()'' и перевод этих сообщений также доступен Английским, Украинским и mRussian. Для подключения библиотеки к проекту станции OpenSCADA Вы можете получить файл БД как: * такой что поставляется с готовым и соответствующим пакетом дистрибутива Linux вроде "openscada-libdb-main", "openscada-LibDB.Main"; * наиболее актуальный и непосредственно полученный из [http://oscada.org/svn/trunk/OpenSCADA/data/LibsDB/OscadaLibs.sql репозитория subversion], преобразованный в файл БД SQLite путём: <syntaxhighlight lang="BASH" style="margin-left: 15px"> wget http://oscada.org/svn/trunk/OpenSCADA/data/LibsDB/OscadaLibs.sql sqlite3 -init OscadaLibs.sql OscadaLibs.db .exit </syntaxhighlight> * загрузка [[:File:OscadaLibs.db.gz|прикреплённого тут]]. Этот полученный файл вы далее можете разместить в каталоге проекта станции и создать объект базы данных модуля БД "SQLite", зарегистрировав файл базы данных в конфигурации. Для DAQ-шаблонов, в целом, вам нужно создать представительский объект устройства в [[Special:MyLanguage/Modules/LogicLev|модуле Логического Уровня]] и выбрать соответствующий шаблон из библиотеки шаблонов. Далее, для корректной конфигурации, придерживайтесь специфики шаблона в персональном описании. == Templates of standard structures of the DAQ-parameters == {| class="wikitable" <section begin=anUnif /> | {{Anch|anUnif|<h3>Analog signal, unified ([[Special:MyLanguage/Libs/Main#anUnif|anUnif]])</h3>}} | 2.4 || GPLv2 || * || en, uk, ru <section end=anUnif /> | [[User:RomanSavochenko|Roman Savochenko]] |} [[File:LibsMainAnUnifOp.png|right|Result and the operative setup.]] Common, representative and unified template of analog input signals processing. The template forms a structure of analog parameter (complex tag) which can be easily connected to most widgets and cadres of [[Special:MyLanguage/Libs/Main_graphical_elements|the main elements library of the user interface]] just pointing the parameter object. The representative structure of analog parameters (complex tags) is: * "Variable ('''var''')" — end variable of the parameter — engineeric real value, allowed and suitable for archiving. * "Error ('''err''')" — obligatory attribute of any parameter, consist of the combination of the error code and short text description, like to "2:No data or connection with source". The template reserves next error codes: ** '''1, 2''' — hardware errors, when the data mostly wrong; ** '''3, 4''' — alarm border errors; ** '''5, 6''' — warning border errors; ** '''7''' — the speed error of the variable changing. * "Violations suppress ('''alSup''') and delay ('''alDelay''')" — violations generic control for suppressing and delaying. * "Scale: minimum ('''min''')" and "Scale: maximum ('''max''')" — main scale of the end variable, the output of which causes a hardware border error. The scale is also used as a scale of the variable trend display on the graphs. * "Logarithmic scale ('''log''')" — the scale sign of the variable trend display on the graphs in the logarithmic scale. * "Dimension ('''ed''')" — dimension (unit of measurement) of the variable. * "Precision ('''prec''')" — number signs after the dot, for positive values, and precision (signs in whole), for negative ones, to display the real end variable on the screen. Significant graphical shapes representing the structure: * [[Special:MyLanguage/Libs/Main_graphical_elements|Main elements library of the user interface]]: ** [[Special:MyLanguage/Libs/Main_graphical_elements#anShow|Analog show]] ** [[Special:MyLanguage/Libs/Main_graphical_elements#anShow1|Analog show 1]]; [[Special:MyLanguage/Libs/Main_graphical_elements#anShow1s|Analog show 1, short]] ** [[Special:MyLanguage/Libs/Main_graphical_elements#ElViewGraph|Graphics group element]] ** [[Special:MyLanguage/Libs/Main_graphical_elements#ElViewCadr|Frame of the group of overview]] ** [[Special:MyLanguage/Libs/Main_graphical_elements#ResultGraphEl|Frame of the result graphics]] ** [[Special:MyLanguage/Libs/Main_graphical_elements#ElCadr|Element cadre]] ** [[Special:MyLanguage/Libs/Main_graphical_elements#cntrPaspExt|Passport, extended]] * [[Special:MyLanguage/Libs/Mnemo_elements|Mnemonic elements library of the user interface]]: ** [[Special:MyLanguage/Libs/Mnemo_elements#Level|Level]] * [[Special:MyLanguage/Libs/Documents|Reports' and documents' library]]: ** [[Special:MyLanguage/Libs/Documents#docRepInstVals|Instantaneous values report]] ** [[Special:MyLanguage/Libs/Documents#docRepDay|Day report of the hour-averaged values]] ** [[Special:MyLanguage/Libs/Documents#docRepMonth|Month report of the day-averaged values]] ** [[Special:MyLanguage/Libs/Documents#docRepYear|Year report of the month values]] ** [[Special:MyLanguage/Libs/Documents#docRep2WorkSh|Report of two working shifts]] * '''Sponsored by, for expanding the common field DESCR using in the specific alarm parameters on 0.1 {{CtxDetails|HD|human-days, 1 HD — 10 hours}}:''' INSERTEC LTDA {{CntHdr|Functions}} * Generic processing of the raw analog input for: :* simple correction-calibration at the formula "'''in''' = '''iMult'''*('''in'''+'''iAdd''')"; :* scaling from the hardware border ['''plcMin'''...'''plcMax'''] to the main border ['''min'''...'''max'''], applying the square scale '''scSqr'''; :: [[File:at.png]] The hardware borders can be inverted ones and disabled in whole for equal values of the maximum and minimum, when the main border only used. :* permission to exceed the border for the input value on the value of '''plcExcess''' percent; :* filtering the input value changing in the time '''Tf'''. * Simple imitation of the analog input, setting '''plcImit''' and linking the imitation-simulation source in '''plcImitIn'''. :: [[File:at.png]] Missing the link '''plcImitIn''' (EVAL) causes to generating random analog input * Complex preprocessing and complete generation-imitation of the analog input on the internal programming language of OpenSCADA into the configuration IO '''inProc''' (with appending the builtin syntax highlight rules), where you can operate next service parameters: :* ''in'' [IN|OUT] — the same raw analog input IO; :* ''var'' [IN] — the end variable IO; :* ''min'', ''max'' [IN] — the main border IOs; :* ''plcMin'', ''plcMax'' [IN] — the hardware border IOs; :* ''plcImit'', ''plcImitIn'' [IN] — IOs of the simple imitation; :* ''levErr'', ''tErr'' [IN|OUT] — alarm level [-79...0] and text of the error (the attribute "err" format); :* ''f_frq'' [IN] — frequency of calculation, the template IO; :* ''this'' [IN] — reference to the parameter object, what executing the template; :* ''ctx'' [IN] — object of the user context, what saved between the execution cycles; :* ''toSave'' [OUT] — to force save the parameter object at exit. * Simple substitution for the variable '''subVar''' at the error (not valid) input variable (EVAL) in the modes: "no", "last" and "substitute". * Processing the result variable '''var''' for violation some borders and criteria, generating the alarms and proper setting the attribute '''err'''. The alarm borders can have some hysteresis '''HystBnd''', can be delayed on the time '''alDelay''' and can be suppressed setting '''alSup'''. Next borders and criteria are provided: :* missing for data or connection with source at the EVAL input value — error code 1 and alarm level 5; :* exceeding the input value of the hardware border — error code 1,2 and alarm level 5; :* exceeding the end variable of the alarm border ['''aMin'''...'''aMax'''] — error code 3,4 and alarm level 4; :: [[File:at.png]] Disabled at setting for equal or inverted values of the border :* exceeding the end variable of the warning border ['''wMin'''...'''wMax'''] — error code 5,6 and alarm level 2; :: [[File:at.png]] Disabled at setting for equal or inverted values of the border :* big motion '''speed''' of the end variable — error code 7 and alarm level 2. * Specific parameters redefinition in the common attribute '''DESCR''': :* ''the first line'' — as description of the alarm messages; :* the field ''CustomFlds'' — specifying of [[Special:MyLanguage/Documents/Program_manual#ArchMess|the custom fields]] of the alarm messages in the form "'''CustomFlds: {CustFld0} => {CustFld1} => ... => {CustFldN}'''"; :* the field ''CustomAlarms'' — redefinition of the standard alarm levels of the alarm messages in the form "'''CustomAlarms: {ConErr};{BrdAlarm};{BrdWarn}'''". {{CntHdr|Template IOs}} {| class="wikitable" |- ! Identifier !! Name !! Type !! Mode !! Attribute !! Configuration !! Value |- | in || Input || Real || Input || Not attribute || Link || Input|var |- | inProc || Input processing procedure || Text || Input || Not attribute || Constant || |- | var || Variable || Real || Input || Read only || Variable || 0 |- | ed || Dimension || String || Input || Full access || Variable || |- | min || Scale: minimum || Real || Input || Full access || Variable || 0 |- | max || Scale: maximum || Real || Input || Full access || Variable || 100 |- | scSqr || Scale: square || Boolean || Input || Full access || Variable || 0 |- | subMode || Substitute: mode || Integer numbers selection || Input || Full access || Variable || 0<br/> 0;1;2<br/> no;last;substitute<br/> |- | subVar || Substitute: variable || Real || Input || Full access || Variable || 0 |- | alSup || Violations suppress || Boolean || Input || Full access || Variable || |- | alDelay || Violations delay, seconds || Real || Input || Full access || Variable || 0 |- | aMin || Border down alarm || Real || Input || Full access || Variable || 0 |- | aMax || Border up alarm || Real || Input || Full access || Variable || 0 |- | wMin || Border down warning || Real || Input || Full access || Variable || 0 |- | wMax || Border up warning || Real || Input || Full access || Variable || 0 |- | HystBnd || Hysteresis of borders violation || Real || Input || Full access || Variable || 1 |- | speed || Motion speed, %/cycle || Real || Input || Full access || Variable || 0 |- | prec || Precision, signs || Integer || Input || Full access || Variable || 2 |- | log || Logarithmic scale || Boolean || Input || Full access || Variable || 0 |- | Tf || Filter time, seconds || Real || Input || Full access || Variable || 0 |- | iAdd || Input addition || Real || Input || Not attribute || Constant || 0 |- | iMult || Input multiplication || Real || Input || Not attribute || Constant || 1 |- | plcMin || Minimum module scale || Real || Input || Not attribute || Constant || 0 |- | plcMax || Maximum module scale || Real || Input || Not attribute || Constant || 0 |- | plcExcess || Allowed scale exceeding, % || Real || Input || Not attribute || Constant || 0 |- | plcImit || PLC imitation || Boolean || Input || Not attribute || Constant || 0 |- | plcImitIn || PLC imitation input || Real || Input || Not attribute || Link || Imitation|var |- | this || Object || Object || Output || Not attribute || Variable || |- | SHIFR || Code || String || Input || Not attribute || Variable || |- | NAME || Name || String (translate) || Input || Not attribute || Variable || |- | DESCR || Description || Text (translate) || Input || Not attribute || Variable || |- | f_err || Function error || String || Input || Not attribute || Variable || 0 |- | f_frq || Frequency of calculation of the function, Hz || Real || Input || Not attribute || Variable || 1000 |- | f_start || Function start flag || Boolean || Input || Not attribute || Variable || 0 |- | f_stop || Function stop flag || Boolean || Input || Not attribute || Variable || 0 |} [[File:LibsMainAnUnifCfg.png|right|Configuration.]] {{CntHdr|Configuring and using}} :1. Create and start [[Special:MyLanguage/Modules/LogicLev|a logical controller object]] or use any presented one with the needed scheduling properties. :2. Create [[Special:MyLanguage/Modules/LogicLev|a logical parameter object]] and select this template for it. Enable the parameter. :3. Into the tab "Template configuration" of the logical parameter object you need to set: :* ''Input'' — [[Special:MyLanguage/Documents/DAQ#LogicLevLnks|link to a source of the "raw" signal]]. :* ''Input processing procedure'' — form for the complex preprocessing and complete generation of the analog input on the internal programming language of OpenSCADA. It is optional and should be defined in complex cases, for example: ::* simple and transparent preprocessing to bring the percentage of UPS load to power that can be done with '''iMult''' also: <syntaxhighlight lang="JavaScript" style="margin-left: 40pt"> in = 490*in/100; //the UPS has 480W </syntaxhighlight> ::* implementing of the input signal counter — consumed electricity of the UPS: <syntaxhighlight lang="JavaScript" style="margin-left: 40pt"> //Checking for the data validity if(ctx.cntr.isEVal()) ctx.cntr = this.var.get(); if(!in.isEVal()) { pUPS = 33; if(ctx.cntr.isEVal()) ctx.cntr = (pUPS+in)/(3600*f_frq); else ctx.cntr += (pUPS+in)/(3600*f_frq); } //Checking for the next month reset month = 0; SYS.localtime(SYS.time(), 0, 0, 0, 0, month); if(!ctx.month.isEVal() && month != ctx.month) ctx.cntr = 0; ctx.month = month; in = ctx.cntr; </syntaxhighlight> ::* generating of the extended violations — processing for the external signals related to the source: <syntaxhighlight lang="JavaScript" style="margin-left: 40pt"> gO = this.cntr().prm_grps; if(SYS.DAQ.JavaLikeCalc.lib_aviary.sensorError(gO.prm_generic.PRG_Input_Err_T_room_S.get(),levErr,tErr)); else if(!(tVl=gO.prm_alarms.PRG_Alarm_T_max.get()).isEVal() && tVl) levErr = -4, tErr = "11:above the set limit"; else if(!(tVl=gO.prm_alarms.PRG_Alarm_T_min.get()).isEVal() && tVl) levErr = -4, tErr = "11:below the set limit"; </syntaxhighlight> :* ''Minimum and maximum of the module scale'' — must be set at the case of significant difference the hardware and the generic scales, for example: ::* the input is raw and measured in value of the current [4...20]mA, here it is necessary to specify 4 and 20 mA; ::* the previous case where it is necessary to simply and transparently calibrate the end value — with a precision device set 4mA and 20mA and indicate here the real measured values of the "raw" signal. :* ''Input addition and multiplication'' — use for easy and linear correction of the input, for example: ::* calibration for the end value, which is less transparent and these coefficients should be calculated according to the formulas: ::: '''iAdd = ((plcMin*precMeasMax)/plcMax - precMeasMin)*(plcMax/(plcMax-plcMin))''' ::: '''iMult = (plcMax - plcMin) / (precMeasMax - precMeasMin)''' :* ''Allowed scale exceeding'' — set if necessary to exceed the value of the main border, and when this scale starts to perform the recommendation function, say for the initial display of the trend on this scale. :* ''PLC imitation and the imitation input'' — define at the need to simulate the input as required in the functions. :4. RESULT: Launching the controller object (where this parameter is created) and if it has not been started, we must get the operational data in the tab "Attributes" for: variable, error status; and the generation of violations if the state of the error is nonzero. :5. In the process of the working, through the tab "Attributes" of operational data, in addition to obtaining the result, it is possible to perform operative setup and control on: :* ''Scale: minimum and maximum'' — strictly [[file:at.png]] set to the range of data changes by availability and according to the hardware border, otherwise the value will be distorted! In the absence of the hardware border, this, the main border, is arbitrary and advisory, although exceeding of the border by the value will be also accompanied by a violation. :* ''Scale: square'' — set if the hardware border is square one. :* ''Filter time'' — set the filtering time for noisy signals. :* ''Substitute: mode and variable'' — set the desired substitution mode at invalidity the variable. :* ''Violations suppress'' — set at the need of the parameter violations complete suppression — to disable their generation in whole. :* ''Violations delay'' — set the delay time for the generation of the violations, to exclude frequent generation, characteristic to uncertain sources of data, characterized by short-term loss of communication. :* ''Border up/down alarm/warning'' — set when it is necessary to generate violations at the exceeding of the alarm/warning borders. :* ''Hysteresis of borders violation'' — set the hysteresis of removing the violation, that is, removal of the violations occurs at the specified percentage later, in order to prevent the frequent generation by fluctuating the value near the border. :* ''Motion speed'' — set if it is necessary to warn about fast change of value. :* ''Name, Description, Dimension, Precision, Logarithmic scale'' — set this information as needed when displayed, or as an element of the passport. {| class="wikitable" <section begin=anUnifSt /> | {{Anch|anUnifSt|<h3>Analog signal, unified, violation statuses ([[Special:MyLanguage/Libs/Main#anUnifSt|anUnifSt]])</h3>}} | 1.3 || GPLv2 || * || en, uk, ru <section end=anUnifSt /> | [[User:RomanSavochenko|Roman Savochenko]] |} Common, representative and unified template of analog input signals processing, extended by binary states of indication the violations. The template grounded on the base template "[[#anUnif|Analog signal, unified]]" with its representative structure and some differences characteristic to independent development and expansion. Binary states were provided for the convenient use of algorithms of operation at the borders of violations of the parameter object, preferably in [[Special:MyLanguage/Modules/BlockCalc|the block diagrams]] of general control algorithms. {{CntHdr|Functions}} Mostly the same as the basic template "[[#anUnif|Analog signal, unified]]" and the borderline signs are additionally provided: "H", "L", "HH", "LL", "EVAL". {{CntHdr|Template IOs}} {| class="wikitable" |- ! Identifier !! Name !! Type !! Mode !! Attribute !! Configuration !! Value |- | colspan="7" | Template IOs of "[[#anUnif|Analog signal, unified]]" |- | H || Border up warning violation || Boolean || Output || Read only || Variable || |- | L || Border down warning violation || Boolean || Output || Read only || Variable || |- | HH || Border up alarm violation || Boolean || Output || Read only || Variable || |- | LL || Border down alarm violation || Boolean || Output || Read only || Variable || |- | EVAL || Error value || Boolean || Output || Read only || Variable || |} {{CntHdr|Configuring and using}} Completely identical to "[[#anUnif|Analog signal, unified]]]" with the difference of using the borderline signs: "H", "L", "HH", "LL", "EVAL"; which can be connected to external computing. {| class="wikitable" <section begin=manInUnif /> | {{Anch|manInUnif|<h3>Manual input, unified ([[Special:MyLanguage/Libs/Main#manInUnif|manInUnif]])</h3>}} | 1.2 || GPLv2 || * || en, uk, ru <section end=manInUnif /> | [[User:RomanSavochenko|Roman Savochenko]] |} [[File:LibsMainManInUnifOp.png|right|Result and the operative setup.]] Common, representative and unified template of a manual input and an analog output signal. The template forms a structure of parameter (complex tag) of the manual input what can be easily connected to most widgets and cadres of [[Special:MyLanguage/Libs/Main_graphical_elements|the main elements library of the user interface]] just pointing the parameter object, the control mostly can be performed through the [[Special:MyLanguage/Libs/Main_graphical_elements#ElCadr|Element cadre]] control panel. The representative structure of the parameter (complex tag) of the manual input is: * "Variable ('''var''')" — end variable of the parameter — engineeric real value, allowed and suitable for archiving. * "Variable input ('''varIn''')" — attribute for entering a new engineering value, which in the next falls into the variable. * "Error ('''err''')" — obligatory attribute of any parameter, consist of the combination of the error code and short text description, like to "2:No data or connection with source". The template reserves next error codes: ** '''1, 2''' — hardware errors, when the data mostly wrong; ** '''3, 4''' — alarm border errors; ** '''5, 6''' — warning border errors; ** '''7''' — the speed error of the variable changing. * "Violations suppress ('''alSup''') and delay ('''alDelay''')" — violations generic control for suppressing and delaying. * "Scale: minimum ('''min''')" and "Scale: maximum ('''max''')" — main scale of the end variable, the output of which causes a hardware border error. The scale is also used as a scale of the variable trend display on the graphs. * "Logarithmic scale ('''log''')" — the scale sign of the variable trend display on the graphs in the logarithmic scale. * "Dimension ('''ed''')" — dimension (unit of measurement) of the variable. * "Precision ('''prec''')" — number signs after the dot, for positive values, and precision (signs in whole), for negative ones, to display the real end variable on the screen. Significant graphical shapes representing the structure: * [[Special:MyLanguage/Libs/Main_graphical_elements|Main elements library of the user interface]]: ** [[Special:MyLanguage/Libs/Main_graphical_elements#ElCadr|Element cadre]] {{CntHdr|Functions}} * Generic processing of the raw analog input for: :* simple correction-calibration at the formula "'''in''' = '''iMult'''*('''in'''+'''iAdd''')"; :* scaling from the hardware border ['''plcMin'''...'''plcMax'''] to the main border ['''min'''...'''max'''], applying the square scale '''scSqr'''; :: [[File:at.png]] The hardware borders can be inverted ones and disabled in whole for equal values of the maximum and minimum, when the main border only used. :* permission to exceed the border for the input value on the value of '''plcExcess''' percent; :* filtering the input value changing in the time '''Tf'''. * Processing the result variable '''var''' for violation some borders and criteria, generating the alarms and proper setting the attribute '''err'''. The alarm borders can have some hysteresis '''HystBnd''', can be delayed on the time '''alDelay''' and can be suppressed setting '''alSup'''. Next borders and criteria are provided: :* missing for data or connection with source at the EVAL input value — error code 1 and alarm level 5; :* exceeding the input value of the hardware border — error code 1,2 and alarm level 5; :* exceeding the end variable of the alarm border ['''aMin'''...'''aMax'''] — error code 3,4 and alarm level 4; :: [[File:at.png]] Disabled at setting for equal or inverted values of the border :* exceeding the end variable of the warning border ['''wMin'''...'''wMax'''] — error code 5,6 and alarm level 2; :: [[File:at.png]] Disabled at setting for equal or inverted values of the border :* big motion '''speed''' of the end variable — error code 7 and alarm level 2. * Reverse conversion of the engineered variable value and writing to the output. : [[File:at.png]] In the absence of the "Input/Output" connection, the writing is not performed and there is the stand-alone operation. {{CntHdr|Template IOs}} {| class="wikitable" |- ! Identifier !! Name !! Type !! Mode !! Attribute !! Configuration !! Value |- | inout || Input/Output || Real || Output || Not attribute|| Link || Parameter|var |- | var || Variable || Real || Input || Read only || Variable || 0 |- | varIn || Variable input || Real || Input || Full access || Variable || 0 |- | ed || Dimension || String || Input || Full access || Variable || |- | min || Scale: minimum || Real || Input || Full access || Variable || 0 |- | max || Scale: maximum || Real || Input || Full access || Variable || 100 |- | scSqr || Scale: square || Boolean || Input || Full access || Variable || 0 |- | alSup || Violations suppress || Boolean || Input || Full access || Variable || |- | alDelay || Violations delay, seconds || Real || Input || Full access || Variable || |- | aMin || Border down alarm || Real || Input || Full access || Variable || 0 |- | aMax || Border up alarm || Real || Input || Full access || Variable || 0 |- | wMin || Border down warning || Real || Input || Full access || Variable || 0 |- | wMax || Border up warning || Real || Input || Full access || Variable || 0 |- | HystBnd || Hysteresis of borders violation || Real || Input || Full access || Variable || 1 |- | speed || Motion speed, %/cycle || Real || Input || Full access || Variable || 0 |- | prec || Precision, signs || Integer || Input || Full access || Variable || 2 |- | log || Logarithmic scale || Boolean || Input || Full access || Variable || 0 |- | Tf || Filter time, seconds || Real || Input || Full access || Variable || 0 |- | iAdd || Input addition || Real || Input || Not attribute || Constant || 0 |- | iMult || Input multiplication || Real || Input || Not attribute || Constant || 1 |- | plcMin || Minimum module scale || Real || Input || Not attribute || Constant || 0 |- | plcMax || Maximum module scale || Real || Input || Not attribute || Constant || 0 |- | plcExcess || Allowed scale exceeding, % || Real || Input || Not attribute || Constant || 0 |- | this || Object || Object || Output || Not attribute || Variable || |- | SHIFR || Code || String || Input || Not attribute || Variable || |- | NAME || Name || String (translate) || Input || Not attribute || Variable || |- | DESCR || Description || Text (translate) || Input || Not attribute || Variable || |- | f_err || Function error || String || Input || Not attribute || Variable || 0 |- | f_frq || Frequency of calculation of the function, Hz || Real || Input || Not attribute || Variable || 1000 |- | f_start || Function start flag || Boolean || Input || Not attribute || Variable || 0 |- | f_stop || Function stop flag || Boolean || Input || Not attribute || Variable || 0 |} [[File:LibsMainManInUnifCfg.png|right|Configuration.]] {{CntHdr|Configuring and using}} :1. Create and start [[Special:MyLanguage/Modules/LogicLev|a logical controller object]] or use any presented one with the needed scheduling properties. :2. Create [[Special:MyLanguage/Modules/LogicLev|a logical parameter object]] and select this template for it. Enable the parameter. :3. Into the tab "Template configuration" of the logical parameter object you need to set: :* ''Input/Output'' — [[Special:MyLanguage/Documents/DAQ#LogicLevLnks|link to a source of the "raw" IO signal]], or do not link for the stand-alone mode. :* ''Minimum and maximum of the module scale'' — must be set at the case of significant difference the hardware and the generic scales, for example see the template "[[#anUnif|Analog signal, unified]]". :* ''Input addition and multiplication'' — use for easy and linear correction of the input, for example see the template "[[#anUnif|Analog signal, unified]]". :* ''Allowed scale exceeding'' — set if necessary to exceed the value of the main border, and when this scale starts to perform the recommendation function, say for the initial display of the trend on this scale. :4. RESULT: Launching the controller object (where this parameter is created) and if it has not been started, we must get the operational data in the tab "Attributes" for: variable, error status; and the generation of violations if the state of the error is nonzero; and it will be allowed to set new values. :5. In the process of the working, through the tab "Attributes" of operational data, in addition to obtaining the result, it is possible to perform operative setup and control on: :* ''Scale: minimum and maximum'' — strictly [[file:at.png]] set to the range of data changes by availability and according to the hardware border, otherwise the value will be distorted! In the absence of the hardware border, this, the main border, is arbitrary and advisory, although exceeding of the border by the value will be also accompanied by a violation. :* ''Scale: square'' — set if the hardware border is square one. :* ''Filter time'' — set the filtering time for noisy signals. :* ''Violations suppress'' — set at the need of the parameter violations complete suppression — to disable their generation in whole. :* ''Violations delay'' — set the delay time for the generation of the violations, to exclude frequent generation, characteristic to uncertain sources of data, characterized by short-term loss of communication. :* ''Border up/down alarm/warning'' — set when it is necessary to generate violations at the exceeding of the alarm/warning borders. :* ''Hysteresis of borders violation'' — set the hysteresis of removing the violation, that is, removal of the violations occurs at the specified percentage later, in order to prevent the frequent generation by fluctuating the value near the border. :* ''Motion speed'' — set if it is necessary to warn about fast change of value. :* ''Name, Description, Dimension, Precision, Logarithmic scale'' — set this information as needed when displayed, or as an element of the passport. {| class="wikitable" <section begin=digitBlockUnif /> | {{Anch|digitBlockUnif|<h3>Discrete block, unified ([[Special:MyLanguage/Libs/Main#digitBlockUnif|digitBlockUnif]])</h3>}} || 1.0 || GPLv2 || * || en, uk, ru <section end=digitBlockUnif /> | [[User:RomanSavochenko|Roman Savochenko]] |} [[File:LibsMainDigitBlockUnifOp.png|right|Result and the operative setup.]] Common, representative and unified template of the block for union of Discrete parameters for the common control device. The template forms a structure of discrete parameter-block (complex tag) which can be easily connected to most widgets and cadres of [[Special:MyLanguage/Libs/Main_graphical_elements|the main elements library of the user interface]] just pointing the parameter object. The representative structure of discrete parameters (complex tags) is a latch object with two characteristic states and three commands, which in the final representation may have a different meaning and name: * "State "Opened" ('''st_open''')" — the state "Opened" of the latch. Is the primary status signal that can be used without the next one, when '''1 (true)''' is "Opened", and '''0 (false)''' is 'Closed'. * "State "Closed" ('''st_close''')" — the state "Closed". * "Command "Open" ('''com''')" — the command "Open" of the latch. Is the primary command signal that can be used without the next one, when '''1 (true)''' is "Open", and '''0 (false)''' is 'Close'. * "Command "Close" ('''close''')" — the command "Close" of the latch. * "Command "Stop" ('''stop''')" — the command "Stop" of the latch. Significant graphical shapes representing the structure: * [[Special:MyLanguage/Libs/Main_graphical_elements|Main elements library of the user interface]]: ** [[Special:MyLanguage/Libs/Main_graphical_elements#TextLab|Text label]] ** [[Special:MyLanguage/Libs/Main_graphical_elements#ImgLab|Image label]] ** [[Special:MyLanguage/Libs/Main_graphical_elements#ElViewGraph|Graphics group element]] ** [[Special:MyLanguage/Libs/Main_graphical_elements#ElCadr|Element cadre]] ** [[Special:MyLanguage/Libs/Main_graphical_elements#cntrPaspExt|Passport, extended]] * [[Special:MyLanguage/Libs/Mnemo_elements|Mnemonic elements library of the user interface]]: ** [[Special:MyLanguage/Libs/Mnemo_elements#El_Alarm|Alarming]] ** [[Special:MyLanguage/Libs/Mnemo_elements#discrApps|Discrete apparatus]] * [[Special:MyLanguage/Libs/Electrical_elements|Electrical elements library of the user interface]]: ** [[Special:MyLanguage/Libs/Electrical_elements#ActualActive|Key, unified]] ** [[Special:MyLanguage/Libs/Electrical_elements#ActualActive|Switch, unified]] ** [[Special:MyLanguage/Libs/Electrical_elements#ActualActive|General state, unified]] ** [[Special:MyLanguage/Libs/Electrical_elements#ActualActive|Area state, unified]] {{CntHdr|Functions}} * Direct obtaining, by link, of the two states (read only) and three commands (reading and writing). * Possibility of holding the commands for a certain time and removing them. * Ability to redefine the states and commands by [[Special:MyLanguage/Libs/Main_graphical_elements|the appropriate settings of the interface elements]], such as ''digStts'', for statuses, and ''digComs'', for commands. {{CntHdr|Template IOs}} {| class="wikitable" |- ! Identifier !! Name !! Type !! Mode !! Attribute !! Configuration !! Value |- | com || Command "Open" || Boolean || Output || Full access || Link || Crane|com |- | close || Command "Close" || Boolean || Output || Full access || Link || Crane|close |- | stop || Command "Stop" || Boolean || Output || Full access || Link || Crane|stop |- | st_open || State "Opened" || Boolean || Input || Read only || Link || Crane|st_open |- | st_close || State "Closed" || Boolean || Input || Read only || Link || Crane|st_close |- | tCmd || Time to hold the command, seconds || Integer || Input || Not attribute || Constant || 5 |- | last_cmd || Last command || Integer || Output || Not attribute || Variable || 0 |- | w_tm || Process command counter || Real || Output || Not attribute || Variable || 0 |- | f_err || Function error || String || Input || Not attribute || Variable || 0 |- | f_frq || Frequency of calculation of the function, Hz || Real || Input || Not attribute || Variable || 1000 |- | f_start || Function start flag || Boolean || Input || Not attribute || Variable || 0 |- | f_stop || Function stop flag || Boolean || Input || Not attribute || Variable || 0 |} [[File:LibsMainDigitBlockUnifCfg.png|right|Configuration.]] {{CntHdr|Configuring and using}} :1. Create and start [[Special:MyLanguage/Modules/LogicLev|a logical controller object]] or use any presented one with the needed scheduling properties. :2. Create [[Special:MyLanguage/Modules/LogicLev|a logical parameter object]] and select this template for it. Enable the parameter. :3. Into the tab "Template configuration" of the logical parameter object you need to set: :* All the states and commands — [[Special:MyLanguage/Documents/DAQ#LogicLevLnks|link to a source of the "raw" signal]]. :* ''Time to hold the command, seconds'' — set the desired hold value or 0 to disable this feature. :4. RESULT: Launching the controller object (where this parameter is created) and if it has not been started, we must get the operational data in the tab "Attributes" for: states and commands. :5. In the process of the working, through the tab "Attributes" of operational data, in addition to obtaining the result, it is possible to perform operative control, performing the commands: {| class="wikitable" <section begin=digAlarm /> | {{Anch|digAlarm|<h3>Alarm discrete ([[Special:MyLanguage/Libs/Main#digAlarm|digAlarm]])</h3>}} | 1.3 || GPLv2 || * || en, uk, ru <section end=digAlarm /> | [[User:RomanSavochenko|Roman Savochenko]] |} [[File:LibsMainDigAlarmOp.png|right|Result and the operative setup.]] Common, representative and unified template of separate discrete parameter (complex tag) processing with formation of signaling by the defined criterion. The template forms a structure of discrete parameter (complex tag) which can be easily connected to most widgets and cadres of [[Special:MyLanguage/Libs/Main_graphical_elements|the main elements library of the user interface]] just pointing the parameter object. The template provides some fields of [[#digitBlockUnif|the representative structure of the discrete parameters]] and adds the error field: * "State "Opened" ('''st_open''')" — the state "Opened". * "State "Closed" ('''st_close''')" — the state "Closed". * "Error ('''err''')" — obligatory attribute of any parameter, consist of the combination of the error code and short text description, like to "2:No data or connection with source". The template reserves next error codes: ** '''1''' — hardware errors, when the data mostly wrong; ** '''3''' — violation of the specified condition. * "Violations suppress ('''alSup''') and delay ('''alDelay''')" — violations generic control for suppressing and delaying. {{CntHdr|Functions}} * Direct obtaining, by link, of the initial state and formation of two representative states with the possibility of their inversion '''stInv'''. * Complex preprocessing and complete generation-imitation of the discrete input on the internal programming language of OpenSCADA into the configuration IO '''inProc''' (with appending the builtin syntax highlight rules), where you can operate next service parameters: :* ''in'' [IN|OUT] — the same raw discrete input IO; :* ''levErr'', ''tErr'' [IN|OUT] — alarm level [-79...0] and text of the error (the attribute "err" format); :* ''f_frq'' [IN] — frequency of calculation, the template IO; :* ''this'' [IN] — reference to the parameter object, what executing the template; :* ''ctx'' [IN] — object of the user context, what saved between the execution cycles. * Processing of the discrete input '''in''' for the purpose of creating a violation and correspondingly setting the attribute '''err''', at the condition "'''{st}:{lev}:{mess}'''", that is violation generation of the level ''lev'' and the text ''mess'' for the input status ''st'' (0|1). What can be delayed on the time '''alDelay''' and can be suppressed setting '''alSup'''. * Specific parameters redefinition in the common attribute '''DESCR''': :* ''the first line'' — as description of the alarm messages; :* the field ''CustomFlds'' — specifying of [[Special:MyLanguage/Documents/Program_manual#ArchMess|the custom fields]] of the alarm messages in the form "'''CustomFlds: {CustFld0} => {CustFld1} => ... => {CustFldN}'''". {{CntHdr|Template IOs}} {| class="wikitable" |- ! Identifier !! Name !! Type !! Mode !! Attribute !! Configuration !! Value |- | alrm || Alarm "{st}:{lev}:{mess}" || String || Input || Not attribute || Constant || |- | stInv || State inversion || Boolean || Input || Not attribute || Constant || |- | in || Input || Boolean || Input || Read only || Link || Input|in |- | inProc || Input processing procedure || Text || Input || Not attribute || Constant || |- | alSup || Violations suppress || Boolean || Input || Full access || Variable || |- | alDelay || Violations delay, seconds || Real || Input || Full access || Variable || 0 |- | st_open || State "Opened" || Boolean || Input || Read only || Variable || |- | st_close || State "Closed" || Boolean || Input || Read only || Variable || |- | SHIFR || Code || String || Input || Not attribute || Variable || |- | NAME || Name || String (translate) || Input || Not attribute || Variable || |- | DESCR || Description || Text (translate) || Input || Not attribute || Variable || |- | this || Object || Object || Input || Not attribute || Variable || |- | f_err || Function error || String || Input || Not attribute || Variable || 0 |- | f_frq || Frequency of calculation of the function, Hz || Real || Input || Not attribute || Variable || 1000 |- | f_start || Function start flag || Boolean || Input || Not attribute || Variable || 0 |- | f_stop || Function stop flag || Boolean || Input || Not attribute || Variable || 0 |} [[File:LibsMainDigAlarmCfg.png|right|Configuration.]] {{CntHdr|Configuring and using}} :1. Create and start [[Special:MyLanguage/Modules/LogicLev|a logical controller object]] or use any presented one with the needed scheduling properties. :2. Create [[Special:MyLanguage/Modules/LogicLev|a logical parameter object]] and select this template for it. Enable the parameter. :3. Into the tab "Template configuration" of the logical parameter object you need to set: :* "Alarm "{st}:{lev}:{mess}" — define the criterion for the violation formation, leave blank to disable the violations generation. :* "State inversion" — set to invert the representative attributes, that is, "st_open" set for "in" equal to '''false'''. :* ''Input'' — [[Special:MyLanguage/Documents/DAQ#LogicLevLnks|link to a source of the "raw" signal]]. :* ''Input processing procedure'' — form for the complex preprocessing and complete generation of the discrete input on the internal programming language of OpenSCADA. For example: ::* complete creation for a complex status: <syntaxhighlight lang="JavaScript" style="margin-left: 40pt"> gO = this.cntr().prm_grps; status = gO.prm_generic.PRG_Input_Err_T_Zone1_S.get(); in = gO.prm_generic.SET_CalcFan_UseSensor_T1.get() || !(status == 0 || status == 2 || status == 3); </syntaxhighlight> :4. RESULT: Launching the controller object (where this parameter is created) and if it has not been started, we must get the operational data in the tab "Attributes" for: variable, error status; and the generation of violations if the state of the error is nonzero. {| class="wikitable" <section begin=codeState /> | {{Anch|codeState|<h3>Code state ([[Special:MyLanguage/Libs/Main#codeState|codeState]])</h3>}} | 1.4 || GPLv2 || * || en, uk, ru <section end=codeState /> | [[User:RomanSavochenko|Roman Savochenko]] |} [[File:LibsMainCodeStateOp.png|right|Result and the operative setup.]] A variant of [[#digitBlockUnif|the common, representative and unified template of the block for union of Discrete parameters]], expanded by more than two states and three commands that can be encoded by an integer value. The template forms a structure of parameter (complex tag) which can be easily connected to most widgets and cadres of [[Special:MyLanguage/Libs/Main_graphical_elements|the main elements library of the user interface]] just pointing the parameter object. * '''Sponsored by:''' Vinnica Poultry Farm The representative structure of the parameter (complex tag) of the code state is: * "State "Text" ('''st_text''')" — text description of the state. * "Command "Text" ('''com_text''')" — text of the command. * "Commands ('''digComs''')" — common list of the allowed commands, to form the selecting. * "Error ('''err''')" — obligatory attribute of any parameter, consist of the combination of the error code and short text description, like to "2:No data or connection with source". The template reserves next error codes: ** '''1''' — hardware errors, when the data mostly wrong. * "Violations suppress ('''alSup''') and delay ('''alDelay''')" — violations generic control for suppressing and delaying. Significant graphical shapes representing the structure: * [[Special:MyLanguage/Libs/Main_graphical_elements|Main elements library of the user interface]]: ** [[Special:MyLanguage/Libs/Main_graphical_elements#TextLab|Text label]] ** [[Special:MyLanguage/Libs/Main_graphical_elements#ImgLab|Image label]] ** [[Special:MyLanguage/Libs/Main_graphical_elements#ElCadr|Element cadre]] {{CntHdr|Functions}} * Direct receiving, by link, the status code and the command (read only), as well as setting the status text according to the list of states ''stats''. * Working out the text of the command ''com_text'' to find it in the general list ''coms'' of commands and issuing the received command code to the output. * Generating from the general list ''coms'' of commands the list of commands to be selected in ''digComs''. * Complex processing and complete generation-imitation of the code state, as well as processing the code or the command text for targeted actions, on the internal programming language of OpenSCADA into the configuration IO '''inProc''', where you can operate next service parameters: :* ''in'' [IN|OUT] — IO of the code state; :* ''text'' [OUT] — direct text status setting; :* ''coms'' [IN] — list of available commands, of the corresponded IO; :* ''com_text'' [IN|OUT] — text of the received command; :* ''levErr'', ''tErr'' [IN|OUT] — alarm level [-79...0] and text of the error (the attribute "err" format); :* ''f_frq'' [IN] — frequency of the calculation, the template IO; :* ''this'' [IN] — reference to the parameter object, what executing the template; :* ''ctx'' [IN] — object of the user context, what saved between the execution cycles. * Formation of the violation and the corresponding setting of the attribute '''err''', provided at setting in the processing procedure or lack of the communication (''in'' = EVAL). What can be delayed on the time '''alDelay''' and can be suppressed setting '''alSup'''. {{CntHdr|Template IOs}} {| class="wikitable" |- ! Identifier !! Name !! Type !! Mode !! Attribute !! Configuration !! Value |- | in || Input || Integer || Input || Read only || Link || Signal|in |- | out || Output || Integer || Output || Read only || Link || Signal|out |- | inProc || Input processing procedure || Text || Input || Not attribute || Constant || |- | alSup || Violations suppress || Boolean || Input || Full access || Variable || |- | alDelay || Violations delay, seconds || Real || Input || Full access || Variable || 0 |- | st_text || State "Text" || String || Input || Read only || Variable || |- | stats || States, rows "{code}:{State}" || Text || Input || Full access || Variable || |- | com_text || Command "Text" || String || Input || Full access || Variable || |- | coms || Commands-states, rows "{code}:{State}" || Text || Input || Full access || Variable || |- | digComs || Commands || Text || Input || Read only || Variable || |- | SHIFR || Code || String || Input || Not attribute || Variable || |- | NAME || Name || String (translate) || Input || Not attribute || Variable || |- | DESCR || Description || Text (translate) || Input || Not attribute || Variable || |- | this || Object || Object || Output || Not attribute || Variable || |- | f_err || Function error || String || Input || Not attribute || Variable || 0 |- | f_frq || Frequency of calculation of the function, Hz || Real || Input || Not attribute || Variable || 1000 |- | f_start || Function start flag || Boolean || Input || Not attribute || Variable || 0 |- | f_stop || Function stop flag || Boolean || Input || Not attribute || Variable || 0 |} [[File:LibsMainCodeStateCfg.png|right|Configuration.]] {{CntHdr|Configuring and using}} :1. Create and start [[Special:MyLanguage/Modules/LogicLev|a logical controller object]] or use any presented one with the needed scheduling properties. :2. Create [[Special:MyLanguage/Modules/LogicLev|a logical parameter object]] and select this template for it. Enable the parameter. :3. Into the tab "Template configuration" of the logical parameter object you need to set: :* ''Input'' and ''Output'' — [[Special:MyLanguage/Documents/DAQ#LogicLevLnks|link to a source of the "raw" signal]]. :* ''Input processing procedure'' — form for the processing and complete generation-imitation of the input, and issuing of the specific output, on the internal programming language of OpenSCADA. For example: ::* complete creation for the state code and alarms forming: <syntaxhighlight lang="JavaScript" style="margin-left: 40pt"> gO = this.cntr().prm_grps; if(gO.prm_fansControl.PRG_CntrFan_AutoMode_G1.get().isEVal()) in = 4; else { if(!(tVl=gO.prm_fansControl.PRG_CntrFan_Alarm_ThermalRelay.get()).isEVal() && tVl) levErr = -4, tErr = "11:alarm"; if(gO.prm_fansControl.PRG_CntrFan_AutoMode_G1.get()) in = gO.prm_fansControl.PRG_CntrFan_On_G1.get() ? 1 : 2; else in = 3; } </syntaxhighlight> ::* forming the clock time text and issuing the time synchronization — direct status text setting and issuing for specific commands: <syntaxhighlight lang="JavaScript" style="margin-left: 40pt"> curTm = SYS.time(); text = SYS.strftime(curTm, "%H։%M %d.%m.%Y"); gO = this.cntr().prm_grps; if(!(tVl=gO.prm_other.PRG_RTC_UNIX.get()).isEVal()) { text += " ("+(tVl-curTm).toString(10,0,true)+")"; } if(com_text.length && !com_text.isEVal() && (tVl=coms.match("^([^:]+):"+com_text,"m")).length && tVl[1] == 1) { gO.prm_other.SET_RTC_New_UNIX.set(curTm); gO.prm_other.KEY_RTC_set_time.set(true); } </syntaxhighlight> :4. RESULT: Launching the controller object (where this parameter is created) and if it has not been started, we must get the operational data in the tab "Attributes" for: input, output, code-input state, error status; and the generation of violations if the state of the error is nonzero. :5. In the process of the working, through the tab "Attributes" of operational data, in addition to obtaining the result, it is possible to perform operative control, performing the commands: :* ''States'' — set to list of accordance with its status code to text. :* ''Commands-states'' — set to list of accordance with its status-command code to text. :* ''Command "Text"'' — set in the command text, which is described in the command list, for the code conversion and issuance. :* ''Violations suppress'' — set at the need of the parameter violations complete suppression — to disable their generation in whole. :* ''Violations delay'' — set the delay time for the generation of the violations, to exclude frequent generation, characteristic to uncertain sources of data, characterized by short-term loss of communication. {| class="wikitable" <section begin=pidUnif /> | {{Anch|pidUnif|<h3>PID signal, unified, violation statuses ([[Special:MyLanguage/Libs/Main#pidUnif|pidUnif]])</h3>}} | 1.2 || GPLv2 || * || en, uk, ru <section end=pidUnif /> | [[User:RomanSavochenko|Roman Savochenko]] |} [[File:LibsMainPidUnifOp.png|right|Result and the operative setup.]] Common, representative and unified template of an interface to the Proportional Integral Differential (PID) regulator based on the common analog input signal, extended by binary states of indication the violations. The template forms a structure of the analog PID-regulator which can be easily connected to some cadres and widgets of [[Special:MyLanguage/Libs/Main_graphical_elements|the main elements library of the user interface]] just pointing the parameter object. * '''Sponsored by:''' [http://diyaorg.dp.ua DIYA Ltd] The representative structure of the analog PID-regulators is: * "Variable ('''var''')" — end variable of the parameter — engineeric real value, allowed and suitable for archiving. * "Error ('''err''')" — obligatory attribute of any parameter, consist of the combination of the error code and short text description, like to "2:No data or connection with source". The template reserves next error codes: ** '''1, 2''' — hardware errors, when the data mostly wrong; ** '''3, 4''' — alarm border errors; ** '''5, 6''' — warning border errors; ** '''7''' — the speed error of the variable changing. * "Violations suppress ('''alSup''') and delay ('''alDelay''')" — violations generic control for suppressing and delaying. * "Setpoint ('''sp''')" — setpoint for the analog signal value achievement in the automatic mode. * "Manual input ('''manIn''')" — attribute for entering a new output value, which in the next falls into the output at the manual mode. * "Output ('''out''')" — output (control signal) of the PID-regulator. * "Mode: automate ('''auto''')" — the PID-regulator mode "Automatic". * "Mode: cascade ('''casc''')" — the PID-regulator mode "Cascade". * "Scale: minimum ('''min''')" and "Scale: maximum ('''max''')" — main scale of the end variable, the output of which causes a hardware border error. The scale is also used as a scale of the variable trend display on the graphs. * "Logarithmic scale ('''log''')" — the scale sign of the variable trend display on the graphs in the logarithmic scale. * "Dimension ('''ed''')" — dimension (unit of measurement) of the variable. * "Precision ('''prec''')" — number signs after the dot, for positive values, and precision (signs in whole), for negative ones, to display the real end variable on the screen. Significant graphical shapes representing the structure: * [[Special:MyLanguage/Libs/Main_graphical_elements|Main elements library of the user interface]]: ** [[Special:MyLanguage/Libs/Main_graphical_elements#cntrRegul|Regulator's control panel]] ** [[Special:MyLanguage/Libs/Main_graphical_elements#ElCadr|Element cadre]] ** [[Special:MyLanguage/Libs/Main_graphical_elements#cntrPaspExt|Passport, extended]] * [[Special:MyLanguage/Libs/Mnemo_elements|Mnemonic elements library of the user interface]]: ** [[Special:MyLanguage/Libs/Mnemo_elements#analogApps|Analog apparatus]] {{CntHdr|Functions}} * Generic processing of the raw analog input for: :* simple correction-calibration at the formula "'''in''' = '''iMult'''*('''in'''+'''iAdd''')"; :* scaling from the hardware border ['''plcMin'''...'''plcMax'''] to the main border ['''min'''...'''max'''], applying the square scale '''scSqr'''; :* permission to exceed the border for the input value on the value of '''plcExcess''' percent; :* filtering the input value changing in the time '''Tf'''. * Simple imitation of the analog input, setting '''plcImit''' and linking the imitation-simulation source in '''plcImitIn'''. * Processing the result variable '''var''' for violation some borders and criteria, generating the alarms and proper setting the attribute '''err'''. The alarm borders can have some hysteresis '''HystBnd''', can be delayed on the time '''alDelay''' and can be suppressed setting '''alSup'''. Next borders and criteria are provided: :* missing for data or connection with source at the EVAL input value — error code 1 and alarm level 5; :* exceeding the input value of the hardware border — error code 1,2 and alarm level 5; :* exceeding the end variable of the alarm border ['''aMin'''...'''aMax'''] — error code 3,4 and alarm level 4; :: [[File:at.png]] Disabled at setting for equal or inverted values of the border :* exceeding the end variable of the warning border ['''wMin'''...'''wMax'''] — error code 5,6 and alarm level 2; :: [[File:at.png]] Disabled at setting for equal or inverted values of the border :* big motion '''speed''' of the end variable — error code 7 and alarm level 2. * Transmission of the PID-specific information, control and coefficient attributes to and from the PLC or other data source with the regulation. {{CntHdr|Template IOs}} {| class="wikitable" |- ! Identifier !! Name !! Type !! Mode !! Attribute !! Configuration !! Value |- | in || Input || Real || Input || Not attribute || Link || Signal|in |- | sp || Setpoint || Real || Input || Full access || Link || PID|sp |- | var || Variable || Real || Input || Read only || Variable || 0 |- | manIn || Manual input, % || Real || Input || Full access || Link || PID|manIn |- | out || Output, % || Real || Input || Full access || Link || PID|out |- | auto || Mode: automate || Boolean || Input || Full access || Link || PID|auto |- | casc || Mode: cascade || Boolean || Input || Full access || Link || PID|casc |- | ed || Dimension || String || Input || Full access || Variable || |- | min || Scale: minimum || Real || Input || Full access || Link || PID|min |- | max || Scale: maximum || Real || Input || Full access || Link || PID|max |- | scSqr || Scale: square || Boolean || Input || Full access || Variable || 0 |- | alSup || Violations suppress || Boolean || Input || Full access || Variable || 0 |- | alDelay || Violations delay, seconds || Real || Input || Full access || Variable || 0 |- | aMin || Border down alarm || Real || Input || Full access || Variable || 0 |- | aMax || Border up alarm || Real || Input || Full access || Variable || 0 |- | wMin || Border down warning || Real || Input || Full access || Variable || 0 |- | wMax || Border up warning || Real || Input || Full access || Variable || 0 |- | HystBnd || Hysteresis of borders violation || Real || Input || Full access || Variable || 0 |- | speed || Motion speed, %/cycle || Real || Input || Full access || Variable || 0 |- | prec || Precision, signs || Integer || Input || Full access || Variable || 2 |- | log || Logarithmic scale || Boolean || Input || Full access || Variable || 0 |- | H || Border up warning violation || Boolean || Output || Read only || Variable || 0 |- | L || Border down warning violation || Boolean || Output || Read only || Variable || 0 |- | HH || Border up alarm violation || Boolean || Output || Read only || Variable || 0 |- | LL || Border down alarm violation || Boolean || Output || Read only || Variable || 0 |- | EVAL || Value is error || Boolean || Output || Read only || Variable || 0 |- | Tf || Filter time, milliseconds || Real || Input || Full access || Variable || 0 |- | Kp || Gain || Real || Input || Full access || Link || PID|Kp |- | Ti || Ti, milliseconds || Integer || Input || Full access || Link || PID|Ti |- | Kd || Gain differential || Real || Input || Full access || Link || PID|Kd |- | Td || Td, milliseconds || Integer || Input || Full access || Link || PID|Td |- | Tzd || T differential lag, milliseconds || Integer || Input || Full access || Link || PID|Tzd |- | Zi || Insensitivity, % || Real || Input || Full access || Link || PID|Zi |- | Hup || Upper output border, % || Real || Input || Full access || Link || PID|Hup |- | Hdwn || Lower output border, % || Real || Input || Full access || Link || PID|Hdwn |- | K1 || Coefficient of input 1 || Real || Input || Full access || Link || PID|K1 |- | K2 || Coefficient of input 2 || Real || Input || Full access || Link || PID|K2 |- | K3 || Coefficient of input 3 || Real || Input || Full access || Link || PID|K3 |- | K4 || Coefficient of input 4 || Real || Input || Full access || Link || PID|K4 |- | iAdd || Input addition || Real || Input || Not attribute || Constant || 0 |- | iMult || Input multiplication || Real || Input || Not attribute || Constant || 1 |- | plcMin || Minimum module scale || Real || Input || Not attribute || Constant || 1 |- | plcMax || Maximum module scale || Real || Input || Not attribute || Constant || 5 |- | plcExcess || Allowed scale exceeding, % || Real || Input || Not attribute || Constant || 0 |- | plcImit || PLC imitation || Boolean || Input || Not attribute || Constant || 0 |- | plcImitIn || PLC imitation input || Real || Input || Not attribute || Link || Imitation|var |- | this || Object || Object || Output || Not attribute || Variable || |- | SHIFR || Code || String || Input || Not attribute || Variable || |- | NAME || Name || String (translate) || Input || Not attribute || Variable || |- | DESCR || Description || Text (translate) || Input || Not attribute || Variable || |- | f_frq || Frequency of calculation of the function, Hz || Real || Input || Not attribute || Variable || 1000 |- | f_start || Function start flag || Boolean || Input || Not attribute || Variable || 0 |- | f_err || Function error || String || Input || Not attribute || Variable || 0 |- | f_stop || Function stop flag || Boolean || Input || Not attribute || Variable || 0 |} [[File:LibsMainPidUnifCfg.png|right|Configuration.]] {{CntHdr|Configuring and using}} :1. Create and start [[Special:MyLanguage/Modules/LogicLev|a logical controller object]] or use any presented one with the needed scheduling properties. :2. Create [[Special:MyLanguage/Modules/LogicLev|a logical parameter object]] and select this template for it. Enable the parameter. :3. Into the tab "Template configuration" of the logical parameter object you need to set: :* ''Input'' — [[Special:MyLanguage/Documents/DAQ#LogicLevLnks|link to a source of the "raw" analog signal]]. :* ''Setpoint'', ''Manual input'', ''Output'', ''Mode: automate'', ''Mode: cascade'', ''Scale: minimum'', ''Scale: maximum'', ''Gain'', ''Ti'', ''Gain differential'', ''Td'', ''T differential lag'', ''Insensitivity'', ''Upper output border'', ''Lower output border'', ''Coefficient of input 1'', ''Coefficient of input 2'', ''Coefficient of input 3'', ''Coefficient of input 4'' — [[Special:MyLanguage/Documents/DAQ#LogicLevLnks|link to a source of the PID-regulator]]. :* ''Input addition and multiplication'' — use for easy and linear correction of the input, for example see the template "[[#anUnif|Analog signal, unified]]". :* ''Allowed scale exceeding'' — set if necessary to exceed the value of the main border, and when this scale starts to perform the recommendation function, say for the initial display of the trend on this scale. :* ''PLC imitation and the imitation input'' — define at the need to simulate the input as required in the functions. :4. RESULT: Launching the controller object (where this parameter is created) and if it has not been started, we must get the operational data in the tab "Attributes" for: variable, error status; and the generation of violations if the state of the error is nonzero. Also we will get all the PID-specific attributes. :5. In the process of the working, through the tab "Attributes" of operational data, in addition to obtaining the result, it is possible to perform operative setup and control on: :* ''Scale: minimum and maximum'' — strictly [[file:at.png]] set to the range of data changes by availability and according to the hardware border, otherwise the value will be distorted! :* ''Scale: square'' — set if the hardware border is square one. :* ''Filter time'' — set the filtering time for noisy signals. :* ''Violations suppress'' — set at the need of the parameter violations complete suppression — to disable their generation in whole. :* ''Violations delay'' — set the delay time for the generation of the violations, to exclude frequent generation, characteristic to uncertain sources of data, characterized by short-term loss of communication. :* ''Border up/down alarm/warning'' — set when it is necessary to generate violations at the exceeding of the alarm/warning borders. :* ''Hysteresis of borders violation'' — set the hysteresis of removing the violation, that is, removal of the violations occurs at the specified percentage later, in order to prevent the frequent generation by fluctuating the value near the border. :* ''Motion speed'' — set if it is necessary to warn about fast change of value. :* ''Name, Description, Dimension, Precision, Logarithmic scale'' — set this information as needed when displayed, or as an element of the passport. {| class="wikitable" <section begin=pidUnifImp /> | {{Anch|pidUnifImp|<h3>Impulse PID signal, unified, violation statuses ([[Special:MyLanguage/Libs/Main#pidUnifImp|pidUnifImp]])</h3>}} | 1.1 || GPLv2 || * || en, uk, ru <section end=pidUnifImp /> | [[User:RomanSavochenko|Roman Savochenko]] |} Common, representative and unified template of an interface to the Proportional Integral Differential (PID) regulator based on the common analog input signal but with the PWM-output, extended by binary states of indication the violations and mostly like to the template "[[#pidUnif|PID signal, unified, violation statuses]]". The template forms a structure of the impulse PID-regulator which can be easily connected to some cadres of [[Special:MyLanguage/Libs/Main_graphical_elements|the main elements library of the user interface]] just pointing the parameter object. * '''Sponsored by:''' [http://diyaorg.dp.ua DIYA Ltd] The representative structure of the impulse PID-regulators is mostly equal to the template "[[#pidUnif|PID signal, unified, violation statuses]]" and contains a number of attributes specific to the pulse output and the attribute of determining the operation of this regulator in the analog mode, that is, this template is even more generalizable: * "Impulse output up ('''impQup''')" and "Impulse output down ('''impQdwn''')" — signals of the PWM-output. * "Mode: analog ('''analog''')" — a sign of working the regulator in the analog output mode. {{CntHdr|Functions}} Mostly the same as the basic template "[[#pidUnif|PID signal, unified, violation statuses]]" and the impulse-specific attributes are additionally provided: "Impulse output up", "Impulse output down", "Mode: analog", "T impulses period", "T minimal impulse", "Impulse rate factor". {{CntHdr|Template IOs}} {| class="wikitable" |- ! Identifier !! Name !! Type !! Mode !! Attribute !! Configuration !! Value |- | colspan="7" | Template IOs of "[[#pidUnif|PID signal, unified, violation statuses]]" |- | impQup || Impulse output up || Boolean || Input || Read only || Link || PID|impQupTm |- | impQdwn || Impulse output down || Boolean || Input || Read only || Link || PID|impQdwnTm |- | analog || Mode: analog || Boolean || Input || Read only || Link || PID|analog |- | TImpPer || T impulses period, milliseconds || Integer || Input || Full access || Link || PID|TImpPer |- | TImpMin || T minimal impulse, milliseconds || Integer || Input || Full access || Link || PID|TImpMin |- | KImpRfact || Impulse rate factor || Real || Input || Full access || Link || PID|KImpRfact |} {{CntHdr|Configuring and using}} Mostly the same as the basic template "[[#pidUnif|PID signal, unified, violation statuses]]" with the difference of using the impulse specific output: "Impulse output up", "Impulse output down", "Mode: analog", "T impulses period", "T minimal impulse", "Impulse rate factor". == {{Anch|ComplexObject|Templates of the complex objects}} == In some cases where an object is only a part of a common automated system and does not require deep detailing to the level of signals and parameters (complex tag) around them, including without the need for archiving, it is convenient to unify them in one representative object of the data source OpenSCADA with appropriate consolidated view and object control as a set of simple attributes with violation elements. Such consolidation often occurs around specialised data sources, whose access to data is usually implemented through a separate exchanging protocol, but without unifying the transmission of this data to the level of visualisation and signalling by a separate attribute of the object. In general, the representative structure of a complex object is: * "All items ('''items''')" — common object-type attribute where the attributes of a physical object are directly described by object-type attributes in '''items''' and with defined descriptive attributes in each ** ''id'' — attribute identifier; ** ''descr'' — text description of the attribute; ** ''wr'' — a sign of the possibility of writing or a list of value variants to their selection, through the symbol ';'; ** ''alarm'' — violation code: *** 0 — no violation — "NORM"; *** 1 — violation level "WARNING"; *** 2 — violation level "ALARM"; ** ''val'' — attribute value; ** ''set'' — attribute value to set the attributes accessible to write. * "Error ('''err''')" — obligatory attribute of common violation status of the object in general, consist of the combination of the error code and short text description, like to "2:No data or connection with source". The template reserves next error codes: ** '''1''' — violation level "WARNING"; ** '''2''' — violation level "ALARM"; ** '''3''' — unreliability or lack of data. * "Violations suppress ('''alSup''') and delay ('''alDelay''')" — violations generic control for suppressing and delaying. Generally, it is advisable to create such template (a layer above the physical data source object) above a raw data source that provides this data in attributes and without processing, and this template therefore performs: * collection of these attributes of the raw source into '''items'''; * processing of properties of the attributes; * control and transmitting of commands of the values setting; * processing of the violation conditions at single attributes and at the object in whole, together with which these violations can be fixed in [[Special:MyLanguage/Documents/Program_manual#ArchMess|the table of actual violations]], typically by the [[Special:MyLanguage/Documents/User_API#SYS.DAQ|alarmSet() function]]. In addition to complex object templates, this object-control mechanism can be implemented by templates for implementing [[Special:MyLanguage/Documents/DAQ#LogicLev|the logical level of data access]], such as in [[Special:MyLanguage/Libs/Devices#IEC60870|IEC60870]]. To represent the data of the object-control mechanism, there currently provided the appropriate [[Special:MyLanguage/Libs/Main_graphical_elements#objProps|Object properties frame]], which provides these properties as a table-list with illumination of the violations and the possibility to change the selected and accessible to edit row-properties. {| class="wikitable" <section begin=UPS /> | {{Anch|UPS|<h3>Uninterruptible Power Supply ([[Special:MyLanguage/Libs/Main#UPS|UPS]])</h3>}} | 1.3 || GPLv2 || * || en, uk, ru <section end=UPS /> | [[User:RomanSavochenko|Roman Savochenko]] |} [[File:LibsMainUPSOp.png|right|Result and the operative setup.]] Data combination of the Uninterruptible Power Supply in a complex object of the attribute "All items". The template designed to use together with the DAQ-module "[[Special:MyLanguage/Modules/System|System]]" in the part "UPS" and to represent this data by the frame "[[Special:MyLanguage/Libs/Main_graphical_elements#objProps|Object properties]]" as a complex object with properties, signalling at single borders and writing. * '''Sponsored by:''' [http://diyaorg.dp.ua DIYA Ltd] {{CntHdr|Template IOs}} {| class="wikitable" |- ! Identifier !! Parameter !! Type !! Mode !! Attribute !! Configuration !! Value |- | srcAddr || Source object's address || String || Input || Not attribute || Constant || |- | alSup || Violations suppress || Boolean || Input || Full access || Variable || |- | alDelay || Violations delay, seconds || Real || Input || Full access || Variable || 0 |- | items || All items || Object || Output || Full access || Variable || |- | bChL || Battery charge low || Real || Input || Full access || Variable || 20 |- | bChLL || Battery charge critical || Real || Input || Full access || Variable || 5 |- | inVL || Input voltage low || Real || Input || Full access || Variable || 210 |- | inVH || Input voltage high || Real || Input || Full access || Variable || 250 |- | inFLL || Input frequency too low || Real || Input || Full access || Variable || 40 |- | inFL || Input frequency low || Real || Input || Full access || Variable || 45 |- | inFH || Input frequency high || Real || Input || Full access || Variable || 55 |- | inFHH || Input frequency too high || Real || Input || Full access || Variable || 60 |- | loadH || Load high || Real || Input || Full access || Variable || 80 |- | loadHH || Load too high || Real || Input || Full access || Variable || 100 |- | tH || Temperature high || Real || Input || Full access || Variable || 50 |- | tHH || Temperature too high || Real || Input || Full access || Variable || 70 |- | this || Object || Object || Input || Not attribute || Variable || |- | SHIFR || Code || String || Input || Not attribute || Variable || |- | NAME || Name || String (translate) || Input || Not attribute || Variable || |- | DESCR || Description || Text (translate) || Input || Not attribute || Variable || |- | f_stop || Function stop flag || Boolean || Input || Not attribute || Variable || 0 |- | f_frq || Frequency of calculation of the function, Hz || Real || Input || Not attribute || Variable || 1000 |- | f_err || Function error || String || Input || Not attribute || Variable || 0 |- | f_start || Function start flag || Boolean || Input || Not attribute || Variable || 0 |} [[File:LibsMainUPSCfg.png|right|Configuration.]] {{CntHdr|Configuring and using}} :1. Create a source controller object in the module "[[Special:MyLanguage/Modules/System|System]]" and set its identifier like to "SYSData". :2. Create a source parameter object in the previous controller object and set its identifier like to "UPS". :3. Create and start a [[Special:MyLanguage/Modules/LogicLev|logical controller object]] or use any presented one with the needed scheduling properties. :4. Create a [[Special:MyLanguage/Modules/LogicLev|logical parameter object]] and select the template for it. Enable the parameter. :5. In the tab "Template configuration" of the logical parameter object you need to set: :* ''Source object's address'' — to address of the source UPS parameter object (see to step 1) like to "System.SYSData.UPS". :6. RESULT: When running the controller object (where this parameter was created) and if it was not started, we must obtain in the parameter attribute ''items'' this object with all the attributes and their properties. In case of some violations, we will get the corresponding information in the attribute of the parameter ''err'', for which you can adjust the attributes of the boundaries of the corresponding violations. :7. In the visual interfaces developing of the module [[Special:MyLanguage/Modules/Vision|Vision]] place the frame "[[Special:MyLanguage/Libs/Main_graphical_elements#objProps|Object properties]]" to any page and link it to the parameter object, created in step 4. :8. RESULT: In runtime of the page you get a table with data of the object, notifications about violations in the header and the possibility to set of writable properties. {| class="wikitable" <section begin=SNMP /> | {{Anch|SNMP|<h3>Network devices by SNMP ([[Special:MyLanguage/Libs/Main#SNMP|SNMP]])</h3>}} | 1.1 || GPLv2 || * || en, uk, ru <section end=SNMP /> | [[User:RomanSavochenko|Roman Savochenko]] |} [[File:LibsMainSNMPOp.png|right|Result and the operative setup.]] Data combination of a device, accessible by the protocol SNMP, in a complex object of the attribute "All items". The template designed to use together with the DAQ-module "[[Special:MyLanguage/Modules/SNMP|SNMP]]" and to represent this data by the frame "[[Special:MyLanguage/Libs/Main_graphical_elements#objProps|Object properties]]" as a complex object with properties, signalling at single borders and writing. Considering the great specificity and variety of SNMP-accessible devices, this template is actually a billet and an example of creating a template based on it to a corresponding device with a specific to it processing of input properties, forming of violations and write capability. * '''Sponsored by:''' PAC HARTRON {{CntHdr|Template IOs}} {| class="wikitable" |- ! Identifier !! Parameter !! Type !! Mode !! Attribute !! Configuration !! Value |- | srcAddr || Source object's address || String || Input || Not attribute || Constant || |- | manTables || Manual tables || String || Input || Not attribute || Constant || |- | alSup || Violations suppress || Boolean || Input || Full access || Variable || |- | alDelay || Violations delay, seconds || Real || Input || Full access || Variable || 0 |- | items || All items || Object || Output || Full access || Variable || |- | this || Object || Object || Input || Not attribute || Variable || |- | SHIFR || Code || String || Input || Not attribute || Variable || |- | NAME || Name || String (translate) || Input || Not attribute || Variable || |- | DESCR || Description || Text (translate) || Input || Not attribute || Variable || |- | f_err || Function error || String || Input || Not attribute || Variable || 0 |- | f_start || Function start flag || Boolean || Input || Not attribute || Variable || 0 |- | f_stop || Function stop flag || Boolean || Input || Not attribute || Variable || 0 |- | f_frq || Frequency of calculation of the function, Hz || Real || Input || Not attribute || Variable || 1000 |} [[File:LibsMainSNMPCfg.png|right|Configuration.]] {{CntHdr|Configuring and using}} :1. Create a source controller object in the module "[[Special:MyLanguage/Modules/SNMP|SNMP]]" and set its identifier like to "SYSData". :2. Create a source parameter object in the previous controller object and set its identifier like to "DEV". :3. Create and start a [[Special:MyLanguage/Modules/LogicLev|logical controller object]] or use any presented one with the needed scheduling properties. :4. Create a [[Special:MyLanguage/Modules/LogicLev|logical parameter object]] and select the template for it. Enable the parameter. :5. In the tab "Template configuration" of the logical parameter object you need to set: :* ''Source object's address'' — to address of the source SNMP device parameter object (see to step 1) like to "SNMP.SYSData.DEV". :* ''Manual tables'' — enter manually some static MIB-variables. :6. RESULT: When running the controller object (where this parameter was created) and if it was not started, we must obtain in the parameter attribute ''items'' this object with all the attributes and their properties. In case of some violations, we will get the corresponding information in the attribute of the parameter ''err'', for which you can adjust the attributes of the boundaries of the corresponding violations. :7. In the visual interfaces developing of the module [[Special:MyLanguage/Modules/Vision|Vision]] place the frame "[[Special:MyLanguage/Libs/Main_graphical_elements#objProps|Object properties]]" to any page and link it to the parameter object, created in step 4. :8. RESULT: In runtime of the page you get a table with data of the object, notifications about violations in the header and the possibility to set of writable properties. {| class="wikitable" <section begin=DiskSMART /> | {{Anch|DiskSMART|<h3>Disk SMART ([[Special:MyLanguage/Libs/Main#DiskSMART|DiskSMART]])</h3>}} | 1.0 || GPLv2 || * || en, uk <section end=DiskSMART /> | [[User:RomanSavochenko|Roman Savochenko]] |} [[File:LibsMainDiskSMARTOp.png|right|Result and the operative setup.]] Data combination of the disk SMART in a complex object of the attribute "All items". The template designed to use together with the DAQ-module "[[Special:MyLanguage/Modules/System|System]]" in the part "Disk SMART" and to represent this data by the frame "[[Special:MyLanguage/Libs/Main_graphical_elements#objProps|Object properties]]" as a complex object with properties and signalling at common errors. Some SMART attributes can be unknown or wrong for specified disk due to their missing in the disks DB, especially for modern SSD, so the template provides a feature to redefine names the attributes. {{CntHdr|Template IOs}} {| class="wikitable" |- ! Identifier !! Parameter !! Type !! Mode !! Attribute !! Configuration !! Value |- | srcAddr || Source object's address || String || Input || Not attribute || Constant || |- | items || All items || Object || Output || Full access || Variable || |- | defs || Item definitions || Text || Input || Full access || Variable || |- | this || The object || Object || Input || Not attribute || Variable || |- | SHIFR || Code || String || Input || Not attribute || Variable || |- | NAME || Name || String || Input || Not attribute || Variable || |- | DESCR || Description || String || Input || Not attribute || Variable || |- | f_err || Function error || String || Input || Not attribute || Variable || 0 |- | f_start || Function start flag || Boolean || Input || Not attribute || Variable || 0 |- | f_stop || Function stop flag || Boolean || Input || Not attribute || Variable || 0 |- | f_frq || Frequency of calculation of the function, Hz || Real || Input || Not attribute || Variable || 1000 |} [[File:LibsMainDiskSMARTCfg.png|right|Configuration.]] {{CntHdr|Configuring and using}} :1. Create a source controller object in the module "[[Special:MyLanguage/Modules/System|System]]" and set its identifier like to "SYSData", set the property "Auto create active data sources" to "All sources" and start by setting "Running". :2. Create and start a [[Special:MyLanguage/Modules/LogicLev|logical controller object]] or use any presented one with the needed scheduling properties. :3. Create a [[Special:MyLanguage/Modules/LogicLev|logical parameter object]] and select the template for it. Enable the parameter. :4. In the tab "Template configuration" of the logical parameter object you need to set: :* ''Source object's address'' — to address of the source disk SMART parameter object like to "System.SYSData.DiskSMARTsda". :5. RESULT: When running the controller object (where this parameter was created) and if it was not started, we must obtain in the parameter attribute ''items'' this object with all the attributes and their properties. In case of some violations, we will get the corresponding information in the attribute of the parameter ''err''. :6. In the visual interfaces developing of the module [[Special:MyLanguage/Modules/Vision|Vision]] place the frame "[[Special:MyLanguage/Libs/Main_graphical_elements#objProps|Object properties]]" to any page and link it to the parameter object, created in step 3. :7. RESULT: In runtime of the page you get a table with data of the object, notifications about violations in the header and the possibility to redefine names of the SMART attributes. == Services == {| class="wikitable" <section begin=ntf /> | {{Anch|ntf|<h3>Notificator by SMS, EMail-SMTP ([[Special:MyLanguage/Libs/Main#ntf|ntf]])</h3>}} || 1.0 || GPLv2 || * => [[Special:MyLanguage/Modules/UserProtocol|UserProtocol]] || en, uk, ru <section end=ntf /> | [[User:RomanSavochenko|Roman Savochenko]] |} [[File:LibsMainNtfOp.png|right|Result and the operative setup.]] The complex template of the notification contains of parts of the dispatcher and the output user protocol of notification by EMail(SMTP) and SMS. * '''Total complexity:''' > 1.05 {{CtxDetails|HD|human-days, 1 HD — 10 hours}} * '''Sponsored by, for initial implementation the SMS-send part on 0.2 {{CtxDetails|HD|human-days, 1 HD — 10 hours}}:''' [[Special:MyLanguage/Using/HouseSpirit|Oleg Sidashov]] * '''Sponsored by, for unification, appending SMTP and the notification controller on 0.65 {{CtxDetails|HD|human-days, 1 HD — 10 hours}}:''' SVItoVYR Ltd '''THE DISPATCHER''' can be performed for pointed messages of the message buffer of OpenSCADA and applied on [[Special:MyLanguage/Documents/DAQ#LogicLev|the Logical level]] or the controller object of [[Special:MyLanguage/Modules/JavaLikeCalc|the module JavaLikeCalc]]. {{CntHdr|Template IOs}} {| class="wikitable" |- ! Identifier !! Name !! Type !! Mode !! Attribute !! Configuration !! Value |- | io || UserPrt: Output IO || Object || Input || Not attribute || Variable || |- | tr || UserPrt: Transport || Object || Input || Not attribute || Variable || |- | tmOut || Maximum notification timeout, seconds || Integer || Input || Not attribute || Constant || 5 |- | messLev || Messages level, negative for alarms || Integer || Input || Not attribute || Constant || 1 |- | messCat || Messages category, template or regular expression || String || Input || Not attribute || Constant || al*:* |- | messCatExcl || Message exclusion category, in regular expression || String || Input || Not attribute || Constant || |- | emailState || Email notification current state || String || Output || Read only || Variable || |- | emailTrAddr || Output transport for SMTP connection, empty for disable || String || Input || Not attribute || Constant || Sockets.out_SMTP |- | emailAuth || Auth, empty for disable || String || Input || Not attribute || Constant || user:pass |- | emailSender || Sender || String || Input || Not attribute || Constant || noreply@oscada.org |- | emailReceiver || Destination receiver address || String || Input || Not attribute || Constant || test@oscada.org |- | emailTopic || EMail topic || String || Input || Not attribute || Constant || Notification |- | emailMess || EMail message || String || Input || Not attribute || Constant || |- | SMSState || SMS notification current state || String || Output || Read only || Variable || |- | SMSTrAddr || SMS serial transport, empty for disable || String || Input || Not attribute || Constant || Serial.out_SMS |- | SMSPin || SMS-pin, empty for disable || String || Input || Not attribute || Constant || 1111 |- | SMSTel || SMS destination receiver, tel. number || String || Input || Not attribute || Constant || +380XXXXXXXXX |- | SMSTextMd || SMS in the text mode, else PDU || Boolean || Input || Not attribute || Constant || 0 |- | f_frq || Frequency of calculation of the function, Hz || Real || Input || Not attribute || Variable || 1000 |- | f_start || Function start flag || Boolean || Input || Not attribute || Variable || 0 |- | f_err || Function error || String || Input || Not attribute || Variable || 0 |- | f_stop || Function stop flag || Boolean || Input || Not attribute || Variable || 0 |} [[File:LibsMainNtfCfg.png|right|Configuration.]] {{CntHdr|Configuring and using}} :1. Create a parameter in a controller object of [[Special:MyLanguage/Documents/DAQ#LogicLev|the Logical Level]] or a controller object in [[Special:MyLanguage/Modules/JavaLikeCalc|the module DAQ.JavaLikeCalc]]. :2. Create an output transport of the type "[[Special:MyLanguage/Modules/Serial|Serial]]" and set its Identifier like to "SMS", one transport suitable for more receivers. :3. Set for proper address, only for the [[Special:MyLanguage/Modules/Serial|Serial]] device. The serial port speed, asynchronous data format and timeouts will adjusted by the function. :4. Create an output transport of the type "[[Special:MyLanguage/Modules/Sockets|Sockets]]" or "[[Special:MyLanguage/Modules/SSL|SSL]]" and set its Identifier like to "SMTP", one transport suitable for more receivers. :5. Set-up for proper address, for Sockets(25) or SSL(465). The transport timeouts will be adjusted by the function. :6. In the tab "Template configuration" you need to set: :* Maximum notification timeout, seconds. :* Messages level, negative for alarms. :* Messages category, template or regular expression. :* Message exclusion category, in regular expression. :* Output transport for SMTP connection, empty for disable. :* Auth, empty for disable. :* Sender. :* Destination receiver address. :* EMail topic. :* EMail message. :* SMS serial transport, empty for disable. :* SMS-pin, empty for disable. :* SMS destination receiver, tel. number. :* SMS in the text mode, else PDU. :7. RESULT: Sending for the pointed messages at SMS or EMail(SMTP). '''THE OUTPUT USER PROTOCOL PART "SMS"''' provides operations with SMS by a GSM-modem connected as serial device. For now, there supported only sending SMS messages to a number of remote cell phone or GSM-modem. For sending there are supported: ECHO disable, PIN check and set, sending in PDU and the Text mode.<br/> {{CntHdr|Output user protocol's XML-request structure}} '''<cmd pin="1111" tel="+380XXXXXXXXX" text="{0|1}" err="1:Error">{SMSText}</cmd>''' :''cmd'' — command, for now only "send" allowed; :''pin'' — PIN-code to the SIM-card access; :''tel'' — telephone number of the receiver (remote cell phone or GSM-modem); :''text{0,1}'' — SMS in the text mode, only ASCII; :''SMSText'' — the message text; :''err'' — sets for the request result. {{CntHdr|Configuring and using}} :1. Create an output transport of the type "[[Special:MyLanguage/Modules/Serial|Serial]]" and set its Identifier like to "SMS", one transport suitable for more receivers. :2. Set for proper address. The serial port speed, asynchronous data format and timeouts will adjusted by the function. :3. Create of needed [[Special:MyLanguage/Modules/UserProtocol|user protocol object]] based on the templates, with Identifier like to "SMS". :4. Place some requesting commands directly into presented or a new internal OpenSCADA-procedure like to: <syntaxhighlight lang="JavaScript" style="margin-left: 30pt"> req = SYS.XMLNode("send"); req.setAttr("ProtIt","SMS").setAttr("pin","1111").setAttr("tel","+380XXXXXXXXX").setText("Notify message"); SYS.Transport.Serial.out_SMS.messIO(req, "UserProtocol"); rez = req.attr("err").toInt() ? req.attr("err") : "OK"; </syntaxhighlight> :5. RESULT: In the variable ''rez'' you will get "OK" if no errors occur and the message successfully transmitted to the receiver. '''THE OUTPUT USER PROTOCOL PART "SMTP"''' provides operations with a SMTP-server for delivering EMails by their sending through TCP-Socket or SSL. For now, there are supported: TCP, SSL, AUTH, topic encoding for UTF-8.<br/> {{CntHdr|Output user protocol's XML request structure}} '''<send auth="{user}:{pass}" from="{FromAddr}" to="{ToAddr}" topic="{My Topic}" err="1:Error">{MessageText}</send>''' :''topic'' — topic of the message; :''from'' — sender address; :''to'' — destination address of the receiver; :''auth'' — authenticate user and password; :''MessageText'' — text of the message; :''err'' — sets for the request result. {{CntHdr|Configuring and using}} :1. Create an output transport of the type "[[Special:MyLanguage/Modules/Sockets|Sockets]]" or "[[Special:MyLanguage/Modules/SSL|SSL]]" and set its Identifier like to "SMTP", one transport suitable for more receivers. :2. Set-up for proper address, for Sockets(25) or SSL(465). The transport timeouts will be adjusted by the function. :3. Create of needed [[Special:MyLanguage/Modules/UserProtocol|user protocol object]] based on the templates, with Identifier like to "SMTP". :4. Place some requesting commands directly into allowed or a new internal OpenSCADA procedure like to: <syntaxhighlight lang="JavaScript" style="margin-left: 30pt"> req = SYS.XMLNode("send"); req.setAttr("ProtIt","SMTP").setAttr("from","noreply@oscada.org").setAttr("to","oscada@oscada.org").setAttr("topic","My topic").setText("My message"); SYS.Transport.Sockets.out_SMTP.messIO(req, "UserProtocol"); rez = req.attr("err").toInt() ? req.attr("err") : "OK"; </syntaxhighlight> :5. RESULT: In the variable ''rez'' you will get "OK" if no errors occur and the message successfully transmitted to the receiver. {| class="wikitable" <section begin=initConAssociateTrs /> | {{Anch|initConAssociateTrs|<h3>Initiative connections processing for the associated output transports ([[Special:MyLanguage/Libs/Main#initConAssociateTrs|initConAssociateTrs]])</h3>}} | 1.2 || GPLv2 || * || en, uk, ru <section end=initConAssociateTrs /> | [[User:RomanSavochenko|Roman Savochenko]] |} [[File:LibsMainInitConsAssignTrsOp.png|right|Result and the operative setup.]] The template of processing input initiative connections was created to provide the last link of implementation and support for [[Special:MyLanguage/Documents/DAQ#PassiveAndInitiative|conception of data acquisition in the passive mode and the initiative connection]], that is — the control of associative connections, created by the input transport at each connection. [[file:at.png]] After implementation this control together the new common-unified output transport connection function [[Special:MyLanguage/Documents/User_API#SYSTransport|outAt()]] that template became deprecated for sources adapted to use the new mechanism, but you still can use the template for not adapted sources. The function of creation associated output transports at connections is currently only supported by [[Special:MyLanguage/Modules/Sockets|the module "Sockets"]] and for TCP-sockets. * '''Total complexity:''' 0.9 {{CtxDetails|HD|human-days, 1 HD — 10 hours}} * '''Sponsored by, for whole complexity:''' Elyor Turaboev, BLUE STAR GROUP Ltd The control of associated transport means: * obtaining a list of the associated transports, by the function ''assignTrsList()'' of the input transports; * reading from new transports (opened) of identification information, which currently represents only the source object identifier; ** search, by the received identifier, the source object and assigning to it of this transport; ** registering in the attribute "prcTr" of the object type. * checking of existing transports for their closure (detachment), for which performed the deregistration in the attribute "prcTr" of the object type and the establishment of the source object in the empty value; disconnected output associated transports are reused by the input one upon receiving a new connection then it is switched on. The template can control the containers of data source objects, constructed both as DAQ-objects of the controllers and logical level parameters, what representing the data source and having a transport address definition field, and what generally defined by the configuration field "srcObjPath" of the format '''{CntrAddr}:{TrCntrFldAddr}''', where: * ''CntrAddr'' — container address, for example: "ModBus" — for DAQ-objects of the controllers, "LogicLev.CntrPLC" — for logical level parameters; * ''TrCntrFldAddr'' — address of the transport control field in the source object, for example — "%2fcntr%2fcfg%2fADDR" for "ModBus"; what can be obtained in a configurator at the history of pointing on the control field in the status line. {{CntHdr|Template IOs}} {| class="wikitable" |- ! Identifier !! Name !! Type !! Mode !! Attribute !! Configuration !! Value |- | inTransport || Input transport || String || Input || Not attribute || Constant || InitiateCons |- | outTrTm || Output transport timeouts || String || Input || Not attribute || Constant || 10:0.1 |- | srcObjPath || Source object path || String || Input || Not attribute || Constant || ModBus:%2fcntr%2fcfg%2fADDR |- | prcTr || Processed transports || Object || Output || Read only || Variable || |- | f_err || Function error || String || Input || Not attribute || Variable || 0 |- | f_start || Function start flag || Boolean || Input || Not attribute || Variable || 0 |- | f_stop || Function stop flag || Boolean || Input || Not attribute || Variable || 0 |- | f_frq || Frequency of calculation of the function, Hz || Real || Input || Not attribute || Variable || 1000 |} [[File:LibsMainInitConsAssignTrsCfg.png|right|Configuration.]] {{CntHdr|Configuring and using}} :1. Create an input transport of receiving the initiative connections of [[Special:MyLanguage/Modules/Sockets#InTr|the module "Sockets"]] with the name like to "InitiateCons". :2. Set the previously created transport to the needed address of opening the input socket and move it to the mode of creating the associative output transports, leaving the protocol field in empty. :3. Provide a container of the data sources to which associative transports must be connected, which can be either a DAQ-module (such as "DAQ.ModBus"), or a logical controller (such as "DAQ.LogicLev.Sources"), or a parameter in it (such as "DAQ.LogicLev.PLC.Sources"), with logical level parameters representing the data source. :4. For this template create and run a [[Special:MyLanguage/Modules/LogicLev|logical controller object]] or use any available with the required scheduling properties. :5. Create a [[Special:MyLanguage/Modules/LogicLev|logical parameter object]] and select this template for it. Enable the parameter. :6. In the tab "Template configuration" of the logical parameter object you need to set: :* ''Input transport'' — to value of the identifier of the input transport, created in the item 1, like to "InitiateCons; :* ''Output transport timeouts'' — increase the first digit for very slow connections and typical is normal in most situations :* ''Source objects path'' — set according to the item 3, for the first part, and to the control field path, for the second part, for example, and typically for for "ModBus", is — "ModBus:%2fcntr%2fcfg%2fADDR". :6. RESULT: Starting the controller object (where this parameter was created) and when it was not started, we should get, in the attribute ''prcTr'' of the parameter for information about the processed and therefore successfully transport-linked data sources. In case of some violations, we will get the corresponding information in the attribute ''err'' of the parameter. The absence of a representative object for the received identifier is placed in the protocol of messages. {| class="wikitable" <section begin=weather /> | {{Anch|weather|<h3>Weather ([[Special:MyLanguage/Libs/Main#weather|weather]])</h3>}} | 1.0 || GPLv2 || * || en, uk <section end=weather /> | [[User:RomanSavochenko|Roman Savochenko]] |} [[File:LibsMainWeatherOp.png|right|Result and the operative setup.]] The template of acquiring weather data from different weather services in Internet and initially it is only [https://openweathermap.org/ Open Weather]. The weather data divided on current and forecast with their placing in corresponded objects, where current attributes placed directly in the root and forecast days (the "day" object) and times (the "time" object) inwardly corresponded day according to the current timezone. These data acquired at specified schedule independently for current and forecast, and by default the current ones are performed per hour when forecast ones per day. The data can be accessible by user both as directly and through a specially created widget of the [[Special:MyLanguage/Libs/Main_graphical_elements#weather|main library]]. {{CntHdr|Template IOs}} {| class="wikitable" |- ! Identifier !! Name !! Type !! Mode !! Attribute !! Configuration !! Value |- | schedCur || Scheduling at CRON of current update || String || Input || Not attribute || Constant || 0 8-20 * * * |- | schedFC || Scheduling at CRON of forecast update || String || Input || Not attribute || Constant || 0 8 * * * |- | city || City ID || String || Input || Full access || Variable || 709932 |- | current || Current || Object || Input || Read only || Variable || |- | forecast || Forecast || Object || Input || Read only || Variable || |- | this || Parameter || Object || Input || Not attribute || Variable || 0 |- | f_start || Function start flag || Boolean || Input || Not attribute || Variable || 0 |- | f_frq || Frequency of calculation of the function, Hz || Real || Input || Not attribute || Variable || 1000 |- | f_stop || Function stop flag || Boolean || Input || Not attribute || Variable || 0 |- | f_err || Function error || String || Input || Not attribute || Variable || 0 |} [[File:LibsMainWeatherCfg.png|right|Configuration.]] {{CntHdr|Configuring and using}} :1. For this template create and run a [[Special:MyLanguage/Modules/LogicLev|logical controller object]] or use any available with the required scheduling properties. :2. Create a [[Special:MyLanguage/Modules/LogicLev|logical parameter object]] and select this template for it. Enable the parameter. :3. In the tab "Template configuration" of the logical parameter object you need to set: :* ''Scheduling at CRON of current update'' — to value of need scheduling for current data acquiring in the [[Special:MyLanguage/Documents/User_API#CRON|CRON format]], at empty the acquiring will be performed with period of execution the controller object; :* ''Scheduling at CRON of forecast update'' — to value of need scheduling for forecast data acquiring in the [[Special:MyLanguage/Documents/User_API#CRON|CRON format]], at empty the acquiring will be performed with period of execution the controller object. :4. RESULT: Starting the controller object (where this parameter was created) and when it was not started, we should get the weather data in the attribute ''Current (current)'' and ''Forecast (forecast)'' and after setting your city code in the corresponded attribute. City code you can obtain from the [https://openweathermap.org/ official site] in the URL after searching your city in the site form. == [[Special:MyLanguage/Modules/WebUser|For WebUser]] == {| class="wikitable" <section begin=fileServerHTTP /> | {{Anch|fileServerHTTP|<h3>WebUser: HTTP File Server ([[Special:MyLanguage/Libs/Main#fileServerHTTP|fileServerHTTP]])</h3>}} | 1.1 || GPLv2 || * || en, uk <section end=fileServerHTTP /> | [[User:RomanSavochenko|Roman Savochenko]] |} The template for implementing a HTTP File Server directly in OpenSCADA, which is suitable one at missing a full-featured one for functions of servicing file requests from OpenSCADA Web-interfaces. Currently there implemented only requesting files by the GET request of HTTP. There are supported also chunks and the Partial Content requests in single range and with forcing to this mode at some configured file size. {{CntHdr|Template IOs}} {| class="wikitable" |- ! Identifier !! Name !! Type !! Mode !! Attribute !! Configuration !! Value |- | rez || Result || String || Input || Not attribute || Variable || 200 OK |- | HTTPreq || HTTP request || String || Input || Not attribute || Variable || |- | url || URL || String || Input || Not attribute || Variable || |- | sender || Sender || String || Input || Not attribute || Variable || |- | page || WWW-page || String || Output || Not attribute || Variable || |- | HTTPvars || HTTP variables || Object || Output || Not attribute || Variable || |- | baseD || Base directory || String || Input || Not attribute || Constant || /data/share_res/local/Lib/ |- | fSzSolidLim || File size limit for solid reading, else enables the partial content || Real || Input || Not attribute || Constant || 10e6 |- | tr || Transport || Object || Output || Not attribute || Variable || |- | prt || Protocol || Object || Output || Not attribute || Variable || |- | f_start || Function start flag || Boolean || Input || Not attribute || Variable || 0 |- | f_frq || Frequency of calculation of the function, Hz Real || Input || Not attribute || Variable || 1000 |- | f_stop || Function stop flag || Boolean || Input || Not attribute || Variable || 0 |- | f_err || Function error || String || Input || Not attribute || Variable || 0 |} [[File:LibsMainFileServerHTTPCfg.png|right|Configuration.]] {{CntHdr|Configuring and using}} :1. Create a page in the [[Special:MyLanguage/Modules/WebUser|UI.WebUser]] module with some reasonable ''PageId''. :2. In the tab "Procedure" you need to set: :* Base directory from which the page'll search files. :* File size limit for solid reading, else enables the partial content. :3. RESULT: Opening URL "<nowiki>http://{OpenSCADAHost}/WebUser/{PageId}/{MyFile}</nowiki>" in a WebBrowser will open and send you file on FS "{baseD}/{MyFile}".
Navigation menu
OpenSCADA
Site
Download
Old Wiki
OpenSCADA Wiki
Home
About OpenSCADA
Functions and demands
Tasks
Using
Fund
Recent changes
Random page
Search
Tools
Special pages
Printable version
MediaWiki
Help
Personal tools
English
Log in