What is TinyPLC?

What is a PLC?
Today, PLC (Programmable Logic Controller) is the most widely used and most representative automation controller in the industry. Through the Relay Ladder Diagram (LDD) programming language, it is represented by graphic symbols, which is intuitive and simple. Even if it is not a professional electronic/computer operator, it can be used in a short time. PLC is a controller that runs through the ladder programming language.


The biggest difference from C, assembly language, BASIC, and other programming languages ​​is that multiple tasks perform functions simultaneously. C, assembly language, etc. are all sequential execution languages ​​and cannot perform other tasks at the same time.
The ladder program of the PLC basically has the function of supporting multiple tasks at the same time, and the user need not worry about it. As shown in the figure below, X is in the ON state when A is closed, and Y is also in the ON state when B is closed.
There is no correlation between the two circuits and they operate independently.

Regardless of the complexity of the ladder program connections, the input contacts and relays are always in a ready state. When the input contacts are connected, the next related action is performed. SCAN TIME is the time required for the ladder program to cycle once. A certain scan cycle will be repeated.

Ladder programs are run during a cyclic scan, which is very different from the C and assembly languages ​​used in computers.
The use of PLC?
PLC is similar to other processors (microcomputers, computers) and has the functions of controlling, managing, and running external devices. The difference between PLC and other processors is mainly used in equipment and production automation. It replaces the previously used relay sequence control and has more effective control and management functions for the production of external devices. For example, in the integrated control of the pipeline, after various proximity switches, temperature switches, solenoid valves, and motors are connected, sequential control management is performed according to a designated program.


In addition to the basic functions of the replacement relay sequence control (such as input and output control, time relays, counters, etc.), the PLC also has built-in a variety of special functions, and plays an important role in the comprehensive control of industrial automation. Today, it can be said that the most influential part in industrial automation is PLC. The following is a partial application of the PLC.
Application of PLC
Automatic Warehouse Control, Transport Production Control, Industrial Robot Control, Automation Equipment Control, Water Supply System Control, Various Temperature Controls, Semiconductor Manufacturing/Inspection Lines, Industrial Generator Control, Automatic Line Control, Waste Management Control, Atmospheric Protection Control and many more.
The basic composition of PLC
The basic composition of PLC includes three parts.


The CPU in a PLC is like a human brain. The role is to first read the commands in memory and then analyze and execute them. I/O is like human eyes, ears, hands, and feet. Its role is to receive (eyes, ears) an external input signal, and perform (hand, foot) the specified output signal. MEMORY is the memory part of the PLC. The function is to memorize and store the ladder program created by the user and various data generated during the operation.
The internal memory includes RAM, ROM, EEPROM, FLASH ROM and so on.
• RAM (Random Access Memory) is a read-write memory.
• ROM (Read Only Memory) is a read-only memory.
• The EEPROM memory can also be modified during operation. Even if the power is turned off, no data will be lost. In contrast, the RAM memory is completely lost in the event of a power failure.
• The FLASH ROM is the same as the EEPROM in terms of features, but the manufacturing method is different.
The ladder program created by the user of TinyPLC stores the recognizable symbol in the FLASH ROM memory. Various data generated during operation are recorded in RAM. Even if the power is turned off during this process, the saved data will be recorded in the EEPROM. (Hold relay)
The I/O portion of TinyPLC consists of the most basic *TTL LEVEL I/O port (*TTL LEVEL:0V is judged as 0, 5V is judged as 1). The I/O section controls the external load of the switch by connecting the relay and the photocoupler. COMFILE company provides input and output extensions (motherboard module) products.
Relay type
The relay referred to by the PLC is a relay in the form of a component connected to the outside, and an internal relay existing in the memory. The following is a description of the relays used by the TinyPLC. The relays are distinguished by the identification letters (P, M, K, T, C) and the letters need to be carefully recorded.


Ladder Diagram Input and Execution
In order to use the PLC, a ladder diagram input device and a download cable (RS232 cable) are also required.


In order to input ladder diagrams, the use of computers has become very common in the past, although other devices such as a Handy Loader were previously required. It is easier to use the ladder diagram in the form of a graph on the computer, and the data storage is also very convenient. The ladder program programmed on the computer can be uploaded and downloaded through the RS232C communication port. The downloaded program can also work on its own without being connected to a computer. Even if the program entered after the power failure is automatically saved, the program will still execute when the power is turned on.


The program development of TinyPLC is via Ladder Diagram-->COMFILE/Download-->Run Status Detection. This 3-step process is repeated.
The following is the execution screen of the ladder program TinyPLC Studio used by TinyPLC. (Use of TinyPLC Studio program under WINDOWS)

TinyPLC program translation process
TinyPLC download is divided into three phases. TinyPLC first converts the user-written ladder program into a statement table in Comfile mode, and translates it into a machine language that allows the Comfile to be recognized (this process is automatically performed by the TinyPLC Studio program, and the user does not need to worry about it). Finally downloaded to the TinyPLC module via the communication port RS232C.

What is TinyPLC?
Logic programmable controllers (PLCs) are the most widely used and most representative controllers in the industry. The common components we see in the industry (as viewed in the figure below) are PLCs. The internal part mainly includes the power supply (POWER), CPU (Central Processing Unit), and input/output (I/O). The internal functions of the PLC are perfect and can be connected when needed.


TinyPLC is different from other types of products. Semiconductor-type PLC (the CPU portion of the PLC) is sold separately, to increase the input and output circuits on this basis, according to their own needs of the user, an independent PLC manufacturing products with unique properties.


In terms of use, it has the following advantages:
• In addition to CPU modules (such as input/output modules), users can design their own according to the situation.
• Compared with other brands of PLCs, other than purchasing CPU modules, other production costs can be greatly reduced (in favor of product improvement).
• Free to set I/O direction.
• The basic circuit made up of the circuit board minimizes the use of the circuit (special motherboard module making, connecting with external equipment).
• Minimize size to improve product size.
As mentioned above, TinyPLC is produced for users who need to improve their products. The user can design the power supply part and the input/output part (main board part) by himself. The following is a description of the types and characteristics of the main board. (If the motherboard module is purchased separately, it is similar to other products)


The composition of the motherboard
The following is the most representative board module BASE-C20R composition chart. Series sold in Comfile display module can be directly connected with the LCD and the SGN (seven segment) module, and having a computer and communication terminals and the RS232C connector LEVEL conversion circuit function. In addition to built-in relay 8 and the output 12 than the input DC24V, may also be used 5V / 24V supply (the product can be directly connected to Comfile AU-0524).


The I/O expansion module (model number starts with EIO) can be used to connect with TPC-BUS. If you need to increase the input part, you need to add input expansion module. On the contrary, if you need to increase the output part, you need to increase the output extension template.
Integrated PLC
One-piece PLC includes CPU module, power module (SMPS), relay output and DC24V input parts. The following is the structure diagram of SB-36R.


The following is a representative one-piece PLC characteristic description.


TinyPLC module features
TinyPLC CPU module features and parameters table

• Only the TPC26, TPC33, TPC37, TPC38 models are sold on the market in the TPC3X series. (May 2002 benchmark)
• SGN is the “seven-segment display module” product name for COMFILE TECNOLOGY.
• The LCD module can only be connected to the “SERIAL LCD module” of COMFILE TECNOLOGY. (single line contact method)


TinyPLC Specifications
General specifications for TinyPLC.