~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ P L B B L O C K S O U R C E L I S T E R Version 1.2 - May 1999 Version 3.0 - Mar 2023 by Kevin Millar (kmillar@ihug.co.nz) W. Arthur Fisher (NZ) Limited ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This utility reads the ladder logic definition file for an I/A PLB block, and prints the contents of the file to the standard output device. The output can include a list of the labels used (or all labels in the block), the ladder logic of the block, a cross-reference list of the labels used and timer/counter preset and reset values. The ladder logic definition files are binary files stored in the compound directory, named after the block and with a .p extension. With ICC, the compound directories are located under the Control Configurator directory. By default, the utility will assume the compound directories are located in the directory "/opt/fox/ciocfg". This is the standard location for stations hosted by 50/70 Series processors using ICC. In ControlEditor systems, ladder logic definition files are stored somewhere in the Galaxy but can be exposed by use of Direct Access report commands. When these files have been reported out, this program can print the content of each with the file name specified using the '-f file_path' option Options -help prints the help pages Output Options -l[a] prints the labels (and types) of the TechIDs used within the PLB block. The additional 'a' option will force the utility to output the labels for ALL of the TechIDs. The inputs to the PLB block (contacts and flags) are shown as normally open contacts. -t[a] prints a list of the preset and reset values defined for the timers and counters. The additional 'a' option will force the utility to output the labels for ALL of the timers and counters. -r prints ladder logic rungs -x print cross-reference listing of the labels used within the ladder logic. Each TechID used is output with its label and a list of rungs that the TechID appears in. If the rung outputs to the TechID, the rung number is marked with a '*'. Location Option -d base_dir define the name of base directory. By default the utility assumes the compound directories are located in the directory "/opt/fox/ciocfg/". This option will allow the utility to load the ladder logic definition files from other locations. An example of this would be able to access the files from a SaveAll floppy. If the SaveAll floppy is mounted on the directory "f0", use the option "-d /f0" to access the ladder logic files. Use the option "-d ." when the compound directories are located in the current directory -f file_path specify the actul file used as source. 'file_path' can be a reletive or absolute path. The '.p' must be included. "/opt/fox/ciocfg/". This option will allow the utility to load the ladder logic definition files from other locations. Note that when the '-f' option is used, the COMPOUND and BLOCK arguments are not needed, and the '-d' will be ignored. Format Options -p length set page length (in lines). The default length is 60 lines. For a continuous output, use a length of 0. -w width set page width (in characters). The default width is 84 characters. If a narrower width is selected then the timer and counter preset and reset values can not be printed beside the timer or counter in the ladder logic rungs. If none of the output options are specified, the utility will output the labels, the ladder logic rungs and cross reference listings. Please email comments, bug reports etc to "kmillar@ihug.co.nz".