Subchart block, 6 subchart block – Nematron Pointe Controller User Manual

Page 163

Advertising
background image

Pointe Controller User Guide

Chapter 5: Developing Controller Programs

161

5.7.6 Subchart Block

A Subchart block makes a call to a

previously

defined subchart

, analogous to a call to a

subroutine in a programming language. When
program flow reaches a Subchart block, the chart
transfers program flow to the Start block in the
called subchart. Program flow continues from that
point until reaching a Return block. Control then
returns to the calling (main) chart and proceeds
with the block immediately following the original

Subchart block. You can nest Subchart calls; a main chart may call a subchart,
which can in turn call another subchart, etc.

PROPERTY

WHAT YOU ENTER

Caption

User label for the block.

Call Chart

Name of the subchart to call.

Arguments

Arguments to pass.

Local Vars

Variables local to the subchart.

Subchart Arguments

When calling a function chart, you must assign tag references to the called chart’s
internal tags. To assign these values, pass arguments from the calling chart’s
subchart block to the called chart (specified by CallChart):

1. Add or select a Subchart block.

2. In the Block Properties box, select a chart from the CallChart drop-down

list. After you select a chart, the properties appear in the Block Properties
box.

3. Press the logic statement button for each property to build the arguments

that are passed from the calling chart’s subchart block to the called
subchart. For internal references, you can assign a value or reference any
tag.

4. Access the local variables that are to be used within the subchart. The

local variables are not accessible from other charts.

Advertising