you want to calculate the mean value between two signals in the control
system and write
the result to a third signal.
this application 3, so open App03 Command Window.
resulting picture will be like below:
the >> prompt, type
result will be the editor opening with TaskInit.m
how often the program should run in SYS.Ts=10. Meaning each 10 sec.
the file TaskScheduler.m either by writing ‘edit TaskScheduler’ in the
or press ‘file open’ and select the file. The result is shown
line with the command AppGetPointValues, because we here need to get values
the control system.
following lines to make the program:
start the task:
have the mean value written to the point ‘Z4M01L3’ every 10 seconds.
functions PVa(‘Z4M01L1’) and PVa(‘Z4M01L2’) gives you the present process
signalmean is then the sum divided by 2.
function writeDPV(‘Z4M01L3’,signalmean) will write the value of signalmean
to the process value
with the tagname ‘Z4M01L3’.
the task is not programmed directly in TaskScheduler, but in a function,
which is then called
Workspace Browser, is used to monitor the variables in the present
workspace, but also the
editor has a good tiptool text giving the values of
most variables when you point them.
variable SYS contains all information from the underlying control system.
Functions like PVa(‘tagname’) is used to extract the information in an easy
File Browser shows all files in the present directory.
can double click on one of the files in this application to open it in the
editor. The editor picture
is shown above, where we enter the program.
file is in the editor, you can insert breakpoints, where the program
execution will stop so
you can inspect the values. You can then single step
the program, line by line, to check what happens
is what you expect.
finally, you have access to the excellent Matlab Help Browser:
development, you will often have all of the above windows open.
operation, the SIMEQ system is normally invisible.
SIMEQ - It’s a pleasure to
To the top