User`s manual
13-4 Motion Mate™ DSM314 for Series 90™-30 PLCs User's Manual
–
January 2001 GFK-1742A
13
Local Logic User Data Table
Local Logic provides an
8192 Byte Circular Buffer
which can be used to store and retrieve data
by the Local Logic program. Refer to Table 13-5 for a listing of the
Data_Table
variables. The data
table is accessed using indirect memory addressing. The
Data_Table_Ptr
variable (the “Pointer”) is
used to point to the correct Byte location in the 8192 Byte buffer. Therefore the
Data_Table_Ptr
variable size is 13 bits (0-8191 allowed range). The Pointer is automatically incremented when a
value is read from or written to the Circular Buffer. The amount by which the pointer is
incremented depends on the size of the variable accessed. The
Data_Table_Ptr
is automatically
initialized to 0 when Local Logic starts, before the first execution sweep. Thus the Data Table
variables can be used to access a large pre-loaded block of data in the Local Logic program. The
following variables are used to access the Circular Buffer:
Data_Table_Ptr
: Data Table Pointer- valid range 0-8191.
Data_Table_sint
: Signed 8 Bits (Pointer auto-incremented by 1 for Read/Write)
Data_Table_usint
: Unsigned 8 Bits (Pointer auto-incremented by 1 for Read/Write)
Data_Table_int
: Signed 16 Bits (Pointer auto-incremented by 2 for Read/Write)
Data_Table_uint
: Unsigned 16 Bits (Pointer auto-incremented by 2 for Read/Write)
Data_Table_dint
: 32 Bits (Pointer auto-incremented by 4 for Read/Write)
The sample code below shows how a specific memory location can be accessed in the circular
buffer:
Data_Table_Ptr := 100; (* Point to Byte offset 100 in the buffer *)
P001 := Data_Table_int; (* Read a signed 16 bit number from the buffer *)
(* The Data_Table_Ptr is auto-incremented to 102 *)
Data_Table_sint := -120; (* Write an 8 bit signed number to Byte 102 *)
Data_Table_Ptr := 0; (* Point to Byte offset 0 in the Buffer *)
Digital Outputs / CTL Variables
The 8 Digital Outputs in the module (2 per axis) are individually configurable to be either under
PLC Control (
default
) or under Local Logic (DSM) control. If the Local Logic program writes to a
particular
Digital_Output
variable (refer to Table 13-1 through Table 13-6) it must be configured
for DSM control. The DSM module will reject any Local Logic programs that are downloaded with
an incorrect Digital Output configuration. Refer to Chapter 14 for a detailed description on
configuring the Digital Outputs.
CTL01-CTL24 are also individually configurable to have different input sources. Refer to Chapter
14 for a detailed description of the configuration options. CTL25 through CTL32 are not
configurable and are always under Local Logic Control. The DSM module will reject any Local
Logic programs that are downloaded with an incorrect CTL configuration. For example, if the
Local Logic program has a statement that writes to CTL16 (e.g.
CTL16 := 1
;), then CTL16 must be
configured as “Local Logic Controlled” in VersaPro Hardware Configuration. CTL01 through
CTL32 and the Motion program Block Numbers (variables
Block_1, Block_2, Block_3, Block_4
)
can be used to synchronize the Motion Program and the Local Logic program.