USEC/PGDP manually calculates and maintains a set of 200 pressure values that represent targets for each of the 200 cells in their system. The calculation is performed outside the PICS environment. EVI was tasked with creating a pair of applications, one to run outside PICS, and one to run inside, that would provide a quick, easy way to update the gradient dataset that PICS is currently using. The current dataset in use on PICS must also be retrievable using the same applications. The Gradient Send/Receive applications (described below) were designed and created to meet these requirements.
The calculations used to produce a gradient may be performed by a FORTRAN application that outputs its results in a file named C:\PICFUT or an Excel application that outputs its results in a file named C:\grad\PICFUT.txt (the filenames and locations are configurable in the gSend.ini file).

The gSend main window is shown above (with zero values configured to display as blanks).

The gSend main window is shown above (with zero values configured to display in red).

The gSend configuration window is shown above. Note that the sample IP addresses shown are invalid (using them to send or receive a gradient may cause the program to become unresponsive). The IP addresses should be set to those where the gRecv application (described in the next section) is running. Because gSend is not a PICS application, it will not be able to determine which gRecv is primary, so gSend will attempt to connect to both addresses and then send the gradient to the address that accepts a connection.
The cell and unit sequences will most likely be correct by default, but they are provided should there ever be any reason to change them. The cell sequence describes the order that cell values appear in the columns (for both input and output files). The unit sequence describes the sequence that the units will be listed in the output files. The unit sequence is "discovered" from the input files by using the unit name from the first column of each record. (In fact, the cell sequence may also be defined in an input file by including a CELLSEQ line before the unit records.)
The row coloring table allows selection of the row background colors (by clicking the Color buttons) and assignment of a color to each row. This allows the customer to configure the display to visually group things in a way that makes sense locally.
The two 'Show ZERO' options affect how zero values are displayed in the main window. Because zero values have a special meaning, this allows the customer to highlight them in two different ways.

