Appendix C. Operation Logic Programming - Novatek-electro EM-486 Operating Manual

Protocol converter modbus rs-485 via mobile communication
Hide thumbs Also See for EM-486:
Table of Contents

Advertisement

1 General
After running, EM-486 starts execution of the program for logic of action, if it was placed earlier in the built-in memory.
If there is no program in the built-in memory, EM-486 searches for and checks the task files placed in the folder "TASKS"
on the memory card, provided the card is formatted in the FAT or FAT32 format. The correctly discovered files are read in
the built-in memory and form the logic program of actions. Such a reading runs once after startup or after installing a new
memory card, only if the built-in memory does not contain the programs.
To clean the internal memory you should:
1) Enter EM-486 parameter setting via WEB interface (see Manual, para 5.3.3);
2) Go to the tab "Files";
3) Press the button "Clear built-in tasks memory";
4) If the result of the reading the program is not displayed immediately in the tab "Files", refresh the page a few
seconds later.
Note – the program in the internal memory is deleted when updating the firmware. If the memory card with the
task files remains installed in the EM-486, the program will automatically read again after the update.
The tab "Files" indicates the result of reading the folder "TASKS", including the number of discovered and read files. If
during reading and verifying the program errors were detected, then it indicates the type of error, file and line number of
the file error. If the program consisted of several files in the folder "TASKS", then the internal memory will read all files
except those in which errors are detected. Therefore, during error correction you should compare the number of
discovered and read files and if some were read, to clear again the internal memory to re-read the program.
Files can have arbitrary names and extensions and placed in subfolders of the folder "TASKS". Files placed directly in
the folder TASKS, allow you to use MODBUS ID default in the text, equal to MODBUS ID of the product EM-486. Files
placed in subfolders in the folder "TASKS" with names from "1" to "247", allow to use in them MODBUS ID default name
of the subfolder. Therefore, if the program logic is divided into tasks so that each is associated with its connected device,
it is recommended that files relating only to EM-486, to be placed in the folder "TASKS" and files related to primarily the
other device, to be put in a subfolder with the name of the MODBUS ID of this device. This allows you to change the list of
managed devices by copying and renaming the subfolders, and create universal and portable files of the tasks.
2 Files of the tasks
File of tasks describes repeated after a specified time interval the set of actions for gathering, processing and
comparing the data and special actions after fulfillment of the preset conditions according to the processing results.
The task file is divided into sections which in turn are divided into lines.
The section is part of the file that starts with "!" and the name of the section written in a row.
Correct example:
!META
UPDATE 60
!PARAMS
...
If the section allows you to refer the lines in it, then all the lines of the section are numbered, otherwise instead of a number
of the line will be put the sign "*". The format of the line is different in each section. The number and order of sections does not
matter (sections can be interrupted and then be continued after one or more sections), if two rules are fulfilled:
1) If a section with numbered lines is found for the first time, the numbering starts with 0, otherwise, numbering
continues from the previous section of the same name.
Correct example:
...
!VARS
0 VAL 0
!CONDS
0 VAREQVAL V0 0
!ACTS
0 RELAYON 1 2
1 RELAYOFF 1 2
!REACTS
* C0 ACT A0
!CONDS
1 NOT C0
!REACTS
* C1 ACT A1
NOVATEK-ELECTRO
~ 35 ~
Appendix C
(recommended)
Operation logic programming
Incorrect example:
Incorrect example:
...
!VARS
0 VAL 0
!CONDS
0 VAREQVAL V0 0
!ACTS
0 RELAYON 1 2
1 RELAYOFF 1 2
!REACTS
* C0 ACT A0
!CONDS
0 NOT C0
!REACTS
* C1 ACT A1
META
UPDATE 60
PARAMS
...
EM-486

Advertisement

Table of Contents
loading

Table of Contents