Applies To:
  • CitectSCADA 1.00 1.01 1.10 1.11 1.20 2.00 2.01

Summary:
Question: How do I configure a redundant disk PLC? 

Solution:
Configure two disk PLCs - one on the hard drive of each I/O Server. In normal operation, each IO Server will be reading and writing to the disk PLC on the hard drive of the other PC. In the event of a failure by one of the IO Servers, the working IO Server will start communicating with the disk PLC on its own hard drive. The following examples show how to configure the units databases:
 
I/O Devices form
Server Name: IOServerA
Unit Name: Disk_PLC1
Unit Number: 1
Unit Address: D:\Citect\User\MyDB\Tiway.PLC *
Protocol: TIWAY
Port Name: DISKDRV
Startup Mode: Primary

* The D drive (on IOServerA) must be mapped to the C drive on IOServerB.

Communication, Units database

I/O Devices form
Server Name: IOServerA
Unit Name: Disk_PLC1
Unit Number: 1
Unit Address: C:\Citect\User\MyDB\Tiway.PLC
Protocol: TIWAY
Port Name: DISKDRV
Startup Mode: Standby
I/O Devices form
Server Name: IOServerB
Unit Name: Disk_PLC2
Unit Number: 2
Unit Address: D:\Citect\User\MyDB\Tiway.PLC *
Protocol: TIWAY
Port Name: DISKDRV
Startup Mode: Primary

* The D drive (on IOServerB) must be mapped to the C drive on IOServerA.

I/O Devices form
Server Name: IOServerB
Unit Name: Disk_PLC2
Unit Number: 2
Unit Address: C:\Citect\User\MyDB\Tiway.PLC *
Protocol: TIWAY
Port Name: DISKDRV
Startup Mode: Standby

Whenever Citect writes to the PLC, it must be made to write to both disk PLCs. You must duplicate each PLC address (in the Variable Tags database) that Citect needs to write to (this will not effect the IO count) and configure two commands, Cicode functions, reports, etc that write to the disk PLCs. The following example defines a Variable Tag and keyboard command to write to both disk PLCs.

Variable Tags
Name: Tag_1
Data Type: INT
Unit Name: Disk_PLC1
Address: V1
Name: Tag_2
Data Type: INT
Unit Name: Disk_PLC2
Address: V1
Page Keyboard
Page Name: Mimic
AN: INT
Key Sequence: ### ENTER
Command: Tag_1=Arg1; Tag_2=Arg1

If you have several occurrences of this double command, it will probably be easier to assign a label or write a Cicode function for each command.

The above configuration will work if Citect is shutdown - but not if the PC is switched off. To allow for shutdown of the PC, a Cicode function will be required to restore the stale PLC file. The function will first check which IO Server is being started up, and will then set the correct disk PLC values. The following is a sample function:

FUNCTION
RestorePLC()

IF SeverInfo("Server",0) = "IOServerA" Then
Tag_1 = Tag_2;
/* Duplicated for all tags*/
ELSE
Tag_2 = Tag_1;
/* Duplicated for all tags*/
END

END

To automatically run the Cicode function, use the startup parameter [CODE] Startup, for example [CODE] Startup=RestorePLC.

Note: Redundant Disk PLCs will be supported directly in Citect version 3.00.

 

Keywords:
 

Attachments