7 Programming
7 - 20
NX-series Safety Control Unit User’s Manual (Z930)
7-3 Constants (Literals)
This section describes constants.
The value of a variable changes depending on the data that is assigned to that variable. The value of a
constant never changes.
Unlike variables, constants are not stored in memory. You can use constants in the algorithm of a POU
without the need to declare them.
Constants have a data type in the same way as variables.
The following types of constants can be used with Safety Control Units.
•Bits
• Numbers
• Bit strings
•Times
The following tables show the notation to define different constants for the Safety Control Unit. The con-
stant is normalized after it is entered.
Integers
7-3-1 Constants
7-3-2 Types of Constants
Bits
Notation Example Remarks
TRUE or FALSE FALSE or TRUE
{data_type}#{numeric_value] bool#0 or bool#1 Data type: BOOL
Numbers
Notation Example Remarks
{data_type}#{base}#{numeric_
value]
int#10#1 • Data type: int or dint
• Base: 2, 8, 10, or 16
The editor on the Sysmac Studio does not show the base
of 10. Values entered as the base of 8 are converted to
decimal numbers.
• Numeric values cannot be signed (+ or −).
{data_type}#{numeric_value] int#1 This is interpreted as decimal data.
{numeric_value} −100 This is interpreted as SAFEINT or SAFEDINT data.