Each gradient is assigned an ID number. When a gradient is loaded from the FORTRAN or EXCEL files, that number is not known, so gSend uses negative one (-1) as a signal that no gradient ID has been set. If you try to send the gradient to PICS with an ID of -1, the prompt show above will appear to remind you that you forgot to assign an ID (but also allowing you to go ahead and send -1 if you really want to...).
An example of the expected format (as defined/provided by USEC/PGDP) for the FORTRAN data file follows. gSend's input process is fairly flexible, it takes only the gradient description from the first line, then it looks for lines beginning with unit numbers (or names) that contain a sequence of values with two digits after the decimal. It ignores all other lines.
PT-275 900 MW GRADIENT 2.0% w/ 1.2% Side 8/ 4/2005
PLANT MW 900.0 UPPER MW 450.60 LOWER MW 400.40 SW 9562.86
11 12017. 2.0000
12 0. 0.0000
13 9603. 1.2000
14 0. 0.6500
15 40130. 0.3912
6 0. 0.0000
7 5018. 0.0000
8 4545. 0.0000
9 9563. 0.0000
10 0. 0.0000
21 61750. 0.8300
22 62724. 0.7110
23 0. 0.0000
24 41104. 0.2200
0 0. 0.0000
0 0. 0.0000
331 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
331 2 1.80 1.80 2.64 3.11 0.00 0.00 3.67 4.28 4.85 5.50 27.65 22.24
331 3 8.25 8.23 7.48 7.31 6.15 4.68 4.03 3.00 0.00 3.00 52.14 38.97
331 4 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
333 1 3.22 3.53 3.69 3.91 4.08 4.30 4.53 4.70 4.94 5.08 41.97 49.09
333 2 5.28 5.41 5.64 5.78 5.87 6.14 6.27 0.00 6.45 6.51 53.34 60.77
333 3 6.72 6.83 6.96 6.96 6.94 6.68 6.71 6.55 6.49 6.43 67.29 76.24
333 4 6.28 6.30 5.93 6.00 5.96 0.00 5.88 5.78 5.60 5.61 53.33 61.16
333 5 5.56 5.53 5.50 5.34 5.24 5.23 5.02 4.83 5.01 4.97 52.24 59.86
333 6 0.00 0.00 0.00 4.91 4.71 0.00 4.87 4.93 4.70 4.56 28.68 32.06
335 1 0.00 2.50 2.50 2.50 2.50 2.66 3.18 3.52 4.10 4.65 28.11 23.04
335 2 9.43 9.64 8.70 8.56 7.71 7.21 6.70 6.24 5.84 5.45 75.48 54.85
335 3 5.27 4.91 4.59 4.33 3.99 3.86 3.44 3.12 3.00 3.00 39.51 30.86
335 4 3.00 3.00 3.00 3.00 3.00 3.00 3.00 3.00 3.00 0.00 27.00 22.40
337 1 0.00 2.72 2.90 3.21 3.52 3.80 4.00 4.16 4.37 4.48 33.17 38.42
337 2 4.57 0.00 4.71 4.74 4.96 5.13 0.00 0.00 5.46 5.38 34.95 40.20
337 3 0.00 6.08 6.00 6.07 0.00 6.12 6.32 6.73 6.62 6.67 50.61 56.92
337 4 0.00 0.00 6.65 0.00 7.41 7.72 7.73 7.43 7.58 7.57 52.11 57.37
337 5 0.00 7.84 8.14 8.47 7.94 7.80 7.50 7.95 7.53 7.31 70.48 77.46
337 6 6.91 6.81 0.00 0.00 0.00 6.72 5.99 6.12 5.94 5.58 44.06 48.21
331 1 0.2200 0.2200 0.2200 0.2200 0.2200 0.2200 0.2200 0.2200 0.2200 0.2200
331 2 0.2290 0.2353 0.2416 0.2474 0.2474 0.2474 0.2532 0.2589 0.2647 0.2705
331 3 0.6846 0.6995 0.7135 0.7289 0.7450 0.7610 0.7797 0.8009 0.8009 0.8300
331 4 0.8300 0.8300 0.8300 0.8300 0.8300 0.8300 0.8300 0.8300 0.8300 0.8300
333 1 0.2754 0.2804 0.2855 0.2906 0.2957 0.3009 0.3062 0.3115 0.3169 0.3223
333 2 0.3278 0.3333 0.3390 0.3447 0.3505 0.3563 0.3623 0.3623 0.3682 0.3742
333 3 0.3804 0.3866 0.3929 0.3993 0.4059 0.4125 0.4193 0.4262 0.4332 0.4404
333 4 0.4477 0.4552 0.4627 0.4704 0.4783 0.4783 0.4862 0.4944 0.5027 0.5112
333 5 0.5198 0.5286 0.5376 0.5468 0.5562 0.5657 0.5753 0.5852 0.5953 0.6056
333 6 0.6056 0.6056 0.6056 0.6162 0.6269 0.6269 0.6379 0.6485 0.6594 0.6704
335 1 0.3912 0.4039 0.4145 0.4234 0.4307 0.4372 0.4439 0.4538 0.4638 0.4739
335 2 1.0289 1.0497 1.0705 1.0926 1.1144 1.1361 1.1583 1.1809 1.2041 1.2280
335 3 1.2536 1.2799 1.3066 1.3342 1.3622 1.3921 1.4217 1.4516 1.4834 1.5186
335 4 1.5572 1.5987 1.6459 1.6989 1.7425 1.7902 1.8426 1.8998 1.9621 1.9621
337 1 0.4739 0.4821 0.4904 0.4987 0.5073 0.5162 0.5252 0.5342 0.5434 0.5527
337 2 0.5621 0.5621 0.5715 0.5810 0.5904 0.6003 0.6003 0.6003 0.6103 0.6202
337 3 0.6202 0.6305 0.6408 0.6512 0.6512 0.6617 0.6724 0.6833 0.6943 0.7054
337 4 0.7054 0.7054 0.7166 0.7166 0.7282 0.7398 0.7516 0.7635 0.7756 0.7879
337 5 0.7879 0.8002 0.8128 0.8259 0.8387 0.8516 0.8652 0.8791 0.8933 0.9077
337 6 0.9214 0.9354 0.9354 0.9354 0.9354 0.9497 0.9644 0.9799 0.9942 1.0098
310 1 2.0000 2.0000 2.0000 2.0000 2.0000
TOP STAGE ASSAYS
An example of the expected format (as defined/provided by USEC/PGDP) for the EXCEL data file follows. gSend's input process is fairly flexible, it takes only the gradient description from the first line, then it looks for lines beginning with unit numbers (or names) that contain a sequence of values with two digits after the decimal. It ignores all other lines.
900 MW GRADIENT 08/09/2005 12:37:27.00
PLANT MW 900.0 UPPER MW 450.60 LOWER MW 400.40 SW 9563.06
11 12017. 2.0000
12 0. 0.0000
13 -9603. 1.2000
14 0. 0.6500
15 40130. 0.3912
6 0. 0.0000
7 5018. 0.0000
8 4545. 0.0000
9 9563. 0.0000
10 0. 0.0000
21 61750. 0.8300
22 62724. 0.7110
23 0. 0.0000
24 41104. 0.2200
0 0. 0.0000
0 0. 0.0000
331 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
331 2 1.80 1.80 2.64 3.02 0.00 0.00 3.68 4.26 4.84 5.48 27.52 22.16
331 3 8.27 8.25 7.50 7.35 6.18 4.73 3.99 3.00 0.00 3.00 52.26 39.05
331 4 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
333 1 3.21 3.51 3.68 3.90 4.06 4.29 4.51 4.68 4.92 5.06 41.83 48.94
333 2 5.26 5.39 5.63 5.77 5.85 6.12 6.25 0.00 6.43 6.49 53.18 60.61
333 3 6.70 6.82 6.94 6.98 6.96 6.70 6.73 6.57 6.51 6.45 67.36 76.31
333 4 6.29 6.32 5.94 6.01 5.97 0.00 5.88 5.78 5.61 5.62 53.42 61.25
333 5 5.57 5.54 5.51 5.35 5.25 5.24 5.03 4.84 5.02 4.98 52.33 59.96
333 6 0.00 0.00 0.00 4.91 4.72 0.00 4.88 4.94 4.71 4.57 28.73 32.11
335 1 0.00 2.50 2.50 2.50 2.50 2.63 3.15 3.49 4.06 4.61 27.93 22.92
335 2 9.50 9.72 8.77 8.63 7.78 7.27 6.76 6.29 5.89 5.49 76.10 55.26
335 3 5.31 4.95 4.63 4.37 4.02 3.89 3.47 3.14 3.01 3.00 39.78 31.04
335 4 3.00 3.00 3.00 3.00 3.00 3.00 3.00 3.00 3.00 0.00 27.00 22.40
337 1 0.00 2.70 2.88 3.18 3.50 3.78 3.98 4.13 4.34 4.45 32.94 38.19
337 2 4.54 0.00 4.68 4.72 4.94 5.10 0.00 0.00 5.43 5.35 34.75 39.99
337 3 0.00 6.05 5.97 6.04 0.00 6.09 6.29 6.70 6.59 6.64 50.36 56.66
337 4 0.00 0.00 6.62 0.00 7.38 7.69 7.69 7.40 7.55 7.54 51.87 57.13
337 5 0.00 7.80 8.11 8.44 7.94 7.85 7.55 8.01 7.59 7.36 70.65 77.62
337 6 6.96 6.86 0.00 0.00 0.00 6.77 6.03 6.17 5.98 5.62 44.38 48.53
331 1 0.2200 0.2200 0.2200 0.2200 0.2200 0.2200 0.2200 0.2200 0.2200 0.2200
331 2 0.2290 0.2353 0.2416 0.2473 0.2473 0.2473 0.2531 0.2588 0.2646 0.2704
331 3 0.6845 0.6993 0.7133 0.7288 0.7450 0.7611 0.7797 0.8009 0.8009 0.8300
331 4 0.8300 0.8300 0.8300 0.8300 0.8300 0.8300 0.8300 0.8300 0.8300 0.8300
333 1 0.2753 0.2803 0.2854 0.2904 0.2956 0.3007 0.3060 0.3113 0.3167 0.3221
333 2 0.3276 0.3331 0.3388 0.3444 0.3502 0.3561 0.3620 0.3620 0.3679 0.3739
333 3 0.3801 0.3863 0.3926 0.3990 0.4056 0.4122 0.4190 0.4259 0.4329 0.4401
333 4 0.4474 0.4549 0.4624 0.4701 0.4780 0.4780 0.4860 0.4941 0.5024 0.5109
333 5 0.5195 0.5283 0.5374 0.5466 0.5559 0.5654 0.5751 0.5849 0.5951 0.6054
333 6 0.6054 0.6054 0.6054 0.6160 0.6267 0.6267 0.6377 0.6484 0.6592 0.6702
335 1 0.3912 0.4039 0.4145 0.4234 0.4307 0.4371 0.4438 0.4536 0.4635 0.4736
335 2 1.0274 1.0482 1.0690 1.0912 1.1130 1.1348 1.1570 1.1797 1.2029 1.2269
335 3 1.2526 1.2790 1.3058 1.3335 1.3616 1.3918 1.4215 1.4516 1.4834 1.5186
335 4 1.5572 1.5987 1.6459 1.6989 1.7425 1.7902 1.8426 1.8998 1.9621 1.9621
337 1 0.4736 0.4818 0.4901 0.4983 0.5069 0.5157 0.5247 0.5337 0.5428 0.5521
337 2 0.5614 0.5614 0.5709 0.5803 0.5897 0.5995 0.5995 0.5995 0.6095 0.6194
337 3 0.6194 0.6297 0.6399 0.6502 0.6502 0.6607 0.6714 0.6823 0.6932 0.7043
337 4 0.7043 0.7043 0.7154 0.7154 0.7269 0.7386 0.7503 0.7622 0.7742 0.7864
337 5 0.7864 0.7987 0.8112 0.8243 0.8370 0.8500 0.8636 0.8775 0.8916 0.9061
337 6 0.9198 0.9338 0.9338 0.9338 0.9338 0.9481 0.9628 0.9784 0.9927 1.0082
310 1 2.0000 2.0000 2.0000 2.0000
TOPS STAGE ASSAYS
gSend saves its configuration in an INI file that is typically located in the same folder as the program executable. The INI file contains three or four sections. The MRU section is added the first time the program exits and is used to save the most recently used path and file data. The other three sections correspond to parts of the configuration window (except for the two data file names, which we learned about too late in the development process to include in the config window).
[MRU] GradPath=M:\Code\Utility\Gradient\gSend GradFile= Active gRecv=0 GradType=2 [Settings] Cell Sequence=1,3,5,7,9,10,8,6,4,2 Unit Sequence=14,13,12,20,19,18,17,16,15,11,4,3,10,9,8,7,6,5,2,1 Row Color=0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1 Row Color(0)=LWhite Row Color(1)=RGB(0xE1,0xFF,0xE1) Zeros as Blank=1 Zeros as Red=0 Excel File Name=C:\grad\PICFUT.txt FORTRAN File Name=C:\PICFUT [gRecv-A] IP Address=192.168.1.103 Port=16417 [gRecv-B] IP Address=any Port=16417
gRecv is a PICS application that provides the 200 USEC Gradient data points to the PICS Real Time Database. The current value of each gradient point is stored in the PICS Static Database so that, when restarted, gRecv will continue to provide the most recent values for these points. When a new gradient is received from gSend, all of the points whose values have changed are updated. The only feature on the gRecv user interface is an activity log which is presented in the main window (see below)

When an incoming connection request is received, gRecv will log information about the requestor and whether it sent or received a gradient. If there are any problems with a transfer, gRecv will also log them.
gRecv loads its configuration from a file named gRecv.ini, located in the C:\PICS\config folder. The only setting that should [typically] be changed by the customer is the 'Listen IP' which must be set to the local IP address where gRecv will be listening for incoming connections. If that address is not available on the local machine, gRecv will terminate.
[Server] Listen Delay=none Listen IP=192.168.2.1 Listen Port=16417 Provider=DATAMAN Filename Prefix=~ [Real Time API] Pipe KB=4 Region KB=4 Queue Elements=32 [Colors] Error Foreground=RGB(0xFF,0xFF,0xD0) Error Background=RGB(0xD0,0x00,0x00) Warning Foreground=RGB(0xAA,0x44,0x44) Warning Background=RGB(0xD0,0xD0,0x00) [Synchronization] Sync Port=18001 [Log] Log Path=C:\pics\Log\ Log Name=gRecv Logs to Keep=7 Log Limit Type=1,Day