CitectSCADA Assignment 2
CitectSCADA Assignment 2
Assignment 2
Assignment 2(Module7-12)
Estimated Duration-90mints
Module – 7
Defining a Calendar – Assigns the defined dates and special days to the
calendar. An existing calendar can be modify the planned monthly schedule. It is
applicable to the current projects only.
Daily log file created by Citect Time Scheduler records all the manual or
scheduled actions performed in the Time Scheduler. It records
i) Program Execution – which defines when a value is assigned to a tag
and the tag name
ii) The creation, deletion or modification of special days or programs
including program resets
iii) Cicode operations of Time Scheduler
The automatic update process that is occurred during the initial launch of
Citect SCADA does not fully upgrade the project. So, migration tool is used
to do the complete automation process. The automatic update process is
required and a passive action to upgrade the database field that has been
changed between the two versions and copies a new file.
Module – 8
Table Lookup – Gets the value from a table. It searches a value in the table
and returns the position of the value in the table.
1) On new lines with one tab stop the statements should be placed
2) On a single line not more than one statement should be placed because the
first statement will permanently deleted
3) If the statements are logically related, place them on consecutive lines
When the debug switch is on, the debug message function (DebugMsg () )
internally calls the trace message function (TraceMsg() ). The
implementation debug message function is found in DEBUG.CI in the
INCLUDE project. The debug switch can be turned ON or OFF by any of
the below two procedures
INT
FUNCTION
FilePrint(STRING sDeviceName, STRING sFileName)
INT hFile;
INT hDev;
STRING Str1;
To declare a dynamic sized array, the array should be declared using the dim
statement with an empty parentheses pair and followed by its array name.
Once array is declared as dynamic, the array can be only resized using the
redim statement within a function or subroutine. Redim may also erases the
values of the array. So, preceding the Redim statement with the preserve
keyword is necessary to preserve the contents of the array when it is resized.
Redimensioning an array to smaller values may erase the values it contained
in the removed portions. Arrays which are declared using the dim statement
wthin the procedures will not retain their values in CitectVBA between the
procedure calls.
Date Conversion
12) How to setup the appearance options in configuring the data exchange
of Citect SCADA 4M
In the Properties dialog box, the Fonts and Colors tabs enables users to
control the appearance of the Database Exchange ActiveX control
13) Write a Cicode program to make the connection to an SQL server and
select the salary field from each record in the employee database 6M
FUNCTION
ListNames()
INT hSQL;
STRING sSalary;
INT Status;
INT hRec;
INT nColumns;
INT nRows;
INT i;
hSQL = SQLCreate("DSN=MyDatabase;UID=billw;SRVR=CI1");
IF hSQL <> 1 THEN
Status = SQLOpen(hSQL);
IF Status = 0 THEN
hRec = SQLGetRecordset(hSQL, "SELECT SALARY FROM
EMPLOYEE");
IF hRec <> 1 THEN
nRows = SQLRowCount(hRec);
FOR i=0 TO nRows 1 DO
sName = SQLGetField(hRec, "SALARY", i);
..
END
SQLEnd(hRec);
ELSE
Message("Information", SQLErrMsg(), 48);
END
SQLClose(hSQL);
ELSE
Message("Information", SQLErrMsg(), 48);
END
SQLDispose(hSQL);
END
END
14) How to read the data from an access table in Citect SCADA? 4M
To read data from an Access table or to call an Access query, a Select query is
used
Function SQLTest
INT hSQL, iResult;
hSQL =
SQLConnect("DSN=ODBCTest;UID=YourUID_C;PWD=YourPWD");
IF hSQL <> 1 Then
iResult = SQLExec(hSQL, "SELECT * FROM qryRecipes
WHERE Recipe Between '4000' And '7000'");
IF iResult = 0 Then
WHILE SQLNext(hSQL) = 0 DO
TraceMsg(">" + SQLGetField(hSQL, "Recipe")
+ "<>" +SQLGetField(hSQL, "Milk")
+ "<>" +SQLGetField(hSQL, "Water")
+ "<>" +SQLGetField(hSQL, "Sugar") + "<");
END
SQLDisconnect(hSQL);
ELSE
Message("SQL Error", SQLErrMsg, 48);
END
Message("SQL Error", SQLErrMsg, 48);
END
END
Vijeo Citect uses the system of rotational history files to store the historical
data to make the long term storage of logged data easier to organize and
more accessible. To use the system, we need to specify the required number
of device history files.
Period can also be used between the files to specify when a new file has
to be used.
16) How to edit and save the contents of the table in Microsoft Excel?
4M
The data in the table shown as cells within a row can be edited.
The structure of the table cannot be modify the name of any Field shown
as column, add a column or delete a column.
To Save a Table
On the toolbar, select to save and re-index the table from the drop
down control
Click the button SaveDBF
Module – 11
17) What is the use of Kernel with a selected process in Citect SCADA?
4M
1) Right click on the process in Runtime manager to view the Kernel window
2) From the context menu select Kernel
3) For the selected process, the Kernel window will appear.
The list of all users and system projects are displayed in the project
activity. In the title bar of the application, the name of the Active project is
displayed along with the text [Active Project]
The following details are displayed in the Project Activity for every project
Path — describes the folder in which the project files are stored.
On the local window, Citect SCADA Runtime manager monitors the status
of each process running. In the Status Column, the status of each process is
present.
Instructions
13) Finally run the runtime manager to start the process of the current
project