Note To run the sample code in the following examples, you must have the Matrikon OPC Simulation Server available on your local machine. For information on installing this, see. Software Toolbox DCOM Tutorial. Play sniper elite 4 free. Distributed COM (DCOM) is a Microsoft technology that provides Windows applications with the ability to connect from one computer to another on a LAN, a WAN, or an Internet connection. For example, DCOM allows the OPC client application to communicate from one computer to the OPC server on another computer. UaToolkit Embedded Full and Trial Version V1.20 (Linux Installer); uaToolkit Embedded Full and Trial Version V1.20 (Windows Installer); OPC UA Demo Client. The code requires only minor changes to work with other servers. The example in this topic uses the OPC Data Access Explorer app. In addition, each step contains information on how to complete that step using command-line code. The entire example is contained in the example file opcdemo_quickstart. Step 1: Open the OPC Data Access Explorer Double-click the OPC Data Access Explorer in the Apps menu. The app opens with no hosts, servers, or toolbox objects created. The following figure shows the main components of the OPC Data Access Explorer. In the following steps, you will fill each of the panes with information required to log data, and you will log the data, by creating and interacting with OPC Toolbox objects. Command-Line Equivalent To open the OPC Data Access Explorer from the command line, type opcDataAccessExplorer at the MATLAB ® prompt. Step 2: Locate Your OPC Server In this step, you obtain two pieces of information that the toolbox needs to uniquely identify the OPC server that you want to access. You use this information when you create an OPC Data Access Client object ( opcda client object), described in. The first piece of information that you require is the hostname of the server computer. The hostname (a descriptive name like PlantServer or an IP address such as 192.168.16.32) qualifies that computer on the network, and is used by the OPC Data Access protocols to determine the available OPC servers on that computer, and to communicate with the computer to establish a connection to the server. In any OPC Toolbox application, you must know the name of the OPC server’s host, so that a connection with that host can be established. ![]() Your network administrator will be able to provide you with a list of hostnames that provide OPC servers on your network. In this example, you will use localhost as the hostname, because you will connect to the OPC server on the same machine as the client. The second piece of information that you require is the OPC server’s server ID. Each OPC server on a particular host is identified by a unique server ID (also called the Program ID or ProgID), which is allocated to that server on installation. ![]() The server ID is a character vector, usually containing periods. Although your network administrator will be able to provide you with a list of server IDs for a particular host, you can query the host for all available OPC servers. Discusses how to query hosts from the command line. Using the OPC Data Access Explorer you can browse a host using the following steps. AllServers = 'Matrikon.OPC.Simulation.1' 'ICONICS.Simulator.1' 'Softing.OPCToolboxDemo_ServerDA.1' Step 3: Create an OPC Data Access Client Object Once you have determined the hostname and server ID of the OPC server you want to connect to, you can create an opcda client object. The client controls the connection status to the server, and stores any events that take place from that server (such as notification of data changing state, which is called a data change event) in the event log. The opcda client object also contains any Data Access Group objects that you create on the client. For more information on the OPC Toolbox™ object hierarchy, see. With the OPC Data Access Explorer, you can create a client directly from the Hosts and OPC Servers pane. Right-click the Matrikon server node and choose Create client. A client will be created in the OPC Toolbox Objects pane, as shown in the following figure.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |