Communicate with programmable logic controllers
You can collect programmable controller data via OPC servers to
Allen-Bradley®
and non-Allen-Bradley devices.FactoryTalk View Studio
is an OPC client. The default OPC server installed with FactoryTalk View Studio
is FactoryTalk Linx
. However, you can use third-party OPC servers to communicate with your application's data sources. Most OPC servers are capable of communicating with a variety of devices over a variety of networks using a variety of protocols.To communicate with programmable controllers
- Specify aFactoryTalk Linxor OPC server for your application.
- Configure a device shortcut, that is, a path between the data server and each controller you want to use as a data source.
- Add device tags to the tag database for your application, or use direct references to objects in the graphic displays.
To specify an OPC server for your project
- In theExplorerwindow, select the application name at the root of the tree and right-click; then selectNew Data Server.
- Select.FactoryTalk Linxor OPC Data Server
- In theOPC Data Server Propertiestab(s), specify the OPC server name (ProgID), host computer name (if the server is remote), your name for the server and, optionally, a description. Click theBrowsebutton to select from the list of available servers.
To configure third-party OPC communications
Once you have added a third-party OPC server to your application, the
Tag Browser
should display that server's data items in the correct syntax for that server.To configure
FactoryTalk Linx
communicationsIf you are using a
FactoryTalk Linx
data server, this step creates the communications configuration file that your application uses to communicate with the devices on the network. You can create separate configurations for testing during development and for actual use at runtime.- In the Applications Explorer, select theFactoryTalk Linxdata server.
- Double-click Communications Setup to open the Configuration Wizard.
- Create a new configuration and clickFinish.
- In theCommunications Setupeditor, add devices, set up device shortcuts, and construct a communications tree. As you add devices, you define their IP addresses. In the left pane, create and name shortcuts between the server and devices. Then select a device in the right pane and click Apply. You can continue to add devices by right-clicking the elements of the tree and selecting from the applicable devices.TIP:Shortcuts configured on theTargettab apply to the communications configuration of the runtime terminal. This file is downloaded to the runtime terminal with the application and can be used with the application at runtime. Shortcuts configured in theLocaltab apply to the communications configuration of the development computer. The same shortcut names are used in both instances, but they can be configured to refer to different devices.The tree in theLocaltab is reflected in the Communications Explorer. Changes made in one will also appear in the other.
To add OPC server tags
- In theTag Databaseeditor inFactoryTalk View Studio, create a new analog, digital, string or array tag. Block tags are not supported in an OPC server.
- In theData Sourcebox, selectDevice.
- Click theBrowsebutton in theAddressbox to open theTag Browser.
- In the left pane, select the OPC server that your application is using.
- Open the Online item to show the single element processor tags in the right pane. Multi-element tags and program tags are listed in the left hand pane, below the Online heading. Click any of them to show their elements in the right hand pane.
- Click
beside the tag that you want to use. The full path to the tag you selected appears in the
Addressbox, in the correct syntax for the data server you are using. - ClickAccept.TIP:The OPC server is configured separately. Before you can add a data server to your application, the data server must be correctly installed on the local computer or on a remote computer accessible via a network.
Provide Feedback