Structures
Structures
UA_User_typ
Structure that contains information necessary for logging in and out.
Name | Type | Description |
---|---|---|
UserName | STRING[UA_STRLEN_IN] | String used as the username for logins and logouts. |
Password | STRING[UA_STRLEN_IN] | String used as the password for logins and logouts. |
UserLevel | USINT | Level of access this user will receive. |
UserAccessMgr_typ
This structure is used to store and access all data regarding the current state.
UserAccessMgr
Top level of the UserAccessMgr structure.
Name | Type | Description |
---|---|---|
IN | UserAccessMgr_IN_typ | Input structure for UserAccessMgr_typ. |
OUT | UserAccessMgr_OUT_typ | Output structure for UserAccessMgr_typ. |
UserAccessMgr.IN
This is the input structure break down for the UserAccessMgr.
Name | Type | Description |
---|---|---|
CMD | UserAccessMgr_IN_CMD_typ | Command structure for UserAccessMgr_typ. |
PAR | UserAccessMgr_IN_PAR_typ | Parameter structure for UserAccessMgr_typ. |
CFG | UserAccessMgr_IN_CFG_typ | Configuration structure for UserAccessMgr_typ. |
UserAccessMgr.IN.CMD
This is the input command structure break down for the UserAccessMgr.
Name | Type | Description |
---|---|---|
Login | BOOL | Command for logging in with current user specified on PAR structure. |
Logout | BOOL | Command for loggout in with current user specified on PAR structure. |
UserAccessMgr.IN.PAR
This is the input parameter structure break down for the UserAccessMgr.
Name | Type | Description |
---|---|---|
InputUser | UA_User_typ | User structure that contains Username, Password, and UserLevel. |
UserAccessMgr.IN.CFG
This is the input configuration structure break down for the UserAccessMgr.
Name | Type | Description |
---|---|---|
pUserList | UDINT | Pointer to the user list (address of a UA_User_typ array) |
NumUsers | UDINT | Number of users in the user list |
LoginMode | UDINT | Mode for checking login (UA_MODE_DEFAULT, UA_MODE_PASSWORDONLY) |
VCName | STRING[UA_STRLEN_IN][0..UA_MAI_VC] | Name array of the visual components objects |
NumVC | USINT | Number of VC objects to check for touch actions |
AutomaticLogoutDelay | UDINT | Automatic logout delay time [s]. Set to 0 to disable automatic logout. |
LoggerName | STRING[LOG_STRLEN_LOGGERNAME] | Name of AR logger to use |
UserAccessMgr.OUT.STAT
The output structure only contains a status member. This is the breakdown of the output status structure.
Name | Type | Description |
---|---|---|
CurrentUser | UA_User_typ | Username, password and level of user currently logged in. |
LoggerInitialized | BOOL | Bit associated with the status of the logbook |
ValidLogin | BOOL | Indicates whether or not the login attempt was valid. |
InvalidLogin | BOOL | Indicates whether or not the login attempt was invalid. |
ValidLogout | BOOL | Indicates whether or not the logout attempt was valid. |
AutoLogout | BOOL | Indicates that a auto logout occurred. |
HMI | UserAccessMgr_OUT_STAT_HMI_typ[0..UA_MAI_VC] | Structure for HMI errors. |
UserAccessMgr.OUT.STAT.HMI
This is the breakdown of the output status HMI structure.
Name | Type | Description |
---|---|---|
Error | BOOL | Indicates whether or not an error has occured. |
ErrorID | UINT | Indicates which error occured (please see error codes below). ) |
ErrorString | STRING[UA_STRLEN_ERROR] | String giving a description of the error. |
Enumerations
Modes
These are the different mode options this library provides.
Name | Value | Description |
---|---|---|
UA_MODE_DEFAULT | 0 | Sets access manager to check both username and password. |
UA_MODE_PASSWORDONLY | 1 | Sets access manager to only check the password and ignore the user name. |
Error Codes
The following error codes can occur from this function.
- 7000 - UA_ERR_SCRNBUSY - Occurs with the VA_Saccess (used inside the UA_GetTouchAction() ) function when no access to the display is currently possible. Try again in the next cycle.
- 7130 - UA_ERR_TERMNOTCONN - This error occurs when the HMI is not connected to the PLC.
- 7195 - UA_ERR_NODATA - tThis error occurs when a function call has been madde but there is no new data to evaluate from the HMI
- 50000 - UA_ERR_NULLPTR - This error occurs when the a pointer parameter has a value of 0.
- 50001 - UA_ERR_NUMUSERS - This error occurs when using UA_ListUsers() when the numUsers input is set to 0.
- 50002 - UA_ERR_NUMSTRINGS - This error occurs when using UA_ListUsers() when the numStrings input is set to 0.
- 50003 - UA_ERR_STRINGLENGTH - Thi serror occurs when a string was passed into any of the function that exceeds the string length.
- 50004 - UA_ERR_INVALIDUSERNAME - This error occurs when a login attempt occured with the incorrect username.
- 50005 - UA_ERR_INVAILDPASSWORD - This error occurs when a login attempt occured with the incorrect password.
- 50006 - UA_ERR_USERLISTFULL - This error occurs when a user is being added but the max users has been reached.
- 50007 - UA_ERR_USERNOTFOUND - This error occurs when a user name and password are not present on the User List.
- 50008 - UA_ERR_VCHANDLE - This error occurs when the an error occurs while setting up the VCHandle. A possible cause could be passing in an invalid VCName.
- 50008 - UA_ERR_ - This is a general error.