6-3
Constants (Literals)
This section describes constants.
6-3-1
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.
6-3-2
Types of Constants
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
constant is normalized after it is entered.
Bits
Notation
Example
Remarks
TRUE or FALSE
FALSE or TRUE
{data_type}#{numeric_value} bool#0 or bool#1 Data type: BOOL
Numbers
l
Integers
Notation
Example
Remarks
{data_type}#{base}#{numeric_val-
ue}
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 num-
bers.
•
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.
6 Programming
6 - 19
NX-series Safety Control Unit User's Manual (Z930)
6-3 Constants (Literals)
6
6-3-1
Constants
Summary of Contents for NX-SIH400
Page 4: ...Introduction 2 NX series Safety Control Unit User s Manual Z930 ...
Page 46: ...Revision History 44 NX series Safety Control Unit User s Manual Z930 ...
Page 108: ...2 Specifications 2 42 NX series Safety Control Unit User s Manual Z930 ...
Page 132: ...3 Installation and Wiring 3 24 NX series Safety Control Unit User s Manual Z930 ...
Page 148: ...4 Safety Control Unit Operation 4 16 NX series Safety Control Unit User s Manual Z930 ...
Page 216: ...5 System Configuration and Setup 5 44 NX series Safety Control Unit User s Manual Z930 ...
Page 306: ...6 Programming 6 90 NX series Safety Control Unit User s Manual Z930 ...
Page 390: ...8 Calculating Safety Reaction Times 8 12 NX series Safety Control Unit User s Manual Z930 ...
Page 412: ...11 Safety Data Logging 11 10 NX series Safety Control Unit User s Manual Z930 ...
Page 504: ...12 Troubleshooting 12 92 NX series Safety Control Unit User s Manual Z930 ...
Page 554: ...l I O Map Settings Appendices A 42 NX series Safety Control Unit User s Manual Z930 ...
Page 623: ...I Index I 1 NX series Safety Control Unit User s Manual Z930 I ...
Page 625: ......