Function Files: File Name File Identifier File Description HSC
Function Files: File Name File Identifier File Description HSC
Function Files: File Name File Identifier File Description HSC
Function Files
Overview Function Files are one of the three primary file structures within the MicroLogix
1400 controller (Program Files and Data Files are the others). Function Files
provide an efficient and logical interface to controller resources. Controller
resources are resident (permanent) features such as the Real-Time Clock and
High-Speed Counter. The features are available to the control program through
either instructions that are dedicated to a specific function file, or via standard
instructions such as MOV and ADD. The Function File types are:
File Name File Identifier File Description
High-Speed Counter HSC This file type is associated with the High-Speed Counter function. See Using the High-Speed Counter
and Programmable Limit Switch on page 107 for more information.
Extended Pulse Train Output PTOX This file type is associated with the Pulse Train Output Instruction. See Pulse Train Outputs (PTOX)
Function File on page 145 for more information.
Extended Pulse Width PWMX This file type is associated with the Pulse Width Modulation instruction. See Pulse Width Modulation
Modulation (PWMX) Function File on page 159 for more information.
Selectable Timed Interrupt STI This file type is associated with the Selectable Timed Interrupt function. See Using the Selectable
Timed Interrupt (STI) Function File on page 302 for more information.
Event Input Interrupt EII This file type is associated with the Event Input Interrupt instruction. See Using the Event Input
Interrupt (EII) Function File on page 306 for more information.
Real-Time Clock RTC This file type is associated with the Real-Time Clock (time of day) function. See Real-Time Clock
Function File on page 68 for more information.
Memory Module Information MMI This file type contains information about the Memory Module. See Memory Module Information
Function File on page 72 for more information.
Base Hardware Information BHI This file type contains information about the controller’s hardware. See Base Hardware Information
Function File on page 74 for the file structure.
Communications Status File CS0 This file type contains information about the Communications with the controller. See
for Channel 0 Communications Status File on page 75 for the file structure.
Communications Status File CS2
for Channel 2
Real-Time Clock The real-time clock provides year, month, day of month, day of week, hour,
minute, and second information to the Real-Time Clock (RTC) Function File in
Function File the controller.
The Real-Time Clock parameters and their valid ranges are shown in the table
below.
The RTC settings may be changed by either the user program, a write MSG
instruction from another MicroLogix controller, or the programming software.
Use the Copy Word (CPW) instruction to adjust the RTC settings within the
ladder logic as follows:
IMPORTANT A Major fault (44h) is generated if any of the data being written to the
RTC function file is invalid. For example, setting the Seconds to 61 or
setting the Day of Month to 32.
When valid data is sent to the real-time clock from the programming device or
another controller, the new values take effect immediately. In RSLogix 500/
RSLogix Micro, click Set Date & Time in the RTC Function File screen to set the
RTC time to the current time on your PC.
The real-time clock does not allow you to load or store invalid date or time data.
TIP Use the Disable Clock button in your programming device to disable the
real-time clock before storing a module. This decreases the drain on the
battery during storage.
The following table indicates the expected accuracy of the real-time clock for
various temperatures.
IMPORTANT The RTA instruction will only change the RTC when the RTA
rung is evaluated true, after it was previously false
(false-to-true transition). The RTA instruction will have no
effect if the rung is always true or false.
RTA is set:
• If RTC Seconds are less than 30, then RTC Seconds is reset to 0.
• If RTC Seconds are greater than or equal to 30, then the RTC Minutes are
incremented by 1 and RTC Seconds are reset to 0.
The following conditions cause the RTA instruction to have no effect on the
RTC data:
• RTC is disabled
• An external (via communications) message to the RTC is in progress when
the RTA instruction is executed. (External communications to the RTC
takes precedence over the RTA instruction.)
To re-activate the RTA instruction, the RTA rung must become false, and then
true.
TIP There is only one internal storage bit allocated in the system for
this instruction. Do not use more than one RTA instruction in your
program.
TIP You can also use a MSG instruction to write RTC data from one
controller to another to synchronize time. To send (write) RTC
data, use RTC:0 as the source and the destination.
Memory Module The controller has a Memory Module Information (MMI) File which is updated
with data from the attached memory module. At power-up or on detection of a
Information Function File memory module being inserted, the catalog number, series, revision, and type are
identified and written to the MMI file in the user program. If a memory module
is not attached, zeros are written to the MMI file.
The parameters and their valid ranges are shown in the table below.
FT - Functionality Type
MP - Module Present
The MP (Module Present) bit can be used in the user program to determine
when a memory module is present on the controller. This bit is updated once per
scan, provided the memory module is first recognized by the controller. To be
WP - Write Protect
When the WP (Write Protect) bit is set (1), the module is write-protected and
the user program and data within the memory module cannot be overwritten
IMPORTANT Once the WP bit is set (1), it cannot be cleared. Only set this bit if
you want the contents of the memory module to become
permanent.
FO - Fault Override
The FO (Fault Override) bit represents the status of the fault override setting of
the program stored in the memory module. It enables you to determine the value
of the FO bit without actually loading the program from the memory module.
The LPC (Load Program Compare) bit shows the status of the load program
compare selection in the memory module’s user program status file. It enables you
to determine the value without actually loading the user program from the
memory module.
See Memory Module Program Compare on page 540 for more information.
LE - Load on Error
The LE (Load on Error) bit represents the status of the load on error setting in
the program stored in the memory module. It enables you to determine the value
of the selection without actually loading the user program from the memory
module.
See Load Memory Module On Error Or Default Program on page 537 for more
information.
LA - Load Always
The LA (Load Always) bit represents the status of the load always setting in the
program stored in the memory module. It enables you to determine the value of
the selection without actually loading the user program from the memory
module.
See Load Memory Module Always on page 537 for more information.
MB - Mode Behavior
The MB (Mode Behavior) bit represents the status of the mode behavior setting
in the program stored in the memory module. It enables you to determine the
value of the selection without actually loading the user program from the
memory module.
Base Hardware Information The base hardware information (BHI) file is a read-only file that contains a
description of the MicroLogix 1400 Controller.
Function File
Base Hardware Information Function File (BHI)
Address Description
BHI:0.CN CN – Catalog Number
BHI:0.SRS SRS – Series
BHI:0.REV REV – Revision
BHI:0.FT FT – Functionality Type
Communications Status File The Communications Status (CS) File is a read-only file that contains
information on how the controller communication parameters are configured
and status information on communications activity.
There are three Communications Status Files for each communications port.
Communications Status File CS0 and CS2 correspond to Channel 0 and
Channel 2 on the controller. Ethernet Communications Status File ES
corresponds to Channel 1 on the controller.
The following tables show the details of each block in the Communications
Status File.
With RSLogix 500/RSLogix Micro version 8.10.00 and later, formatted displays
of the diagnostic counters for each configured channel are available under
Channel Status. These displays include a Clear button that allows you to reset the
diagnostic counters while monitoring them online with the programming
software.
TIP Clicking the Clear button while online monitoring Channel Status of
any channel will reset the channel status diagnostic counters for all
three channels to zero.
If you are using RSLogix 500/RSLogix Micro version 8.10.00 or higher, you can
view the active node table by clicking on “Processor Status” and then selecting the
tab for the configured channel.
Ethernet Communications The Ethernet Communications Status (ES) File is a read-only file that contains
information on how the controller Ethernet communication parameters are
Status File configured and status information on Ethernet communications activity.
The following tables show the details of each block in the Ethernet
Communications Status File.
With RSLogix 500/RSLogix Micro version 8.10.00 and later, formatted displays
of the diagnostic counters for Ethernet communications channel are available
under Channel Status. These displays include a Clear button that allows you to
reset the diagnostic counters while monitoring them online with the
programming software.
The last Port tab will show the current states of Ethernet communications port
according to word 5 of Ethernet Communications Status File.
Input/Output Status File The input/output status (IOS) file is a read-only file in the controller that
contains information on the status of the embedded and local expansion I/O.
The data file is structured as:
Input/Output Status File
Word Description
0 Embedded Module Error Code – Always zero
1…4 Expansion Module Error Code – The word number corresponds to the module’s slot number. See the I/O module’s documentation for specific
information. (MicroLogix 1400)