Jump to content

Recommended Posts

Posted

Hi, I would like to know how can I add/delete a user account in NA-HMI by using the HMI program and not from the security setting. 
Something like the images below.

Screenshot 2024-04-29 191309.png

Posted

You'll need to script it using the following 3 commands:

            _Hmi_s_AddUser(NewUserName, NewUserRole, NewUserPassword, NewUserComment)
            'There is a slight mishap in AddUser which does not call the save. ModifyUser saves the selections to memory.
             _Hmi_s_ModifyUser(NewUserName, NewUserName,NewUserRole, NewUserPassword, NewUserComment)
            _Hmi_s_DeleteUser(NewUserName)

  • Like 1
Posted
16 hours ago, jie en said:

Thanks photovoltaic,
 But how do I get the user and role from the vb code? 

To get the users and Roles make 2 String arrays - I called them RegisteredUserNames and RegisteredUserRoles

To populate them with the registered users and roles use:

RegisteredUserNames = System.Linq.Enumerable.ToArray(_HMI_s_Users())

RegisteredUserRoles = System.Linq.Enumerable.ToArray(_Hmi_s_Roles())

Posted

Thanks photovoltaic,
Any way for me to export the all this to a SD card and import it? because when I download in the new program i need to key in all the user again.

Posted
12 hours ago, jie en said:

Thanks photovoltaic,
Any way for me to export the all this to a SD card and import it? because when I download in the new program i need to key in all the user again.

Sure - if you want to script that you could - but the easiest way is to simply first transfer the users only from the HMI before you send the project to the HMI. This will add the users to your project. The User Data should show up red when Sysmac detects a mismatch (see picture). Make sure you only select the user data for obvious reasons..

Capture.JPG

Posted

I should add - alternatively if you uncheck the User Data when you transfer to the HMI it will leave the new users untouched. I recommend option 1 though so you have a backup of the new users.

Posted
On 03/05/2024 at 5:01 PM, photovoltaic said:

I should add - alternatively if you uncheck the User Data when you transfer to the HMI it will leave the new users untouched. I recommend option 1 though so you have a backup of the new users.

Is there a list of “_hmi_s_” functions?

Posted

The list can be found in the NA Series Programmable Terminal Software User's Manual in the Sysmac Studio > Manual > NA Series directory on your PC. Section 4 under System - defined Variables.

Posted

Thank you IO_Rack for the suggestion.
I checked the functions " _Hmi_s_AddUser" "_Hmi_s_ModifyUser" "_Hmi_s_DeleteUser" but
there are not in the Omron system manuals.
They are also not shown through autocompilation within the scripts.

These are very interesting functions, and I was wondering if there were any others?

Posted
2 hours ago, Francesco.corradin said:

Thank you IO_Rack for the suggestion.
I checked the functions " _Hmi_s_AddUser" "_Hmi_s_ModifyUser" "_Hmi_s_DeleteUser" but
there are not in the Omron system manuals.
They are also not shown through autocompilation within the scripts.

These are very interesting functions, and I was wondering if there were any others?

I'm sure there are, but there's no available list of them unfortunately.

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...