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:Libs/Prescriptions}}<languages/> {| class="wikitable" |- ! Name !! Version !! License !! Source !! Languages !! Author !! Icon !! Description |- <section begin=info /> | [[Special:MyLanguage/Libs/Prescriptions|Prescriptions]] | 1.1, 1.1 || GPLv2 || OscadaLibs.db ([http://oscada.org/svn/trunk/OpenSCADA/data/LibsDB/OscadaLibs.sql SQL], [[:File:OscadaLibs.db.gz|GZip]]) > DAQ.tmplb_PrescrTempl<br/> vcaBase.db ([http://oscada.org/svn/trunk/OpenSCADA/data/LibsDB/vcaBase.sql SQL], [[:File:vcaBase.db.gz|GZip]]) > VCA.wlb_prescr | en, uk, ru <section end=info /> | [[User:RomanSavochenko|Roman Savochenko]] || [[file:LibPrescriptions.png]] | Library of elements of scenarios of the technological operations — prescriptions. * '''Founded:''' September 2011 * '''Sponsored by:''' Vassily Grigoriev, [http://e-beam.ru the Laboratory of Vacuum Technologies] * '''Sponsored by, about the controller templateization:''' Magomed, [https://www.savtech.ru SAVTECH] * '''Initially created:''' in [http://wiki.oscada.org/HomePageEn/Using/GraphicElementsLibraries/MainElements the old Wiki] * '''Used by:''' [[Special:MyLanguage/Using/Vacuum_processing_unit|Automated control system for vacuum processing unit]] * '''[[Special:MyLanguage/Works/To_do|To Do]]:''' <section begin=ToDo /> :- move [[#GraphPart|the graphical part]] items to all work through [[#manager|the prescription manager]], for the possibility to distribute the parts remotely. <section end=ToDo /> |} The library is created to provide an environment of execution of scenarios of the technological operations — prescriptions, and frames of the user interface about them, including [[#prescrEdit|the frame of creation/edition the prescriptions]] and two frames of the execution control and reporting — "[[#prescrRun|Prescription — run]]" and "[[#prescrRunSimple|Prescription — run, simple]]". The library is built on the basis [[Special:MyLanguage/Modules/VCAEngine#WidgetPrimitives|primitives of the widgets]] and the internal programming language [[Special:MyLanguage/Modules/JavaLikeCalc|JavaLikeCalc]], including templates and commands. The element's names and their parameters are available in languages: English, Ukrainian and mRussian. Their source code wrote in human-language independent mode with calls for the translations by the function ''tr()'' and the message's translation also allowed for English, Ukrainian and mRussian. == {{Anch|Conception|Conception}} == The scenario of technological operations — prescription, is a sequentially call of the function's blocks — commands, which taking up to five arguments and return string with the result code at the begin: "Working (0)", "Finished (>0)" and "Error (<0)". Calling the step command is made in a loop until the "Working (0)" result is returned. Jump to the next step is made in the case of the "Finished (>0)" result and the command "Pass (2)". In the case of an error, the "Error (<0)" result, the prescription execution is terminated. The commands sequence, by the user of the final interface, are formed on [[#prescrEdit|the frame of creation/editing]] and are controlled for their execution on the frame "[[#prescrRun|Prescription — run]]" and "[[#prescrRunSimple|Prescription — run, simple]]", when, the prescriptions data is stored in the programs-prescriptions DB table. The prescriptions-programs table is placed into the accessible OpenSCADA specific configuration database, as an example, currently such table is placed in the library database as "'''PrescrProgs = (<u>name</u>, prgTxt)'''", where: * ''name'' — the prescription-program name; * ''prgTxt'' — the program text as an XML-tree. The prescriptions-programs XML-tree starts with the "prg" tag that contains the command end tags "com" with attributes: * ''id'' — identifier-name-type of the command in the step base; * ''name'' — personal name of the step, may be missing; * ''descr'' — personal description of the step, taken from the appropriate field of the command and may be missing; * ''backgrnd'' — sign of the step execution in the background, or a series of steps with that sign; * ''arg{N}'' — user defined values of the arguments from 1 to 5. For example, for a four-step prescription we will have: <syntaxhighlight lang="XML" style="margin-left: 20pt;"> <prg> <com arg1="10" id="Timer" /> <com arg1="10" id="Vacuum" /> <com arg1="20" id="Timer" /> <com arg1="34" id="Enable coils" /> </prg></syntaxhighlight> The prescription execution making through the [[#manager|prescription manager's]] parameter, which support two modes of the prescription commands execution: * '''command-parameter''' — are placed as parameters of the [[Special:MyLanguage/Documents/DAQ#LogicLev|logical controller]] and given their context, if the logical controller specified in the prescription manager; * '''command-macro''' — directly into the prescription manager object, by commands stored into the table "PrescrComs". {{CntHdr|The execution mode "command-parameter"}} The commands-parameters of the logical level are formed by the programmer of SCADA-system under the specific application area as [[Special:MyLanguage/Documents/Program_manual#DAQTmpl|templates of parameters of the subsystem "Data acquisition"]], which next used into the logical controller of the prescriptions, include series of mandatory, service and internal attributes: * ''rez'' — command: result the execution; the command should return a string of the view "'''{rezCode}:{TextMess}'''", where ''rezCode'' has states: ** '''<0''' — error; ** '''=0''' — running; ** '''>0''' — running finished; ** '''=10''' — running into the background with the indication to update the running state. * ''run'' — command: execution; * ''pause'' — command: pause the execution, can be paused itself by setting that attribute to TRUE; * ''start'' — prescription: start; * ''stop'' — prescription: correct finish; * ''error'' — prescription: prescription finish by error; * ''abort'' — prescription: execution abort by operator; * ''arg{1...5}'' — arguments 1...5, into the argument name you can set the minimal and maximal borders of the numerical value as "'''{name}|{min}|{max}'''". A specific of using commands-parameters is their independent execution and the ability to leave the execution of a number of commands in the background, such as regulators. These commands can also be directly connected to a data source through links, or even implemented in the same template-parameter. [[file:at.png]] This mode is now the main one, and it has implemented many mechanisms of interaction with visualization and control frames, which may not work or work erroneously with the old "command-macro" mode! {{CntHdr|The execution mode "command-macro" (old)}} The commands-macros, which user can choose during the formation of a prescription-program, are formed by the programmer of SCADA-system under the specific application area by editing a commands table in OpenSCADA. The commands table is placed into the accessible OpenSCADA specific configuration database, as an example, currently such table is placed in the library database as "'''PrescrComs = (<u>name</u>, proc, arg1, arg2, arg3, arg4, arg5)'''", where: * ''name'' — the command name; * ''proc'' — text of the command procedure, in the first line it contains the program language name, at the moment it is "JavaLikeCalc.JavaScript", and the program text directly after the language; in the command procedure the following context parameters are available: ** ''rez'' — result of the command execution, by default it returns "Work" ("0:Waiting now for ..."); ** ''f_start'' — sign of the first procedure execution; ** ''f_frq'' — frequency of the procedure periodic executions; ** ''arg{1...5}'' — argument's 1..5 value; ** ''tmp{1...10}'' — temporary parameter's (the execution context) 1...10 value; ::An example of the program code for the "Timer" command, which does not depend on the application area: <syntaxhighlight lang="JavaScript" style="margin-left: 40pt;"> JavaLikeCalc.JavaScript if(f_start) tmp1 = arg1; var curTm = tmp1.toReal(); if(curTm <= 0) { rez = "1:Waiting is elapsed for "+arg1+"s"; return; } curTm -= 1/f_frq; tmp1 = max(0, curTm); rez = "0:Waiting now for "+curTm+"s";</syntaxhighlight> * ''arg{1...5}'' — label of the 1..5 argument, only arguments with the label will be displayed when editing the prescription step; into the label you can set the minimum and maximum borders of the numeric values of the argument into the format "'''{Label}|{min}|{max}'''". The several command names are reserved for the special purposes: * "Error" — is called after an error at execution the prescription step; * "Stop" — is called on stopping the prescription, on successful prescription finish and on forced termination by the user. == Part of processing and executing == The section contains [[Special:MyLanguage/Documents/Program_manual#DAQTmpl|DAQ-templates]] of the prescription manager and commands of the "command-template" mode, which are intended to be connected to the logic level controller, by creating related parameters of the prescription manager and commands, which available for the user to choose from, and which will carry out all the work with the prescriptions-programs for their processing and execution. For connection the library part to a project of the OpenSCADA station you can obtain the database file as: * supplied with a ready and proper package of the Linux distribution like to "openscada-libdb-main", "openscada-LibDB.Main"; * directly taken for most actual one from [http://oscada.org/svn/trunk/OpenSCADA/data/LibsDB/OscadaLibs.sql the subversion repository] and converted to the DB SQLite file in the way: <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> * downloaded for [[:File:OscadaLibs.db.gz|the one attached here]]. This obtained file next you can place into the project directory of the station and create the database object for the DB module "SQLite", registering the database file in the configuration. {| class="wikitable" <section begin=manager /> | {{Anch|manager|<h3>Prescriptions manager ([[Special:MyLanguage/Libs/Prescriptions#manager|manager]])</h3>}} | 2.2 || GPLv2 || * || en, uk, ru <section end=manager /> | [[User:RomanSavochenko|Roman Savochenko]] |} [[File:LibsPrescriptionsManagerOp.png|right|Result and the operative setup.]] Basic, representative and unified template of a manager and a controller of the prescriptions, of their processing and direct execution in the "command-macro" mode. The template forms a structure of the prescription manager parameter which can be easily connected to all frames of this library. The representative structure of the prescription manager is: * "DB: DB name with the tables ('''dbDB''')" — DB, like to "SQLite.vcaBase", where stored or must be stored the prescription-program tables. * "DB: Table with programs ('''dbProgs''')" — name of the prescriptions-programs table, typically "PrescrProgs". * "Commands list ('''comLs''')" — the allowed to use commands list. * "Name of the selected program ('''prog''')" — state and setting of the selected program name in processing by the manager. * "Mode ('''mode''')", "Current mode ('''curMode''')" — the setting and the current manager mode of the selected prescription-program execution: Finish(-2), Error(-1), Stop(0), Run(1), Pause(2), Pass command(3). * "Start time ('''startTm''')" — the start time in seconds. * "Current command-step ('''curCom''')" — the currently processing command. * "Work program ('''work''')" — the actual and processing now program in an object. {{CntHdr|Functions}} * Forms the "Commands list ('''comLs''')", allowed to use in the user prescriptions-programs. * Process the "Name of the selected program ('''prog''')", modifying it will either load its command sequence to the "Work program ('''work''')" or create a new program. * Execute the program in the "Name of the selected program ('''prog''')" after receiving the command "Run(1)" in the "Mode ('''mode''')" and indicate this process in: the "Current mode ('''curMode''')", the "Start time ('''startTm''')", the "Current command-step ('''curCom''')" and the "Work program ('''work''')". * Generate the action messages during the prescription execution for: : CATEGORY: defines the user prescription-program ID ''ProgNM'' in the form "'''uprg{ProgNM}'''", where: :* "uprg*" — the typical template-sign of a user prescription-program, that can be directly used in the category filter to determine in the messages only the user prescriptions-programs; :* ''ProgNM'' — the prescription-program name. : TEXT: the action description in the form "'''{ActDescr} "{ProgNM}" : {StartTm} : {ActTm}'''", where: :* ''ActDescr'' — the action description: ::* "No current node present"; ::* "Terminated program session by the user"; ::* "Terminated program session by the error"; ::* "Successful session of the program". :* ''ProgNM'' — the prescription-program name; :* ''StartTm'' — start time of the prescription-program, in the form "2020-03-14 16:05:01"; :* ''ActTm'' — action time of the prescription-program, in the form "2020-03-14 16:05:52". {{CntHdr|Template IOs}} {| class="wikitable" |- ! Identifier !! Name !! Type !! Mode !! Attribute !! Configuration !! Value |- | dbDB || DB: DB name with the tables || String || Input || Read only || Constant || |- | dbComs || DB: Table with commands || String || Input || Not attribute || Constant || PrescrComs |- | dbProgs || DB: Table with programs || String || Input || Read only || Constant || PrescrProgs |- | comsCntr || Commands controller, <empty> - for commands into the table,<br/> '*' - this parameter's controller | String || Input || Not attribute || Constant || * |- | mode || Mode || Integer numbers selection || Input || Full access || Variable || -2 -2;-1;0;1;2;3 Finish;Error;Stop;Run;Pause;Pass com |- | curMode || Current mode || Integer numbers selection || Input || Read only || Variable || -2 -2;-1;0;1;2;3 Finish;Error;Stop;Run;Pause;Pass com |- | prog || Name of the selected program || String || Input || Full access || Variable || |- | startTm || Start time, seconds || Integer || Input || Read only || Variable || |- | curCom || Current command-step || String || Input || Read only || Variable || |- | work || Work program || Object || Input || Read only || Variable || |- | comLs || Commands list || Object || Input || Read only || Variable || |- | clcCnt || Cycles counter || Integer || Input || Not attribute || Variable || |- | this || The 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:LibsPrescriptionsManagerCfg.png|right|Configuration.]] {{CntHdr|Configuring and using}} :1. Create and start [[Special:MyLanguage/Modules/LogicLev|a logical controller]] object with the needed scheduling properties. :*['''JavaLikeCalc'''] or [[Special:MyLanguage/Modules/JavaLikeCalc|a JavaLikeCalc controller]] object directly. :2. Create [[Special:MyLanguage/Modules/LogicLev|a logical parameter]] object, for the case of using the logical controller, and select this template for it. Enable the parameter. :*['''JavaLikeCalc'''] or select this template for [[Special:MyLanguage/Modules/JavaLikeCalc|the JavaLikeCalc controller]]; enable the controller; create a parameter "manager" of reflection the representative attributes: <pre style="white-space: pre-wrap; margin-left: 40pt;"> dbDB dbProgs comLs prog mode curMode startTm curCom work </pre> :3. Into the tab "Template configuration" of the object of the logical parameter, or the controller for [JavaLikeCalc], you need to set: ::* ''DB: DB name with the tables'' — to DB, like to "SQLite.vcaBase", where stored or must be stored the prescription-program tables. The empty value is not allowed and will cause an error! ::* ''DB: Table with programs'' — to name of the prescriptions-programs table, by default it is "PrescrProgs". ::* ''Commands controller'' — left it in the default value "*", to use this parameter's controller for the commands also. You must change this field if you run the manager controller object in a separate logical controller for the commands! :* ['''JavaLikeCalc'''] or and additionally: ::* ''Commands controller'' — change this field in a separate logical controller for the commands! :* ['''Command-macro'''] or and additionally: ::* ''DB: Table with commands'' — to name of the commands table, by default it is "PrescrComs"; ::* ''Commands controller'' — set to '''<empty>'''. :4. Place the required [[#LogicLevCommands|parameters of the commands]] together to the manager parameter. :* ['''Command-macro'''] or prepare the required commands in "DB: Table with commands" according to [[#Conception|the conception]]; the empty commands table must be created automatically after starting the object of the logical parameter, or the controller for [JavaLikeCalc]! :5. RESULT: Launching the controller object (where this parameter is created), we must get the operational data in the tab "Attributes" for the: allowed commands list, current mode, work program, current command-step and start time. :* ['''JavaLikeCalc'''] or the [[Special:MyLanguage/Modules/JavaLikeCalc|JavaLikeCalc]] controller object directly. :6. 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: :* ''Name of the selected program'' — to set of the selected program name in processing by the manager; :* ''Mode'' — to set the manager mode of the selected prescription-program execution: Finish(-2), Error(-1), Stop(0), Run(1), Pause(2), Pass command(3). === {{Anch|LogicLevCommands|Templates of the commands}} === {| class="wikitable" <section begin=timer /> | {{Anch|timer|<h4>Command — Timer ([[Special:MyLanguage/Libs/Prescriptions#timer|timer]])</h4>}} || 2.0 || GPLv2 || * || en, uk, ru <section end=timer /> | [[User:RomanSavochenko|Roman Savochenko]] |} [[File:LibsPrescriptionsTimer.png|right|Result and the operative setup.]] Template of a command of the prescription typical timer. The timer is only designed to hold time between other action steps and for example, so it only has one attribute, "Time" in seconds. {{CntHdr|Template IOs}} {| class="wikitable" |- ! Identifier !! Name !! Type !! Mode !! Attribute !! Configuration !! Value |- | start || Prescription: start || Boolean || Input || Full access || Variable || 0 |- | stop || Prescription: stop || Boolean || Input || Full access || Variable || 0 |- | error || Prescription: error || Boolean || Input || Full access || Variable || 0 |- | abort || Prescription: abort || Boolean || Input || Full access || Variable || 0 |- | run || Command: run || Boolean || Input || Full access || Variable || 0 |- | pause || Command: pause || Boolean || Input || Full access || Variable || 0 |- | rez || Command: result || String || Input || Full access || Variable || 1 |- | arg1 || Time, seconds || Real || Input || Full access || Variable || |- | tmp1 || Temporary 1 || Real || Output || 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 |- | f_err || Function error || String || Input || Not attribute || Variable || 0 |- | f_start || Function start flag || Boolean || Input || Not attribute || Variable || 0 |} {{CntHdr|Configuring and using}} :1. Create and start [[Special:MyLanguage/Modules/LogicLev|a logical controller]] object with the needed scheduling properties, or use created one for [[#manager|the prescription engine]]. :2. Create [[Special:MyLanguage/Modules/LogicLev|a logical parameter]] object and select this template for it. Enable the parameter. :3. RESULT: Launching, we must get the operational data in the tab "Attributes" for the command result. :4. 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 [[#Conception|the representative attributes of the prescription commands]] and the additional ones: :* ''Time'' — to set time of the timer in seconds. {| class="wikitable" <section begin=backTimer /> | {{Anch|backTimer|<h4>Command — Background timer ([[Special:MyLanguage/Libs/Prescriptions#backTimer|backTimer]])</h4>}} || 2.0 || GPLv2 || * || en, uk, ru <section end=backTimer /> | [[User:RomanSavochenko|Roman Savochenko]] |} [[File:LibsPrescriptionsBackTimer.png|right|Result and the operative setup.]] Template of a command of the prescription background timer. The timer designed only for hold a time in the background to an example, then it contains only one attribute, it is "Time" in seconds. {{CntHdr|Template IOs}} {| class="wikitable" |- ! Identifier !! Name !! Type !! Mode !! Attribute !! Configuration !! Value |- | start || Prescription: start || Boolean || Input || Full access || Variable || 0 |- | stop || Prescription: stop || Boolean || Input || Full access || Variable || 0 |- | error || Prescription: error || Boolean || Input || Full access || Variable || 0 |- | abort || Prescription: abort || Boolean || Input || Full access || Variable || 0 |- | run || Command: run || Boolean || Input || Full access || Variable || 0 |- | pause || Command: pause || Boolean || Input || Full access || Variable || 0 |- | rez || Command: result || String || Input || Full access || Variable || 1 |- | arg1 || Time, seconds || Real || Input || Full access || Variable || |- | tmp1 || Temporary 1 || Real || Output || 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 |- | f_err || Function error || String || Input || Not attribute || Variable || 0 |- | f_start || Function start flag || Boolean || Input || Not attribute || Variable || 0 |} {{CntHdr|Configuring and using}} :1. Create and start [[Special:MyLanguage/Modules/LogicLev|a logical controller]] object with the needed scheduling properties, or use created one for [[#manager|the prescription engine]]. :2. Create [[Special:MyLanguage/Modules/LogicLev|a logical parameter]] object and select this template for it. Enable the parameter. :3. RESULT: Launching, we must get the operational data in the tab "Attributes" for the command result. :4. 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 [[#Conception|the representative attributes of the prescription commands]] and the additional ones: :* ''Time'' — to set time of the timer in seconds. == {{Anch|GraphPart|Graphical part}} == Contains elements-frames of the prescription of the end type and elements-widgets, what intended to be placed in the mnemonic schemes part (the type of view) of the project tree of the pages, built on [[Special:MyLanguage/Libs/Main_graphical_elements#RootPgSo|the concept of the signal objects of the root page "RootPgSo"]] and to be placed on the other complex frames. However, elements-frames may be located as separate entities or as part of your own concept of the page management, but it should be take in account that frames often refer and call certain [[Special:MyLanguage/Libs/Main_graphical_elements#Panels|control panels]] of the common usage and related elements! For connection the library part to a project of the OpenSCADA station you can obtain the database file as: * supplied with a ready and proper package of the Linux distribution like to "openscada-libdb-vca", "openscada-LibDB.VCA"; * directly taken for most actual one from [http://oscada.org/svn/trunk/OpenSCADA/data/LibsDB/vcaBase.sql the subversion repository] and converted to the DB SQLite file in the way: <syntaxhighlight lang="BASH" style="margin-left: 15px"> wget http://oscada.org/svn/trunk/OpenSCADA/data/LibsDB/vcaBase.sql sqlite3 -init vcaBase.sql vcaBase.db .exit </syntaxhighlight> * downloaded for [[:File:vcaBase.db.gz|the one attached here]]. This obtained file next you can place into the project directory of the station and create the database object for the DB module "SQLite", registering the database file in the configuration. {| class="wikitable" <section begin=prescrEdit /> | {{Anch|prescrEdit|<h3>Prescription — edit ([[Special:MyLanguage/Libs/Prescriptions#prescrEdit|prescrEdit]])</h3>}} | 1.3 || GPLv2 || * || en, uk, ru <section end=prescrEdit /> | [[User:RomanSavochenko|Roman Savochenko]] |} The frame, shown in Figure 3.1, is one of the group frames for working with the prescriptions, which serves for the user-editing of the prescriptions-programs. The frame commonly uses and represents the representative structure of the [[#manager|prescription manager]]. The frame contains from left to right: * "Library" — library with a list of programs and library's control tools. * "Program" — the list of commands-steps of the selected in the library prescription-program with the control tools. * "Command" — the edit field of the selected step in the prescription, which contains the selection of the command and set the name, description, background execution flag and values of the available attributes, as well as button to save the changes. [[file:LibsPrescriptions_prescrEditD.png|center|frame|Fig.3.1a. The "Prescription — edit" frame in the development mode.]] {{CntHdr|Using — development}} The frame is designed to perform the role of page, and should therefore be placed directly in the project's tree. To the frame can be connected one parameter of [[#manager|the prescription manager]], by setting the links. {{CntHdr|Using — runtime}} In the runtime mode, the user can add new prescription-programs, delete, copy and export the existing ones as well as to import prescriptions from other OpenSCADA stations. In the selected prescription-program user can do: add or insert a new step, remove or move the selected step. For the selected steps of the prescription-program the user can set the command and enter the name, description, background execution flag and values for the available arguments of the selected command, and then to save changes of the step. Removal operations are accompanied by [[Special:MyLanguage/Libs/Main_graphical_elements#accept|the confirmation dialog]]. [[file:LibsPrescriptions_prescrEditR.png|center|frame|Fig.3.1b. The "Prescription — edit" frame in the runtime mode.]] {{{CntHdr|Linking and configuring the attributes}} {| class="wikitable" |- ! Identifier !! Name !! Type !! Configuration !! Configuration template |- | dbDB || DB: Data base || String || Input link || Controller|dbDB |- | dbProgs || DB: Programs table || String || Input link || Controller|dbProgs |- | prExtComLs || Available commands list || Object || Input link || Controller|comLs |} {| class="wikitable" <section begin=prescrRun /> | {{Anch|prescrRun|<h3>Prescription — run ([[Special:MyLanguage/Libs/Prescriptions#prescrRun|prescrRun]])</h3>}} | 1.3 || GPLv2 || * || en, uk, ru <section end=prescrRun /> | [[User:RomanSavochenko|Roman Savochenko]] |} The frame, shown in Figure 3.2, is one of the group frames for working with the prescriptions, which serves for control and observing of executing the programs-prescriptions, previously formed in the [[#prescrEdit|Prescription — edit]] frame. The frame commonly uses and represents the representative structure of the [[#manager|prescription manager]]. In addition to this full-format prescription frame, there is a simplified one — "[[#prescrRunSimple|Prescription — run, simple]], that allows you to manage and to track compactly the prescriptions execution in other frames of the technological process. The frame contains from the left to the right: * "Start/stop/skip" — two buttons to start and stop the selected program and a button to skip the current step execution. * "Library" — library with a list of the programs. * "Program" — document of the commands-steps list of the selected prescription-program in the library. During the execution in this field it is monitored the program execution current state by the appropriate highlight of the steps. [[file:LibsPrescriptions_prescrRunD.png|center|frame|Fig.3.2a. The "Prescription — run" frame in the development mode.]] {{CntHdr|Using — development}} The frame is designed to perform the role of page, and should therefore be placed directly in the project's tree. To the frame can be connected one parameter of [[#manager|the prescription manager]], by setting the links. [[file:at.png]] To archive completed sessions while the operator is switching between frames, this full-format frame in the project tree must be set for the parameter "Page: process not opened". At the end of the prescription-program, messages with session parameters are generated [[#manager|by the prescription manager]], as well as archiving of the session document. The messages with the session parameters can be used either simply to view the sessions history or to create a session list, for example, in [[Special:MyLanguage/Libs/Main_graphical_elements#grpGraph|the graphics group]] to go to the history at the session time. [[Special:MyLanguage/Sub-projects/VCA#Document|The reports archive]] is set to the depth of 10 documents by default, what you can change by setting the "Archive length (n)" attribute of the document widget. {{CntHdr|Using — runtime}} In the runtime mode, the user can select the desired prescription-program and run-on the execution, and then track the execution progress or switch to other frames. The running program user can pause by pressing the "Pause" button or terminate by pressing "Stop". In addition, the user can skip the current step by clicking the "Skip" button. Also the user can review or print reports of the previously executed prescriptions of this full-format frame, for what it is necessary to press the left mouse button on the document and browse on [[Special:MyLanguage/Libs/Main_graphical_elements#doc_panel|the navigation bar]] through the archive of the executed prescriptions. [[file:LibsPrescriptions_prescrRunR.png|center|frame|Fig.3.2b. The "Prescription — run" frame in the runtime mode.]] {{{CntHdr|Linking and configuring the attributes}} {| class="wikitable" |- ! Identifier !! Name !! Type !! Configuration !! Configuration template |- | dbDB || DB: Data base || String || Input link || Controller|dbDB |- | dbProgs || DB: Programs table || String || Input link || Controller|dbProgs |- | prExtCurCom || Controller: current command || String || Input link || Controller|curCom |- | prExtMode || Controller: mode || Integer || Full link || Controller|mode |- | prExtProg || Controller: program || String || Full link || Controller|prog |- | prExtStartTm || Controller: start time || Integer || Input link || Controller|startTm |- | prExtWork || Controller: work || Object || Input link || Controller|work |} {| class="wikitable" <section begin=prescrRunSimple /> | {{Anch|prescrRunSimple|<h3>Prescription — run, simple ([[Special:MyLanguage/Libs/Prescriptions#prescrRunSimple|prescrRunSimple]])</h3>}} | 1.3 || GPLv2 || * || en, uk, ru <section end=prescrRunSimple /> | [[User:RomanSavochenko|Roman Savochenko]] |} The widget, shown in Figure 3.3, is a simple variant of the frame "[[#prescrRun|Prescription — run]]", which designed for placing as a widget of the mnemonic schemes and it mostly works together the frame "[[#prescrRun|Prescription — run]]". The frame commonly uses and represents the representative structure of the [[#manager|prescription manager]]. The widget contains from the left to the right and to the bottom: * "Start/stop/skip" — two buttons to start and stop the selected program and a button to skip the current step execution. * "Library" — button to display the current prescription-program and call [[Special:MyLanguage/Libs/Main_graphical_elements#treeSelect|the dialog of selecting item into tree]]. * "Program" — document with lines of currently active commands. [[file:LibsPrescriptions_prescrRunSimple.png|center|frame|Fig.3.3. The "Prescription — run, simple" frame in the development and runtime modes.]] {{CntHdr|Using — development}} This widget can be used by the developer to create mnemonic schemes with displaying the prescriptions execution activity and to fast control them. To use it you need to add this widget to a mnemonic scheme, adjust for the horizontal, vertical size, by scaling, and connect to [[#manager|the prescription manager]], by setting the links. {{CntHdr|Using — runtime}} In the runtime mode, the user can select the desired prescription-program, in [[Special:MyLanguage/Libs/Main_graphical_elements#treeSelect|the dialog of selecting item into tree]] that appears at the prescription button click, and run-on the execution, and then track the execution progress or switch to other frames. The running program user can pause by pressing the "Pause" button or terminate by pressing "Stop". In addition, the user can skip the current step by clicking the "Skip" button. {{{CntHdr|Linking and configuring the attributes}} {| class="wikitable" |- ! Identifier !! Name !! Type !! Configuration !! Configuration template |- | dbDB || DB: Data base || String || Input link || Controller|dbDB |- | dbProgs || DB: Programs table || String || Input link || Controller|dbProgs |- | prExtCurCom || Controller: current command || String || Input link || Controller|curCom |- | prExtMode || Controller: mode || Integer || Full link || Controller|mode |- | prExtProg || Controller: program || String || Full link || Controller|prog |- | prExtStartTm || Controller: start time || Integer || Input link || Controller|startTm |- | prExtWork || Controller: work || Object || Input link || Controller|work |}
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