Using System API I cannot change the system time of my remote target (CVS, cRIO, sbRIO, IC)

Updated Aug 19, 2020

Reported In

Hardware

  • CVS-1458
  • CVS-1456
  • Industrial Controller
  • sbRIO-9862
  • CompactRIO Controller

Operating System

  • LabVIEW Real-Time (NI Linux Real-Time)

Issue Details

I want to set the system time of my remote target (CVS, cRIO, sbRIO, IC) using the Get and Set Time.vi Example in LabVIEW.



I am connected to the target and if I want to set system time I get the error message:

nisyscfg.lvlib:Save Changes (Hardware).vi:320001<APPEND>
Error -2147467263 bei nisyscfg.lvlib:Save Changes (Hardware).vi:320001
LabVIEW:  (Hex 0x80004001) Not implemented.
NI System Configuration:  (Hex 0x80004001) This operation is not implemented for this target or resource.


This error message looks as if System API is not installed, but in MAX I can see it is correctly installed.
What can I do to set system time correctly?

Solution

To set system time, you need to log in to the system with a user who has SetSystemConfiguration as permission group. For example, the admin user has these rights. In LabVIEW, you have to set User Name and Password correctly.
If you do not login as admin, you will get an not implemented error message, as the user has no access to these libraries at all. This is Linux RT expected behavior for security reasons: An attacker without sufficient rights will not know if a function they try to use is installed or not.
 
 

Additional Information

If you do not want to use Admin to set system ressources like system time you can create a user especially for that. To do so, follow these steps:

1. Open NI Measurement & Automation Explorer (NI MAX)
2. In NI MAX, go to Remote Systems, search for your target and right-click on the target name. Choose Web Configuration


3. A browser launches the web configuration. Go to the Security Configuration Tab



4. There, you will find a list of users (usually only admin is preset). Now you have to create a user and assign SetSystemConfiguration as permission
4.1 Click + in the lower third of the window. A newuser0 will appear in the list below admin



4.2. Name the new user appropriately (i.e. SystemConfigurationUser) and set a password using the Change Password button.


4.3 By default the user is part of the everyone. With this group, the user already has SetSystemConfiguration user rights.
4.4 Make sure you press Save. After that you can use the newly created user.



​​​​​Note:
Depends on a network configuration of your system try to set the Target address exactly to the IP address of HW instead of Instrument Reference.