
90
SM-Applications Modules & Motion Processors User Guide
Issue Number: 4
AssRAM
UnassRAM
RamLength
SetRamLength
These commands allow the programmer to use the RAM files within the Second
Processor. RAM files provide a means of accessing user program arrays via the CMP
file services. For more information on these commands and RAM files refer to the on-
line help.
SMARTCARD functions
New functions are available to utilise the SMARTCARD for reading and storage. Refer
to the SyPTPro help for more information on using these functions.
7.6.2
DPL Commands and Function Blocks
There is a rich list of commands and functions that may be used in a DPL program.
Please refer to the on-line help.
7.7
User Defined Function Blocks
7.7.1
Overview
SyPTPro comes as standard with a pre-defined library of function blocks that can be
used in the graphical programming tools (LD and FBD) as well as in raw DPL.
The User Defined Function Block system allows the user to create their own function
blocks that will automatically become available in the graphical programming tools
(Function Block Diagrams and QuickLD diagrams) in addition to the standard library
functions.
A UDFB itself is like a self-contained DPL program section in its own right and therefore
can consist of a mixture of raw DPL commands, FBD and QLD diagrams and other
UDFB's. Note however that you cannot create standard task sections (such as POS0)
with a UDFB.
7.7.2
Scope of a UDFB
Each UDFB is local to the node's DPL program in which it is defined. To make a UDFB
available in other node programs, it is simply a matter of copying and pasting the UDFB
section into the other node program.
A UDFB appears within the DPL Editor of SyPTPro in a similar manner to a task - i.e. a
collapsible section - and it is recommended practice to place all UDFB's at the top of a
program due to the fact that a UDFB must be defined before it is used.
7.7.3
Encapsulation and Data Storage
Unlike any task of a DPL program, UDFB's are self-contained units (i.e. encapsulated).
This means that each UDFB has its own unique set of variables (local variables).
A UDFB interfaces to the node's DPL program though its input and output arguments
alone. It is not possible for a UDFB to access the global DPL variables in the DPL
program, or variables in other UDFB's.
A UDFB can of course access drive parameters and Second Processor registers that
are considered global, however this is to be discouraged especially for blocks that could
be re-used in other programs or applications. The only times where a block may need to
access parameters or registers directly would be in application / product specific
situations.
Содержание Digitax ST Indexer
Страница 131: ......
Страница 132: ...0471 0062 04...