Applies To:
  • CitectSCADA 3.00

Summary:
How do I use the Disk Driver? 

Solution:
This version automatically configure the disk similar to memory PLC. The disk format is still the same as that used by ctdisk.exe but ctdisk.exe will not read the new format properly. Only single record is supported.
I/O Devices form
Name: User supplied unique name
Number: Network wide I/O device number
Address: File list
Protocol: Any protocol
Port name: DISKDRV

File List. The newest file from the list will be used to initialise the disk plc. Disk files must have write permission. If a corrupted file is detected while reading or writing, its mode is changed to read-only. If no valid file is found, the disk plc will be initially empty. It will grow to the size given in each read or write request.

eg. file1.plc, c:\data\file2.plc
will check the following files

[ctedit]run\file1.plc
file1.plc
c:\data\file2.plc

Citect.ini options

[DISKDRV]
UpDateTime = 30 seconds
If data in a disk PLC is changed, it will be written back to disk UpDateTime later. It will attempt to write to the disk files in the File List starting from the first file, it will stop writing after it successfully writes to a disk file. If it cannot write to any file then the PLC is put offline.

Standard citect.ini options

[DISKDRV]
MaxPending = 4
Block = 80 bytes
Retry = 0
Delay = 1. Delay one request at a time.
TimeOut = 2000 milliseconds
PollTime = 1000 milliseconds. Time between checks for disk PLC that has changed data and needs to be written back to disk. The driver will internally set the polltime to the UpDateTime divided by the total number of disk PLCs if it is less than 1 second. Only one file will be updated per polltime.
WatchTime = 30 seconds

Files

  • DISKDRV.DLL - New Disk Driver for windows
  • ODISKDRV.DLL - Old Disk Driver, must be renamed to DISKDRV.DLL to be used. Not to be distributed with CITECT unless requested by customer.

Error Codes (in hexadecimal)

30 Cannot open file
31 Bad file header
32 Bad variable header
33 Out of memory
34 Cannot read from disk
35 Cannot write to disk
36 Cannot seek disk
37 Cannot create memory queue

 

Keywords:
 

Attachments