
# 准备数据源
#### 安装OPC-UA服务器模拟器
1. 访问[Prosys OPC UA Simulation Server下载页面](https://downloads.prosysopc.com/opc-ua-simulation-server-downloads.php)，下载并安装最新版本的Prosys OPC UA Simulation Server模拟器。
2. 安装完毕后，启动Prosys OPC UA Simulation Server模拟器。 
   ![](https://support.huaweicloud.com/bestpractice-iotedge/figure/zh-cn_image_0000001188175662.png "点击放大")
   
   
3. Connection Address即是该OPC-UA服务端提供给OPC-UA Client端进行连接的地址。 
   其暴露的URL通常格式如"opc.tcp://{主机名}:53530/OPCUA/SimulationServer"。需把主机名替换为该服务器的公网IP。如 opc.tcp://121.36.62.255:53530/OPCUA/SimulationServer
   
   
4. 配置OPC-UA服务端的用户身份，添加一个用户名和密码，如
   
   - 用户名：edge-test
   
   - 密码：1234
   
   
   ![](https://support.huaweicloud.com/bestpractice-iotedge/figure/zh-cn_image_0000001199429322.png "点击放大")
   
   
5. 定义数据源属性。 
   例如在OPC UA服务端模拟器的地址空间中，可认为Simulation是接入OPC UA服务端的一个设备，该设备有 Counter, Random等属性数据，地址为ns=3;i=1001和ns=3;i=1002。
   ![](https://support.huaweicloud.com/bestpractice-iotedge/figure/zh-cn_image_0000001188185782.png "点击放大")
   ![](https://support.huaweicloud.com/bestpractice-iotedge/figure/zh-cn_image_0000001233783899.png "点击放大")
   
   
 
