Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
en:sw:01-mervis:advanced-modes-of-digital-outputs-hidden [2018/10/17 11:59]
mkudlacek
en:sw:01-mervis:advanced-modes-of-digital-outputs-hidden [2021/04/29 13:15]
avsetula
Line 1: Line 1:
 ====== Advanced mode of digital outputs: PWM ====== ====== Advanced mode of digital outputs: PWM ======
 +<WRAP group 100%>
 +<WRAP half column 81%>
 The PWM stands for Pulse-Width Modulation. It is for generating a square signal of given frequency and certain duty cycle on a digital output. Typically, it is used for regulating a DC powered component in a way the analog regulation cannot achieve. The PWM stands for Pulse-Width Modulation. It is for generating a square signal of given frequency and certain duty cycle on a digital output. Typically, it is used for regulating a DC powered component in a way the analog regulation cannot achieve.
 +</​WRAP>​
 +<WRAP half column 15%>
 +;;#
 +<​html><​span class="​dev-tag dev-patron">​Patron</​span></​html>​ \\
 +<​html><​span class="​dev-tag dev-neuron">​Neuron</​span></​html>​ \\
 +<​html><​span class="​dev-tag dev-axon">​Axon</​span></​html>​
 +;;#
 +</​WRAP>​
 +</​WRAP>​
  
 Let's take a 24V DC motor for example. To achieve 100% RPMs, you have to supply it with 24V. Logically, to achieve 10% RPMs, you have to supply it 24V/10 = 2.4V. But if you apply this voltage, the motor will not even start, because of the friction and its load. And if it starts, its torque will be very low. This is one of the downsides of analogue regulation. Let's take a 24V DC motor for example. To achieve 100% RPMs, you have to supply it with 24V. Logically, to achieve 10% RPMs, you have to supply it 24V/10 = 2.4V. But if you apply this voltage, the motor will not even start, because of the friction and its load. And if it starts, its torque will be very low. This is one of the downsides of analogue regulation.
Line 130: Line 141:
 {{ :​en:​sw:​01-mervis:​pwm-06-searching-for-ports.png?​direct |}} {{ :​en:​sw:​01-mervis:​pwm-06-searching-for-ports.png?​direct |}}
  
-Turn on the **Debugging** and in the column **PLC Value**, you will see the current PWM value of DO ports 1.01 - 1.04. If you didn't change it previously, you should see zeros. Change the value of **PWM_1.01** to 50 and confirm by clicking on **V** or submiting with **ENTER**.+Turn on the **Debugging** and in the column **PLC Value**, you will see the current PWM value of DO ports 1.01 - 1.04. If you didn't change it previously, you should see zeros. Change the value of **PWM_1.01** to 50 and confirm by clicking on {{:​files:​dialog-confirm_button_2.png?​nolink|}} ​or submiting with **ENTER**.
  
 We can hook up the oscilloscope to the UniPi'​s DO 1.01 and check the waveform. We can hook up the oscilloscope to the UniPi'​s DO 1.01 and check the waveform.