Topic: DMD0209 User Created Data Blocks |
|
In addition to the Built-in data blocks and structures, the programmer can create as many additional data blocks and structures as memory allows. Creating Data Blocks
The programmer can create blocks of simple data types such as Bits, Unsigned Bytes, Signed Bytes, Unsigned Words, Signed Words, Signed DWords, and Reals.
The programmer can also create blocks of structures such as Timer Structures, Counter Structs, Strings, PID Structs, Date/Time Structs, Task Structs, Ramp/Soak Structs, Program Structs, Device Reference Structs, and Drum Structs.
|
|
Creating Heap Items
|
Creating new heap items causes changes to the
system configuration, which can only be downloaded to the controller when
it is in STOP mode. This situation can be avoided by creating the heap
items ahead of time. There are two ways to do this:
For example, the programmer could create PID_0, PID_1 and PID_2, download
the new system configuration to the controller, and when they are added
to the project the editor "dot" would be green instead of yellow
indicating that the controller already has that element in it's memory. |
For example, the programmer could create block of three PID Structs
named MyPID, and download that to the controller. These PID Structs can
now be referenced as MyPID0, MyPID1 and MyPID2 in the project. |
|
See Also:
|
|
Related Topics:
|
|