Pulse generator on one timer TON

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ก.ค. 2024
  • Generates a pulse (clk) with a duration of one cycle. Using the constant P_ON allows easier addition of parallel branches. The period of the generated signal is equal to the sum of the Preset Time setting and the duration of one cycle. The generator starts from a low state (0) for the Preset Time. Then a high state (1) appears for the duration of one cycle. The variable numberOfGeneratorCycles stores the number of generator cycles.
    00:00 Declare variables
    00:05 Generator start/stop
    00:07 Low state duration setting
    00:10 TON timer instance variable
    00:22 The variable numberOfGeneratorCycles stores the number of generator cycles
    00:24 Declaration of the constant P_ON - always ON
    00:30 Here you will see the cycle time of the PLC
    00:42 Calculation of the period of the square wave on the clk bit
    00:50 Generator start/stop
    00:56 Low state duration setting
    01:02 Counting the number of generator cycles
    01:11 Simulation of generator operation
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น •