How do I set up an OPC server device?There are two steps to setting up an OPC server device so data and tag values can be collected from it. First, create and define the device. Then, configure a collection plan to use that device.
Create and Define an OPC Server Device
- In the Administrator window of WinSPC, click the Device tool bar button.

- Name and double-click the new device.
- In the Device Setup dialog box that is displayed, at Device Type, select OPC Server. This causes the Connection tab to change to content appropriate for OPC server devices.

(Click to enlarge.)
- On this tab, click the Browse button.
- In the OPC Server Browser that appears, in the bottom left corner, if you know your OPC server supports version 2 or 3, click the Versions 2 and 3 (faster) option. Otherwise, select the Versions 1, 2 and 3 (slower) option.

- Using the left pane of the OPC Server Browser, navigate to the computer on which the OPC server is installed.
- Single-click that computer.
- From that computer's OPC servers (listed on the right), single-click the desired OPC server.
- Click OK. This causes the OPC Server Browser to close and the Machine Name and Server Name fields on the Device Setup dialog to be populated with both the name of the computer on which the OPC server is installed and the name of the OPC server itself.
- In the Device Setup dialog box, at Group Name, enter a name for an item group on the OPC server that will contain the OPC item(s) to be collected by WinSPC if you do not want to accept the default WinSPC group name.
- Check the Use Data Advise check box, if you want the OPC server to automatically send data to WinSPC as the data becomes available. (If you elect not to check this check box, you will define a key combination in the collection plan configuration procedure below which, when pressed, will prompt the OPC server for data.)
- At OPC Server Type, select the highest data access interface supported by the OPC server. (There are three data access interfaces: 1.0, 2.0, and 3.0. WinSPC supports all three of these interfaces.)
- Click OK. The OPC server device is now set up and collection plans can be configured to use it.
Configure a Collection Plan to Use the OPC Server Device
- If a collection plan containing the variables or tags that are to collect values from the OPC server is not created, create it and assign the variables and tags to it as appropriate.
- Double-click the collection plan so the Collection Plan dialog box is displayed.

(Click to enlarge.)
- If a variable is to collect values from the OPC server, on the Step Options tab of this dialog box:
a. Single-click the variable to select it.
b. At Collection Method, select Random if you checked the Use Data Advise check box when you defined the OPC server device.
c. At Collect With, click the Browse button and, in the Device Selector that appears, double-click the OPC server device.
d. At Channel Number / Item Name, click the button with the three dots and, in the OPC Item Browser that is displayed, expose and single-click the name of the OPC item to be collected for the variable, then click OK. This populates the item name in the Collection Plan dialog box.

- If another variable is to collect values from the OPC server, repeat the preceding step.
- If a tag is to collect values from the OPC server:
a. Click the Tag Options tab.
b. On this tab, single-click the tag.
c. At Collect With, click the Browse button and, in the Device Selector that appears, double-click the OPC server device.
d. At Link To, if you want to link the collection of the tag value from the OPC server to the prompting of another device, click the Browse button and, in the Device Selector, double-click this other device. (Linking a device used to collect tag values to a device used to collect data values causes the device used to collect tag values to be prompted whenever the device used to collect data values is prompted. When devices are linked in this way, the device used to collect tag values is prompted first. Once a value for it is received, the other device is prompted. Devices used to collect tag values cannot be linked to other devices used to collect tag values and, consequently, the Link To list does not include devices used to collect tag values.)
e. At Channel Number / Item Name, select the name of the OPC item to be collected for the tag.
f. If desired, uncheck the Allow Keyboard Entry check box and check the Igrore tag values while Tag window is not visible check box.
- If another tag is to collect values from the OPC server, repeat the preceding step.
- If you left the Use Data Advise check box unchecked when you defined the OPC server device:
a. Click the Collection Plan Options tab.
b. On this tab, select a key combination from either the Prompt current device on or Prompt all devices on list. This key combination is what operators will use to prompt the OPC server device for data and tag values.
- Perform any other configuration of the collection plan (e.g. Navigator setup) as desired.
- Click OK. The collection plan is now set up and ready to be loaded into Data Collection and used.
|