General

Welcome!

This community is for professionals and enthusiasts of our products and services. Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

0

10V PWM on Q0.6

Avatar
Natan Naert

SPARTAN ARDUINO PLC 16DA


I am having trouble programming a 10V pwm signal on output Q0.6. According to the datasheet a pwm signal between 5v and 24V should be possible (24V supply is used). How do I code that the amplitude should be 10V. Can somebody maybe help me with the code? Thanks in advance.


Currently I have this:

int PWMPin = 3;     // set output pin 


void setup() {

 

     pinMode(PWMPin, OUTPUT);

}


void loop() {


     // send the square wave signal to the LED:

     analogWrite(PWMPin, 255); // 255 for 100%dutycycle

}

Avatar
Descartar
1 Respuesta
0
<div> <h5 class="o_wforum_bio_popover_name mb-0"> <address class="mb-0" itemscope="itemscope" itemtype="http://schema.org/Organization"> <div> <span itemprop="name">Marti Guillem Cura</span> <span><img src=https://www.industrialshields.com/es_ES/forum/general-1/question/"/web/image/res.country/68/image/España?unique=a14a800%22 class="img img-fluid country_flag" alt="España"/></span> </div> <div itemprop="address" itemscope="itemscope" itemtype="http://schema.org/PostalAddress"> </div> <div> </div> </address> </h5> <span class="o_wforum_bio_popover_info"> <address class="mb-0" itemscope="itemscope" itemtype="http://schema.org/Organization"> <div class="css_non_editable_mode_hidden"> --<span class="text-muted">Marti Guillem Cura</span>-- </div> <div itemprop="address" itemscope="itemscope" itemtype="http://schema.org/PostalAddress"> </div> <div> <div class="css_editable_mode_hidden"> <div class="mb-2"> <br/> </div> <b class="mt-4"><i class="fa fa-diamond text-secondary"></i> 1000000015</b> <div style="display: inline-block"> <b>|</b> <span class="fa fa-trophy badge-gold ml-2" role="img" aria-label="Gold badge" title="Gold badge"></span> 0 <span class="fa fa-trophy badge-silver ml-2" role="img" aria-label="Silver badge" title="Silver badge"></span> 0 <span class="fa fa-trophy badge-bronze ml-2" role="img" aria-label="Bronze badge" title="Bronze badge"></span> 0 </div> <div class="mt-2"> <div class="o_forum_tooltip_line"> <span>Sant Fruitós de Bages</span><span>, </span><span>España</span> </div> </div> </div> </div> </address> </span> <div class="o_wforum_bio_popover_bio"> <address class="mb-0" itemscope="itemscope" itemtype="http://schema.org/Organization"> <div class="css_non_editable_mode_hidden"> --<span class="text-muted">Marti Guillem Cura</span>-- </div> <div itemprop="address" itemscope="itemscope" itemtype="http://schema.org/PostalAddress"> </div> <div> <span> </span> </div> </address> </div> </div> </div> "> Avatar
Marti Guillem Cura
Best Answer

Morning,

First of all make sure to have installed the Industrial Shields boards to correctly work with our industrial PLC's. On the following link you can check how to set up all the initial configurations. 

For having a 10V pwm output signal on your PLC you have to connect a 10Vdc power supply on the Digital/PWM outputs. Our digital outputs are opto-isolated, meaning that an external voltage must be set on them.

After saying that, connect a 10Vdc power supply voltage on the input QVdc (above Qx_x) and also connect the common Ground. Any hardware modification must be done. 

On the following blog, there is all the information about working with our PLC's outputs fully explained.

Avatar
Descartar