EasyManuals Logo

Sensia JISKOOT InSpec Sampler User Manual

Sensia JISKOOT InSpec Sampler
127 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #67 background imageLoading...
Page #67 background image
InSpec Sampler Controller SECTION 11: USER CONFIGURABLE LOGIC (UCL)
67
SECTION 11: USER CONFIGURABLE LOGIC (UCL)
UCL is a programming language for creating additional logic features in the InSpec controller. It provides
the ability to alter register values on a real time basis, according to a set of predefined commands.
UCL is a functional language. This means that every statement is a function - a calculation with
specified input and output. UCL is not a procedural language (such as Pascal or C).
Before going any further let us look at a simple UCL program.
i_user_int1 = i_user_int2;
This program consists of a single statement. The "i_user_int1" is the target register. This is where the
result of the equation will be stored. Every UCL statement must start with the name of an existing register. The
"=" is part of the syntax of the language and separates the target register from the rest of the statement. The
semicolon marks the end of the statement.
In this example, the statement consists of a single register, i_user_int2. The operation of the program
copies the value of i_user_int2 into the register i_user_int1. Effectively, the i_user_int1 register stores the output
of the i_user_int2 function.
11.1 How does UCL run?
When a UCL program is running, each statement is executed sequentially once per second. So, the
effect of the above program would be to update the contents of i_user_int1 with i_user_int2, once per second.
Another example is shown below:
i_user_int1 = i_user_int1 + 1;
This simple program is a counter, incrementing once per second. It shows how a UCL program can use
the target register inside the equation.
11.2 How to write a UCL program
Programs must be stored in the SYSTEM folder on the InSpec SD card and the program file MUST be
called UCL.TXT. This is the filename that the UCL task looks for. When it starts. If this name is not used, your file
will not be compiled or executed. There are several ways to get the UCL file onto the SD card. You could write
one by hand at the shell terminal using the BLD command, you could create one on your PC in a text editor of
your own choice and then copy it to the SYSTEM folder using the web interface upload feature or copy it to the
SD card with a card reader attached to a PC.
11.3 How to use build - Part 1
Making sure you are in the SYSTEM folder, type the following and then hit return:
\SYSTEM\> BLD UCL.TXT
Text can be typed in, as if using a text editor program. When you have typed in your program use ctrl+c
to quit. At this point the text you typed will be saved to the SYSTEM folder with the filename you entered.
You can then use the ‘TYPE’ command to check to check that your file has been created and the
contents are as you expected.
\SYSTEM\>TYPE UCL.TXT
NOTE: Files created with BLD are only ASCII text files.
11.4 How to execute a UCL program
Once you have a completed UCL program saved into the BBRAM, you can start it at the command line,
either by typing:
START DEBUG
Or alternatively, you can simply reboot the InSpec. On each reboot the InSpec looks for the UCL.TXT
file. If found it attempts to compile the file and then, if successful, it starts executing the UCL logic once a second.
Note that the file is interpreted at compile time for execution. When started, the UCL program interprets the text
from the UCL.TXT file into an internal software structure that the InSpec can understand. This may take up to
ninety seconds for a large program. When complete the program will start to run.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Sensia JISKOOT InSpec Sampler and is the answer not in the manual?

Sensia JISKOOT InSpec Sampler Specifications

General IconGeneral
BrandSensia
ModelJISKOOT InSpec Sampler
CategoryController
LanguageEnglish

Related product manuals