Read the program design of single chip microcomputer and PLC

The programming of the MCU and the PLC is very different. All the programs of the MCU are designed by the user. The PLC program includes the system program (Siemens called the operating system) and the user program. The operating system is used to organize all CPU functions that are not related to specific control tasks. Operating system tasks include processing the boot process, refreshing the input/output process image, invoking user programs, detecting interrupt events and invoking interrupted organization blocks, detecting and processing errors, managing memory, and handling communication tasks. Many of the PLC's functions, such as scan mode, timer function, and interrupt handling, are done by the operating system. This should be considered when drawing a flowchart.

Read the program design of single chip microcomputer and PLC

The program of the PLC's switching quantity control system is described in a simple and concise manner. It is also possible in principle to describe the PLC user program in a flow chart, but it should be distinguished which functions are implemented by the operating system and which are implemented by the user program.

For example, someone asked if a jump instruction is needed to wait for the rising edge of a signal. This is a kind of thinking of microcontroller programming. The scanning mode of the PLC reads all the digital inputs at the beginning of each scanning cycle, and judges whether there is a rising edge according to the change of the state of the same input point in the two scanning cycles. So there is no need to use a jump instruction to skip back to wait for an input signal to appear. If you use this method to query the state change of the signal, the PLC can't do anything else, because its full energy is used in the query! This kind of query is performed in one scan cycle, which will make the scan cycle very long, and it is easy to cause the monitoring timer (watchdog) to time out.

In the PLC user program, the rising edge of the pulse signal can be captured with only one instruction that detects the rising edge. If a fast response is required, the interrupt mode can be used, and the interrupt program written by the user is called by the system program on the rising edge of the pulse signal.

Custom Cable Assembly

We provide wire harness manufacturing services for cable harnesses and built-to-print cables used in many industries, such as computer, game machine, POS machine, ATM , audio/video, electro-mechanical, data communications, telecommunications, medical, etc.

Related Products:speaker cable,customized cable assemblies,electrical cable assemblies.

We have developed a tradition of high-tech engineering, prototyping, and quality custom cable manufacturing at very competitive pricing. Also with professional flow chart (wire cutting-stripping-copper twisting-crimping-crimping 100% inspection-soldering-molding-asssembling-testing-FQC100% -OQC1-OQC2) , which can help us support customers with stable quality.


Custom Wire Harness Assembly

  • Electrified dimensional build boards with 100% continuity test
  • Capabilities to test for fuse,diode,resistor, and relay presence
  • Mating test fixtures for lower production wire harnesses
  • Ability to free hand build harnesses for prototypes and design validation
  • Separate layout boards for addition of fir tree clips, rosebuds, clamps,and labels after coverings added
  • Capabilities to add board interlocks and test markings to harness as needed

Speaker Cable,Straight Bnc Cable Assembly,Idc Red Custom Cable Assembly,Customized Cable Assemblies,EV Cable Assemblies,Cable Assembly,Custom Cable,Customized Cable Assemblies

ETOP WIREHARNESS LIMITED , https://www.oemwireharness.com