Omron NJ-series User Manual page 230

Machine automation controller cpu unit software
Hide thumbs Also See for NJ-series:
Table of Contents

Advertisement

Classification
Boolean
Bit strings
Integers
Real numbers
Durations
Dates
Times of day
Dates and Times
Text strings
Arrays
Structures
Unions
Enumerations
POU instances
Restrictions in Specifying Member Offsets
The following restrictions apply to setting member offsets. If you specify member offsets for a struc-
ture, the same restrictions apply to structures that are members of that structure.
• If you set the memory offset type to User for a structure, you must set offsets for all members of
the structure.
• You cannot set initial values for members of structures for which offsets are set. The default initial
value for each data type is used. Refer to When the Initial Value Specification Is Left Blank on
page 6-59.
• The memory size that is required for the structure is determined by the sizes of the members, the
alignment values of the data types, and the memory configuration.
Errors in Specifying Member Offsets
The following error can occur when setting member offsets.
Error name
Offset Out of Range Error A value that is out of range was
Offset Not Set Error
Memory Configuration
Overlap Error
Initial Value Setting Error
 Instructions That Take a Structure as a Parameter
Some instructions pass structure variables as parameters. To do so, specify the structure variable as
the input parameter.
Example: Passing a Member of a Structure Variable to the MOVE Instruction and Passing a Struc-
ture Variable to the MOVE Instruction
NJ-series CPU Unit Software User's Manual (W501)
Data type
BOOL
BYTE, WORD, DWORD, LWORD
SINT, INT, DINT, LINT, USINT, UINT,
UDINT, ULINT
REAL, LREAL
TIME
DATE
TIME_OF_DAY
DATE_AND_TIME
STRING
Meaning
specified for an offset.
There is a member for which
the offsets are not set.
The same memory location is
allocated to more than one
member.
An initial value was set for a
structure member for which an
offset was specified when cre-
ating the variable table.
6 Programming
Byte offsets
Bit offsets
Can be set.
Can be set.
Can be set.
Fixed.
Can be set.
Fixed.
Can be set.
Fixed.
Can be set.
Fixed.
Can be set.
Fixed.
Can be set.
Fixed.
Can be set.
Fixed.
Can be set.
Fixed.
Can be set.
Can be set only for
BOOL elements.
Can be set.
Fixed.
Can be set.
Fixed.
Can be set.
Fixed.
Fixed.
Fixed.
Offset type
User
Change the value of the
offset to a suitable
value.
User
Set offsets for all mem-
bers.
User
Change the values of
the offsets to suitable
values.
CJ or User
Do not set an initial
value.
6
Correction
6-43

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents