This paper mainly introduces the design technology of triangular wave signal output by using programmable logic controller to generate digital signal and special A/D and D/A conversion module.
At present, in many automatic control systems, PLC is often used as the control equipment for data acquisition, state discrimination and output control. This paper introduces the setup and software design of XA CP1H analog I/O unit by designing a triangular wave generator as an example.
The XA CP1H CPU unit has built-in analog I/O units with 4 inputs and 2 outputs.
The terminal in the lower left corner of the CPU unit is the analog terminal. The settings of built-in analog I/O units can be set in “Settings”/”Built-in AD/DA” using CX-P programming software. The settings include resolution, usage, average usage, range, and “” to be used. After setting, the setting is transmitted to the PLC, and the power of the PLC is turned off before it is turned on to make the setting effective. Triangular wave is the most commonly used signal in digital system and automation system. With the instruction of timer, PLC can easily generate triangular wave signal. Now take Figure 1 as an example to design the program of triangular wave chart. The channel adopts 210 analog output with a resolution of 1/6000, thermostatic element and the output range is -10V ~ 10V.
As shown in Figure 2. According to the requirement of output waveform, channel 210 can be selected to output analog signals, 10 ms pulses can be generated by self-reset high-speed timer, and 1500 pulses can be generated within 2.5 seconds of rising edge, that is, from 0 volt to 5 volt in 2.5 seconds, that is, from 0 to 1500, each pulse will be increased by 6, and every pulse will be reduced by 6. The ladder diagram of the implementation requirements is shown in Figure 3.
The waveform debugging diagram is shown in Figure 4.
The triangle wave signal generator realized by PLC has the advantages of simple programming, stable and reliable, and convenient configuration.
However, due to the limitation of the accuracy of the timer of the PLC itself, the signal frequency provided is not high and the performance-price ratio is low.
It can be used in experimental teaching or in occasions where the frequency and accuracy of signals are not required.