Core Principles of Mitsubishi PLCs
1.1 Basic Structure
The Mitsubishi PLC mainly consists of the following components:
- CPU Module: The core processing unit responsible for executing user programs and system programs
- Memory Module: Includes system program memory and user memory
- I/O Module: Input/output interface that connects to external devices
- Power Module: Provides a stable DC power supply
- Communication Interface: Supports data exchange with other devices
1.2 Working Process (Scan Cycle)
The Mitsubishi PLC operates in a cyclic scanning manner, and a complete scan cycle includes the following stages:
1.2.1 Input Sampling Stage
The PLC reads the status of all input terminals sequentially in a scanning manner and stores it in the input image register. During this stage, regardless of how the input signals change, the contents of the input image register remain unchanged until the next scan cycle’s input sampling stage.
1.2.2 Program Execution Stage
The PLC executes instructions in the order of the user program (from top to bottom, left to right), performing logical operations and data processing based on the status of the input image register and other components, with the results stored in the output image register.
1.2.3 Output Refresh Stage
After all instructions have been executed, the PLC transfers the contents of the output image register to the output latches, driving external loads.
1.3 Characteristics of the Scan Cycle
- The length of the scan cycle depends on the length and complexity of the program
- The typical scan cycle is 1 to 100 ms
- Changes in input signals need to wait for the next scan cycle to be recognized by the PLC, resulting in input-output response lag
Data Types of Mitsubishi PLCs
2.1 Basic Data Types
2.1.1 Bit (BOOL)
- Description: Represents the state of a switch, with only two values: 0 and 1
- Space Occupied: 1 bit
- Soft Elements: X (input relay), Y (output relay), M (auxiliary relay), S (status relay)
- Application: Used to represent switch states, alarm signals, etc.
2.1.2 Byte (BYTE)
- Description: 8-bit binary number
- Space Occupied: 8 bits
- Value Range: 0 to 255
- Application: Stores ASCII characters, short integers, etc.
2.1.3 Word (WORD)
- Description: 16-bit binary number
- Space Occupied: 16 bits
- Signed Word (INT): -32768 to 32767
- Unsigned Word (UINT): 0 to 65535
- Soft Elements: D (data register), T (current value of timer), C (current value of counter)
- Application: Stores medium-range integers
2.1.4 Double Word (DWORD)
- Description: 32-bit binary number, composed of two consecutive words
- Space Occupied: 32 bits
- Signed Double Word (DINT): -2147483648 to 2147483647
- Unsigned Double Word (UDINT): 0 to 4294967295
- Application: Stores large-range integers, floating-point numbers
2.1.5 Floating Point (REAL)
- Description: 32-bit single-precision floating-point number, following IEEE754 standard
- Space Occupied: 32 bits (double word)
- Value Range: ±1.175×10⁻³⁸ to ±3.403×10³⁸
- Application: Operations requiring decimal precision, such as analog processing
2.2 Special Data Types
2.2.1 BCD Code
- Description: Binary-coded decimal number
- 4-bit BCD: 16-bit data representing 0000 to 9999
- 8-bit BCD: 32-bit data representing 00000000 to 99999999
- Application: Digital display, BCD input devices
2.2.2 String (STRING)
- Description: ASCII or Unicode character sequence
- Storage Method: Each word stores 2 characters
- Application: Text information processing, communication data
2.2.3 Timer (T) and Counter (C)
- Timer: Stores the current value of the timing period, 16-bit or 32-bit
- Counter: Stores the count value, 16-bit or 32-bit
2.3 Classification of Data Registers
2.3.1 General Data Register (D)
- Number Range: D0 to D199
- Characteristics: Data is cleared when the PLC transitions from RUN to STOP (special relay M8033 retains data when ON)
- Application: Temporary data storage
2.3.2 Power-Fail Retentive Data Register
- Number Range: D200 to D7999
- Characteristics: Data is retained after power failure
- Application: Stores important parameters, cumulative values
2.3.3 Special Data Register
- Number Range: D8000 to D8255
- Characteristics: Used to monitor the internal status of the PLC and set special functions
- Example: D8000 (run monitoring), D8002 (initial pulse), D8012 (100ms clock)
2.3.4 Index Register (V/Z)
- Quantity: V0 to V7, Z0 to Z7, a total of 16
- Characteristics: 16-bit registers used to modify soft element numbers
- Application: Indirect addressing, address offset calculation
Like, Follow + Share!