Sample controlćlogic program – Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual

Page 81

Advertising
background image

Chapter 5

Developing Programs

5-21

Sample ControlĆLogic Program

The following is a control-logic programming example. This control-logic
program initiates a block-transfer write and a read when triggered by the
control coprocessor. See the sample C—on page 5-18—and BASIC— on
page 5-20—control-coprocessor programs.

Rung 2:0

This block-transfer write will be triggered when bit 10 of the input image is

set by the control coprocessor. The coprocessor triggers this bit using the

trigger mask within the BPI_READ function. The second conditional bit is the

enable bit of the block-transfer control block. This ensures that the rung

will be toggled false to true every time the block transfer completes. The

coprocessor is located in rack 0, group 2 of the chassis.

| I:002 N10:0 +BTW--------------------+ |

+--] [---]/[------------------------------------+BLOCK TRNSFR WRITE +-(EN)-+

| 10 15 |Rack 00| |

| |Group 2+-(DN) |

| |Module 0| |

| |Control Block N10:0+-(ER) |

| |Data file N10:10| |

| |Length 10| |

| |Continuous N| |

| +-----------------------+ |

Rung 2:1

This block-transfer read will be triggered when bit 11 of the input image is

set by the control coprocessor. The coprocessor triggers this bit using the

trigger mask within the BPI_WRITE function. The second conditional bit is the

enable bit of the block-transfer control block. This ensures that the rung

will be toggled false-to-true every time the block transfer completes.

| I:002 N11:0 +BTR--------------------+ |

+--] [---]/[------------------------------------+BLOCK TRNSFR READ +-(EN)-+

| 11 15 |Rack 00| |

| |Group 2+-(DN) |

| |Module 0| |

| |Control Block N11:0+-(ER) |

| |Data file N11:10| |

| |Length 5| |

| |Continuous N| |

| +-----------------------+ |

Rung 2:2

| |

+--------------------------------[END OF FILE]---------------------------------+

| |

NO MORE FILES

Advertising