beautypg.com

Call module – Rockwell Automation GMLC Reference Manual User Manual

Page 470

background image

Publication GMLC-5.2 - November 1999

Call Module

433

When you add a New Module to a diagram, that New Module
instantaneously appears in the Diagram Explorer as part of the current
diagram.

Open the New Module block either by double-clicking on it, or by
clicking on the module name in the Diagram Explorer.

To close the module and return to the New Module block, do one of the
following:

In the Diagram Window, click the right mouse button and select
Collapse Module

In the Diagram Explorer, left click on the diagram or module that
contains the expanded module

The New Module block resides on the Main Palette. It requires no
parameters, and has no dialog box. When you successfully translate the
diagram to iCODE script (using the Translate to Script command in the
Diagram menu) a check mark appears at the upper left corner of the
module block.

Call Module

Use the Call Module block to call and execute an external module as part
of your GML Commander diagram. The Call Module block evaluates a
value or expression that you type into the Call Module dialog box, and
calls for the module associated with the resultant value (e.g., Module
numbers 0, 1, 2, etc.).

The Call Module Block evaluates a value or mathematical expression and
executes the external module associated with that value as a subroutine in
your diagram.

The Call Module block can call only a module that you have previously
added to the Call Module list. If the value of the expression you type into
the Call Module block evaluates to a value not listed in the Call Module
Tag window, a runtime error occurs.