4

Calling the Program Block

To call the LINKxxX block, place a Call instruction as close as possible to the start of the main program. To assure consistent mapping of link I/O data, do not use permissive logic to the call. Include at least one call to the LINKxxX block each program sweep, to assure that the link status is routinely updated and the link retry mechanism is enabled. This is discussed in more detail later in the chapter.

Example Call Instruction

In this example, the Call instruction calls Program Block LINK73X.

[

INTERRUPTS

]

[

START OF PROGRAM BLOCK

]

CALL LINK73X

Using Multiple Calls to the Program Block

For most applications, the main program will include only one Call instruction to the LINKxxX Program Block. However, it is possible to use multiple calls in the program. For example, a call might be used at a particular place in the program to update inputs, outputs, or both. In this way, the Program Block call would serve as a ªDoI/Oº instruction.

In applications with long communications windows or in Constant Sweep Time mode, a call to LINKxxX might be used at the beginning of the program to update only inputs, with another call at the end to update only outputs.

When using multiple calls to the LINKxxX Program Block, all additional calls after the first should use the set status of the ªLink Activeº status bit as a permissive to their execution.

GFK±0644

Chapter 4 Programming Guide

25

Page 29
Image 29
GE Series 90-70 manual Calling the Program Block, Example Call Instruction, Using Multiple Calls to the Program Block