Citect user login tracking

Maia

Member
Join Date
Sep 2004
Location
Laguna
Posts
29
Hey pips!I am new to Citect and I don't know how to track users who logged in. In WinCC, I've done it by including user login in the alarm logging. Is it also possible in Citect or there's a better way?

thanks,
maia :rolleyes:
 
you can create user accounts in Citect with different privelege levels. This is quite similar to any other SCADA package or windows user accounts. Citect is no different.
 
Good question.

Thats not a standard functionality of Citect.

The thing that citect does is each command that is given in an installation is logged with who when and where if you define the log message. it is even possible to log the changed variables The idea is then that it is not neccesary to log wich user is logged in when. (thats my guess)

You can make a workaround if you really want log the login and logout action.

in the extended userform you can specify an entry command and an exit command with these events you can log the moment of login and logout.

Greetz,

Marsupilami
 
There are a whole range of security functions in Citect that can be used to display name of operator, priv1ledges, etc etc. What is available varies with the version number you have. Like all software, it is evolving all the time.

There is no reason why a cicode function could not be written to log each login to a file, with time/date information etc. It may already have been done. I have not used V5.5 or V6 but therte may already be a function in either of those to do what you require.

I strongly suggest you join My Citect and the Citect User's List. Questions can be directed to the user's list and there are many very smart people out there from all over the world that would ba able to help you with any queries. I would also strongly suggest you obtain the latest knowledgebase and search it for what you want. It is really very good.

You will need to have a current up to date and in support licence to join.
 
Thanks guys! I think you're right Marsupilami. :nodi:

Thanks for the info Bob, I really should join that group. :nodi:
 
Hi Maia,

It is actually quite easy to track user logins and logouts in Citect. In the Citect Project Editor, drop down menu "System" -> "Users" if you extend this form by pressing "F2", there is an "Entry Command" and an "Exit Command". From here you can run Cicode to pickup the user who has logged in and write it to disk or what ever.

An example of what you can do is shown below. This is a bit of code that I use in some of my projects for logging user information to disk and screen.

Hopefully this is of some use to you.

Cheers,

Andrew

** NOTES:

**

** 1. Traps User Name, Date and Time of Login.

** 2. Traps User Name, Date and Time of Logout.

** 3. Logs actions of Users.

**

*/

/*

** Declaration of Local Variables

**

*/

INT hDevice;

/*

** Function: UserLogOutInfo()

** Called From: Users Database in Citect Project Editor under "Exit Command"

** Use: Trap User Name, Date and Time of a user logout.

**

*/

FUNCTION UserLogOutInfo()

hDevice = DevOpen("UserLog",0) //Open Logging Device

DevWriteLn(hDevice,TimeToStr(TimeCurrent(),4)+ " "+ UserInfo(2)+", Logged Out."); //Write Data to Device

DevClose(hDevice); //Close Logging Device

CurrentUser(); //Call CurrentUser Function

END

/*

** Function: UserLogInInfo()

** Called From: Users Database in Citect Project Editor under "Entry Command"

** Use: Trap User Name, Date and Time of a user login.

**

*/

FUNCTION UserLogInInfo()

CurrentUser(); //Call CurrentUser Function

hDevice = DevOpen("UserLog",0) //Open Logging Device

DevWriteLn(hDevice,TimeToStr(TimeCurrent(),4)+ " "+ UserName+", Logged In."); //Write Data to Device

DevClose(hDevice); //Close Logging Device

END

/*

** Function: CurrentUser()

** Called From: UserLogOutInfo(), UserLogInInfo() and Initialise()

** Use: Displays The Name of the Currently Logged In User.

**

*/

FUNCTION CurrentUser()

SleepMS(500); //Provide Delay For User Data to Update

IF UserInfo(0) = "1" THEN

UserName = UserInfo(2); //If a user has logged in then display Current User Name.

ELSE

UserName = "No User Logged In"; //If no users are logged in then display "No User Logged In"

END

END

/*

** Function: UserLogAction("Action Text")

** Called From: Called From Various Buttons and Pages through the Project

** Use: Log Actions By Current User.

**

*/

FUNCTION UserLogAction(STRING s)

hDevice =
DevOpen("UserLog",0) //Open Logging Device

DevWriteLn(hDevice,TimeToStr(TimeCurrent(),4)+ " "+ UserName+", "+ s +"."); //Write Data to Device

DevClose(hDevice); //Close Logging Device

END

 
Andrew's Cicode wouldn't compile. There are some missing semicolons and an undefined module variable. These are easy to correct but see below if you are not familiar with Cicode.







/*
** NOTES:
**
** 1. Traps User Name, Date AND Time of Login.
** 2. Traps User Name, Date AND Time of Logout.
** 3. Logs actions of Users.
**
*/

/*
** Declaration of Module Variables
**
*/

INT hDevice;
STRING UserName;

/*
** Function: UserLogOutInfo()
** Called From: Users Database in Citect Project Editor under "Exit Command"
** Use: Trap User Name, Date and Time of a user logout.
**
*/

FUNCTION UserLogOutInfo()

hDevice = DevOpen("UserLog",0);//Open Logging Device
DevWriteLn(hDevice,TimeToStr(TimeCurrent(),4)+" "+ UserInfo(1) +", Logged Out."); //Write Data to Device
DevClose(hDevice); //Close Logging Device
CurrentUser(); //Call CurrentUser Function

END

/*
** Function: UserLogInInfo()
** Called From: Users Database in Citect Project Editor under "Entry Command"
** Use: Trap User Name, Date and Time of a user login.
**
*/

FUNCTION UserLogInInfo()

// UserName = CurrentUser(); //Call CurrentUser Function
CurrentUser(); //Call CurrentUser Function

hDevice = DevOpen("UserLog",0);//Open Logging Device
DevWriteLn(hDevice,TimeToStr(TimeCurrent(),4)+" "+ UserName +", Logged In."); //Write Data to Device
DevClose(hDevice); //Close Logging Device

END

/*
** Function: CurrentUser()
** Called From: UserLogOutInfo(), UserLogInInfo() and Initialise()
** Use: Displays The Name of the Currently Logged In User.
**
*/

//STRING FUNCTION CurrentUser()
FUNCTION CurrentUser()

SleepMS(500); //Provide Delay For User Data to Update

IF UserInfo(0) = "1" THEN
UserName = UserInfo(1); //If a user has logged in then display account name.
ELSE
UserName = "No User Logged In"; //If no users are logged in then display "No User Logged In"
END

END
 

Similar Topics

Hi All, new forum user here. i need some help i have Citect V7.2 and want to run some simple code to open a window with WinNew for approx 10...
Replies
4
Views
2,938
Hello everybody, I'm using Vijeo Citect v7.40 and I would like to keep a log file with all user login related information: time/date of every...
Replies
0
Views
2,468
Currently I'm using v7.5 on Windows Server 2012, I have some Wondeware/FT experience, but relatively new to Citect. Up till now we have had the...
Replies
3
Views
3,251
Hi Everyone, I am hoping we have some Citect SCADA Experts here. I am new to Citect and not finding it the most user friendly SCADA Package to...
Replies
4
Views
5,648
Dear all, I have a server and a client how to use the connection between the LAN and the internet? Please, help me. Thanks and best regards!
Replies
1
Views
2,189
Back
Top Bottom