转换

<< 点击显示目录 >>

主页  OPC UA使用助手 > OPC UA 帮助 > 在AS中配置 > OPC UA default view配置 > OPC UA default view编辑器 >

转换

文件版本

在Automation Studio 4.4.1及以后的版本中,文件格式4被用于默认视图(UAD文件)中的数据。这在保存时提供了更好的性能,在处理文件时使用更少的内存。在Automation Studio 4.4.1及以后的版本中,当打开用旧AS版本创建的UAD文件时,会显示以下对话框。

opcua_oldfileversion

保存时,该数据使用文件格式4进行存储。在这之前,只显示启用的UA标签。构建过程仍然可以处理旧的文件版本。

授权

在AR<A4.23中, CPU configuration settings 和属性 "Access right"定义了授权。授权设置被转换,以便在将AR版本改为≥A4.23时,这些设置不会丢失。这确保在改变AR版本后,具有相同用户及其访问权限的OPC UA服务器可以像以前一样被访问。

为此,最多设置两个用户和角色,访问权设置被转换为角色的权利。

用户和角色

当AR版本被改变时,在 user role system中设置了以下具有指定角色的用户(如果它还没有被设置) 。

用户

角色

描述

<Username>

Administrators

用CPU配置中分配的 "Username " "密码Password "创建一个新用户  ;该用户被分配到 "Administrators ""Everyone " 角色 。

Anonymous

Everyone

如果在CPU配置中启用了匿名访问("Allow anonymous access"),就会创建一个新的用户,并将其分配给 "Everyone"角色 。


Converting rights

Access rights are converted implicitly if necessary (i.e. current AR ≥A4.23 and file was last saved with an older version of AR) when opening the default view editor and during build. Roles "Administrators" and "Everyone" (if anonymous access was enabled) are first added for this on node "Default view":

Role "Administrators" receives all access rights including "write access".

Role "Everyone" receives all other access rights and "write access" only if anonymous access was defined in the CPU configuration with "write access" ("Anonymous access rights").

The access right settings are then converted into the rights of the added roles for every enabled PV. There are different options for conversion depending on whether and how anonymous access was configured.

转换权限

如果有必要,在打开默认视图编辑器和构建过程中,访问权限会被隐式转换(即当前的AR≥A4.23,而文件最后是用旧版本的AR保存的)。角色 "Administrators "和 "Everyone"(如果启用了匿名访问)首先被添加到节点 "Default view "上。

角色 "Administrators "获得所有访问权限,包括 "write access"。

角色 "Everyone "接收所有其他访问权限和 "write access",只有当匿名访问在CPU配置中定义了 "write access"("Anonymous access rights")。

然后,访问权限设置被转换为每个启用的PV的新增角色的权限。根据是否配置了匿名访问以及如何配置,有不同的转换选项。

启用写权限的角色的转换

"Administrators "和 "Everyone "角色的权利(如果启用了 "write access "的匿名访问)按照以下模式转换:

AR <A4.23

AR ≥A4.23

访问权

设定的权限

未设置的权限

None

Visible, browse, history read, execute

Subscribe, read, write, history read, attribute write

Read

Visible, browse, subscribe, read, history read, execute

Write, history write, attribute write

Write

Visible, browse, write, history read, execute, attribute write

Subscribe, read, history write

Read/Write

继承到 "inherit everything"

对禁用写权限的角色的转换

如果匿名访问只启用了 "read permission",那么 "Everyone "角色的权限将按照以下模式转换。

AR <A4.23

AR ≥A4.23

访问权

设定的权利

未设置的权利

None

Visible, browse, history read, execute

Subscribe, read, write, history write, attribute write

Read

Visible, browse, subscribe, read, history read, execute

Write, history write, attribute write

Write

Visible, browse, history read, execute

Subscribe, read, write, history write, attribute write

Read/Write

继承到 "inherit everything"

例子: 只有在 "read permission "的情况下才会启用匿名访问:

AR <A4.23

opcua_oldarproperty

AR ≥A4.23

opcua_newarproperty