17-2Using Selectable Timed Interrupts

Online editing affects the performance of an STI routine. The STI cannot interrupt the controller while it is managing its memory due to the online edits being made. The STI input must be on for an amount of time slightly greater than the actual time required to complete the online edits. If not, the STI does not execute.

STI Application Example

Periodically check the status of PLC-5 family controllers on the DH+ communication link. Compare the status of each controller with a file of reference data (see rungs below). Set a bit if a mismatch is found. Perform this comparison once every 800 ms. Assume that another active step retrieves status data from the PLC-5 controllers with a MSG instruction and loads it into a temporary source file (N5:10).

R6:0

/

DN

 

FSC

 

 

 

FILE SEARCH/COMPARE

 

 

Control

R6:0

 

Length

10

 

Position

0

 

Mode

ALL

 

Expression

 

 

#N5:0 <> #N5:10

 

 

 

 

 

EN

DN

ER

R6:0

O:000

 

FD

 

00

 

 

 

 

Block-Transfers in Selectable Timed Interrupts (STIs)

If the controller runs an STI that contains block-transfer instructions, the controller performs these block-transfers immediately on completing any block-transfers currently in the active buffer, ahead of block-transfer requests waiting in the queue.

You can program “immediate” block-transfers to a local I/O chassis using the STI program (i.e., the STI is invoked and the block-transfer occurs immediately). The controller executes the block-transfer immediately, completes the remaining rungs in the STI, then resumes execution of the ladder program.

Set the .TO bit on any block-transfer instruction destined for the same slot as the block-transfer in the STI. These block-transfers only try to execute once so as not to keep the STI from completing.

Publication 1785-UM012D-EN-P - July 2005

Page 260
Image 260
Bradley Smoker PLC-5 STI Application Example, Block-Transfers in Selectable Timed Interrupts STIs, Expression #N50 #N510