Connecting Citect to TOP Server 5
How do I connect my Citect client to TOP Server 5?
The example tutorial below uses the simdemo.opf project in TOP Server 5 to create a connection to Citect.
Creating a New I/O Server or Device
- To start, open TOP Server 5. Then, click File ⇒ Open and then select the "simdemo.opf" file in C:\Program Files (x86)\Software Toolbox\TOP Server 5\Projects.
- From the Citect folder, start the Citect Explorer. Then, click File ⇒ New Project. Specify a name, and then click OK.
- In the Project Editor, open the Communication menu. Then, select Express Wizard and click Next.
- If Create a new I/O server is selected, leave the name at its default setting "Ioserver". Then, click Next.
- If Create a new I/O device is selected, leave the name at its default setting "Iodev". Then, click Next.
- Specify the I/O device as External. Then, click Next.
- In the driver list, click the + symbol next to OPC Foundation. Then, click the + symbol to the left of OPC Servers.
- Locate and select OPC, and then click Next.
- The Address or App_ID field equates to the Prog_ID. In this field, enter "SWToolbox.TOPServer.V5". This ID is case sensitive.
- Click Next. Do not select the option to link to an external tag database.
- Click Next. Then, select Finish.
Creating a Variable Tag
- Return to the Citect Project Editor.
- Next, open the Tags menu and select Variable Tags. Then, do the following:
- Specify a tag name. For this example, use "Boolean1".
- Specify a data type. For this example, select "Digital".
- In I/O Device Name, select the device that was created with the Express Wizard. In this example, select "IODev".
- In the Address field, enter "Data Type Examples.16 Bit Device.K Registers.Boolean1".
- Leave the rest of the parameters blank, and then click Add.
- Next, click File ⇒ Compile.
Creating a New Page
- Click Tools ⇒ Graphics Builder. Then, do the following:
- Click File ⇒ New. Then, select Page. In the template window, select Normal and then click OK.
- In the toolbox, click the Button icon. Then, draw a button.
- Next, edit the button. Open the Input tab, and then enter "toggle(Boolean1)". Then, click OK.
- In the toolbox, click the Symbol Set icon (which resembles a fan) and place it next to the button.
- Next, open the Appearance tab, and then enter the tag name "Boolean1". Alternatively, click the Insert icon and then insert a tag.
- Once finished, click OK.
- Next, return to the Graphics Builder. Then, click File ⇒ Compile.
- Click File ⇒ Save.
Viewing the Connection
- Next, click File ⇒ Run.
- Toggle the button: the indicator should change. 1 client and 1 tag should be visible on the TOP Server 5 Connection Status Bar in the server window.