FC 220 - Batch Historian

The batch historian (BHIST) function code supports the batch historian feature of Batch 90. This function block resides within the module and is part of the overall function code configuration. It links to the batch sequence block (BSEQ, function code 148) and provides a buffer between a Batch 90 program and the batch historian and queues that information into the BHIST block. When a new event is added to the block, the BHIST block generates an exception report telling the historian that more data needs to be stored. The batch historian then polls the information from the BHIST block and stores it to disk.

 

Each BHIST block can output data to up to eight historians. For detailed information on the batch historian, refer to the Batch Data Manager instruction.

 

 

 

 

 

Outputs:

Blk

Type

Description

N

B

Summary status:

0 = not all bad

1 = all bad

N+1

R

Status of historian 1:

-1 = not expected

0 = good

1 = bad

N+2

R

Status of historian 2:

-1 = not expected

0 = good

1 = bad

N+3

R

Status of historian 3:

-1 = not expected

0 = good

1 = bad

N+4

R

Status of historian 4:

-1 = not expected

0 = good

1 = bad

N+5

R

Status of historian 5:

-1 = not expected

0 = good

1 = bad

N+6

R

Status of historian 6:

-1 = not expected

0 = good

1 = bad

N+7

R

Status of historian 7:

-1 = not expected

0 = good

1 = bad

N+8

R

Status of historian 8:

-1 = not expected

0 = good

1 = bad

N+9

R

Campaign number

N+10

R

Batch number

N+11

R

Lot number

N+12

R

Event number

N+13

R

Spare

 

 

 

Specifications:

Spec

Tune

Default

Type

Range

Description

S1

Y

0

I

0 - 1

Historian 1 expected; 0 = no, 1 = yes

S2

Y

0

I

0 - 1

Historian 2 expected; 0 = no, 1 = yes

S3

Y

0

I

0 - 1

Historian 3 expected; 0 = no, 1 = yes

S4

Y

0

I

0 - 1

Historian 4 expected; 0 = no, 1 = yes

S5

Y

0

I

0 - 1

Historian 5 expected; 0 = no, 1 = yes

S6

Y

0

I

0 - 1

Historian 6 expected; 0 = no, 1 = yes

S7

Y

0

I

0 - 1

Historian 7 expected; 0 = no, 1 = yes

S8

Y

0

I

0 - 1

Historian 8 expected; 0 = no, 1 = yes

S9

Y

0

I

-1 - 2

Error action:

-1 = disabled (always start immediately)2

0 = always start (after start event read or failed)

1 = start if any historian is good

2 = start only if all historians are good

S10

Y

120

I

Full

Time-out time (secs)

S11

N

300

I

Full

Buffer size (bytes)

S12

N

2

I

Note 1

Block address of BSEQ block

S13

N

2

I

Note 1

Block address of campaign number input

S14

N

2

I

Note 1

Block address of batch number input

S15

N

2

I

Note 1

Block address of lot number input

S16

N

2

I

Note 1

Block address of check ID input

S17

N

2

I

Note 1

Block address of spare input

S18

N

2

I

Note 1

1 Block address of spare input

S19

Y

0

I

Full

Spare

 

NOTES:

1. Maximum values are:9,998 for the BRC-100, IMMFP11/12 and 31,998 for the HAC

2. Available in firmware revision G_0 or later.

 

 

 

220.1   Explanation

 

220.1.1  Specifications

 

S1 through S8

Identify the historian expected. Up to eight batch historians can monitor the BHIST block. Each historian has an option page for specifying the historian number (one through eight). All specifications that match a historian number specified on the option page should be set to one. For example, if historians one and four are used and specified on the option page, S1 and S4 must be set to one, S2, S3, S5 and S8 must be set to zero.

 

S9

Determines how the Batch 90 program will respond to batch historian status on a start/restart transition. Specification S9 has no effect if an active batch historian goes off-line while the batch program is running.

 

A start event is defined as a hold-to-run transition following a batch-complete state, or initial start. The start event is affected by S9 as follows:

 

-1 = The program always starts without regards to any historian status. The start event is placed in the historian buffer, and the program starts immediately. Note that if the historian buffer becomes full before the historian reads the start event, the event will be lost.

 

0 = The program always starts, but only after the start event is read from the buffer by all expected historians, or all expected historians are marked bad (i.e., the historian time out time, S10, expires).  Note that the program start will be delayed by the time required for all good historians to read the event, or the historian time out time, whichever is less. During the delay output N+7 of the BSEQ block will indicate a fault code -23.

 

