jie en Posted April 29, 2024 Report Posted April 29, 2024 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. Quote
photovoltaic Posted April 29, 2024 Report Posted April 29, 2024 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) 1 Quote
jie en Posted April 29, 2024 Author Report Posted April 29, 2024 Thanks photovoltaic, But how do I get the user and role from the vb code? Quote
photovoltaic Posted April 30, 2024 Report Posted April 30, 2024 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()) Quote
jie en Posted May 3, 2024 Author Report Posted May 3, 2024 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. Quote
photovoltaic Posted May 3, 2024 Report Posted May 3, 2024 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.. Quote
photovoltaic Posted May 3, 2024 Report Posted May 3, 2024 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. Quote
Francesco.corradin Posted May 30, 2024 Report Posted May 30, 2024 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? Quote
IO_Rack Posted May 30, 2024 Report Posted May 30, 2024 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. Quote
Francesco.corradin Posted May 30, 2024 Report Posted May 30, 2024 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? Quote
photovoltaic Posted May 30, 2024 Report Posted May 30, 2024 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. 1 Quote
Recommended Posts
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.