Supported platforms: CODESYS 3.5 SAFETY

 

PasswordChange (External FUN)

Description

This function changes password for given user.

 

Limitations

Before using this function it is necessary to unlock system with PasswordUnlock. See also Unlocking SW protection and How To Set Password.

 

The given old password must be correct to change the password.

 

Inputs

Input variable name

Data type

Description

i_User

STRING(20)

Username which is used to unlock.

i_OldPassword

STRING(20)

Current user password.

i_NewPassword

STRING(20)

New password.

 

Return value

Data type

Description

SYSTEM_ERROR_CODES

Returned error code. See details in Data Types page.

 

Example code

Definitions:

 

error_code:EPEC_SYSTEM.SYSTEM_ERROR_CODES;

 

 

Code:

 

error_code := EPEC_SYSTEM.PasswordChange(

i_User := 'User',

i_OldPassword := 'oldpassword',

i_Password := 'newpassword'

);

 

 

 

See also

Unlocking SW protection

 

How To Set Password

 

 

Source file topic001042.htm

Last updated 26-Aug-2026