Applies To:
  • CitectSCADA 5.xx

Summary:
How does one set up communications in CitectSCADA using the OPC client driver to communicate with the RSLinx OPC Server?

Solution:
Below are the instructions on how to configure CitectSCADA to communicate with your RSLinx OPC Server:

RSLinx OPC Setup:

1. Select 'Communications' menu

2. Select 'Configure Drivers' and configure the driver

3. Select 'DDE/OPC' menu

4. Select 'Topic Configuration'

5. Select 'Data Source' tab

6. Select the PLC in the listing on the right and click on the 'NEW' button in the bottom left of the form

7. Type in a Topic name (i.e. SLC505) - this is used for the OPC Access Path

8. Select 'Advanced Communication' tab

9. Highlight the Topic name on the left and select the driver (if it is not already selected for you)

10. Click on 'Apply'

11. Test the OPC Server with RSLinx's OPC test client

Citect Setup:

I/O Servers Form:
Name:  IOServer_1
Boards Form:
I/O Server Name: IOServer_1
Board Name: OPC_Board
Board Type: OPC
Address: 0
Ports Form:
I/O Server Name: IOServer_1 Number: 1
Port Name: OPC_Port
Board Name: OPC_Board
I/O Devices Form:
I/O Server Name: IOServer_1 Number: 1
I/O Device Name: IODev_1
Address: RSLinx OPC Server
Protocol: OPC
Port Name: OPC_Port
Variable Tags Form:
Tag Address: Name of the tag in the PLC program

 

CITECT.INI Parameters:

[OPCAccessPaths]
IOServer_1.IODev_1=SLC505    
! Syntax: <I/OServerName>.<I/ODeviceName>=<OPCTopicName>

[OPC]
AddItemAsVTEmpty=1
LeaveTagsActive=1
UseArrays=1    
! Bit must be enabled if using arrays

! OPCArrays section must be defined if using arrays:
[OPCArrays]
IOServer_1.IODev_1.Count=1 
    ! Used to specify <n> number of arrays listed in this section
IOServer_1.IODev_1.Array1=RealArray[0],L2 ! Syntax: <I/OServerName>.<I/ODeviceName>.Array<n>=<ArrayTag>,<Delimiter>
IOServer_1.IODev_1.Type1=4 ! Syntax: <I/OServerName>.<I/ODeviceName>.Type<n>=<Value>

Where <n> represents a positive whole integer value. For each device, <n> must be unique for every array definition, typically starting at 1.

Common Possible Values of <Value> are:

<Value> OPC Type Data Type
2 VT_I2 INT
3 VT_I4 LONG
4 VT_R4 REAL
5 VT_R8 STRING
6 VT_CY STRING
7 VT_DATE STRING
8 VT_BSTR STRING
10 VT_ERROR LONG
11 VT_BOOL DIGITAL
17 VT_UI1 BYTE

 

Common Possible Values of <Delimiter> are:

An array of integers of size 10 may be: MyArray[0],L10
An array of bits of the 10 integers may be: MyArray[0]/0,L160

 

NOTE: It is a good idea to run through the Computer Setup Wizard prior to running the project to make sure the role of the PC is set up correctly and the correct I/O Server is enabled.  Also, if you are running OEM RSLinx v2.41 or higher, steps 1 through 4 can be ignored.

For more information concerning OPC arrays and their delimiters, please refer to the Online Help.

 

Keywords:
 

Attachments