1 = The program starts only if at least one expected historians is good, but only after the start event is read from the buffer by all good historians. Note that the program start will be delayed by the time required for all good historians to read the event from the buffer. During the delay output N+7 of the BSEQ block will indicate a fault code -23. If the historian time out time, S10, expires before all expected historians read the event, the program will start only if at least one historian read the start event, otherwise, it will not start, and output N+7 of the BSEQ block will indicate fault code -24.

 

2 = The program starts only if all expected historians are good, but only after the start event is read from the buffer by all expected historians. Note that the program start will be delayed by the time required for all expected historians to read the event from the buffer. During the delay output N+7 of the BSEQ block will indicate a fault code -23. If the historian time out time, S10, expires before all expected historians read the event, the program will not start, and output N+7 of the BSEQ block will indicate fault code -24.

 

A re-start event is defined as a hold-to-run transition following a holding state. The re-start event is affected by S9 only as follows:

 

-1 = The program always re-starts regardless of any historian activity. The re-start event is placed in the historian buffer, and the program re-starts immediately. Note that if the historian buffer becomes full before the historian reads the re-start event, the event will be lost.

 

0,1, or 2 = The program always re-starts, but only after the re-start event is read from the buffer by all good historians, or historian time out time, S10, expires. Note that the program re-start will be delayed by the time required for all good historians to read the event, or the historian time out time, whichever is less. During the delay output N+7 of the BSEQ block will indicate a fault code -23.

 

 

S10

Determines how long the BHIST function block waits for acknowledgment before marking a batch historian bad. Bad historians that resume taking events from the BHIST block are marked good. If a historian is bad on a hold to run transition,  the batch program will not start running until the time set in S10 expires (unless S9 is set to -1, in which case the program will start immediately). Note that once a historian is flagged as bad (i.e., its corresponding output N+1 through N+8 is set to one), a new time-out period is not granted so long as the status is marked bad, regardless of the BSEQ hold/run state (i.e., the timing period only applies to a good historian before flagging it as bad).

 

S11

Sets the amount of RAM, in one byte increments, that is used for holding the event and watch events before data is overwritten. The average event is 20 bytes. The send message to the historian is 100 bytes. Under normal operation, the historian will typically poll the event data from the BHIST block at a maximum of every 20 seconds.

 

S12

Connected to the lowest block address (N) of the batch sequence function block (BSEQ) controlling the batch program (Fig. 220-1).

 

S13

Connected to the function block that defines the batch campaign number. Campaign number can be used by the common sequence function block (CSEQ).

 

S14

Connected to the function block that defines the batch number. Batch number specifies the batch file name of the BSEQ data saved in the batch historian.

 

S15

Connected to the function block that defines the batch lot number. Lot number specifies the lot file name of the BSEQ data

saved in the batch historian. On a complete to run transition, both the batch and lot numbers are locked in. They cannot be

changed until the program completes.

 

NOTE: Alphanumeric campaign, batch, and batch lot IDs are supported by connecting S13, S14, and S15 respectively to the N+1 ST output of a DATA EXPT (function code 194) or DATA IMPT (function code) function block. The batch program must include the #ALPHA compiler directive in order to support alphanumeric recipe IDs.

 

S16

Checks the historian function block to verify that the current batch and lot number (identified by S14 and S15) are unique. If <S16> equals zero, it does not check for unique batch and lot numbers. If <S16> equals one, it checks for unique batch and lot files.

 

S17, S18 and S19

Reserved for future use.

 

 

 

 

 

220.1.2  Outputs

 

N

Shows the overall status of the historians communicating with the BHIST block. If this output is zero, at least one batch historian is marked good. If this output is one, all expected batch historians are bad.

 

N+1 through N+8

Indicate the status of historians one through eight. If any of these outputs are zero, that batch historian is active and operating correctly. If any of these outputs are one, the batch historian is expected, but it is not emptying the buffer within the time set by specification S10.

 

N+9 through N+11

Indicate which campaign (N+9), batch (N+10) and lot (N+11) numbers were locked in on a complete to run transition. Typically these outputs are used to track remote manual set constants so that the operator can see the actual numbers being used.

 

N+12

Exception report output. The event number is zero until the batch program begins executing. This output increments by one every time a new item is inserted into the BHIST block event queue.