<xml xmlns="https://developers.google.com/blockly/xml">
<description>
<![CDATA[

## Diode IV Characteristic

<img class="ui image fluid" src='data:image/svg+xml;base64,[encoded data, 20104 characters]'/>

Make the connections as per the schematic. 

The program sets PV1 to values ranging from 0.1 Volts to 4.5 Volts in 0.1 volt steps.
Voltage across the diode is measured at each step and the current is calculated from the
voltage drop across the 1K resistor.
The results are shown graphically and also saved to a file.

---



]]>	
</description>

  <variables>
    <variable id="LbE2%mV/CRs,w^fwYIZy">setv</variable>
    <variable id="H_*1`7mVc%,q5xFloyPr">measured_voltage</variable>
  </variables>
  <block type="controls_for" id="}Y1!K,-|[w}_}ekZ9(35" x="8" y="7">
    <field name="VAR" id="LbE2%mV/CRs,w^fwYIZy">setv</field>
    <value name="FROM">
      <shadow type="math_number" id="IZ5#,JeKHtr3^UtSTR|r">
        <field name="NUM">0</field>
      </shadow>
    </value>
    <value name="TO">
      <shadow type="math_number" id="Q=5z+md@ljb,zt(q/(8q">
        <field name="NUM">4</field>
      </shadow>
    </value>
    <value name="BY">
      <shadow type="math_number" id="NCovMr:Df(zz:pSJ~[nh">
        <field name="NUM">0.1</field>
      </shadow>
    </value>
    <statement name="DO">
      <block type="set_voltage" id="_O`vv~/r;:T*wtIsFWWq">
        <field name="CHANNEL">PV1</field>
        <value name="VOLTAGE">
          <block type="variables_get" id=",OS$[/xL3Mz@qf@oCi|=">
            <field name="VAR" id="LbE2%mV/CRs,w^fwYIZy">setv</field>
          </block>
        </value>
        <next>
          <block type="variables_set" id="Tx+@YMEy66MfoIs.M-}T">
            <field name="VAR" id="H_*1`7mVc%,q5xFloyPr">measured_voltage</field>
            <value name="VALUE">
              <block type="get_voltage" id="r?R:j:g]u$!r?anqP_)`">
                <field name="CHANNEL">A1</field>
              </block>
            </value>
            <next>
              <block type="plot_xy" id="C!HS`uuD-9vF`rH1:fnr">
                <value name="X">
                  <block type="variables_get" id="ls=v;nt}b@cys_:gMcMf">
                    <field name="VAR" id="H_*1`7mVc%,q5xFloyPr">measured_voltage</field>
                  </block>
                </value>
                <value name="Y">
                  <block type="math_arithmetic" id="~Oo%T,AN:xjLL^weRN-R">
                    <field name="OP">DIVIDE</field>
                    <value name="A">
                      <shadow type="math_number" id="R%AbjzOjLA+fBp(8:x,H">
                        <field name="NUM">1</field>
                      </shadow>
                      <block type="math_arithmetic" id="9+i[cM].0[%!AYX}Rupg">
                        <field name="OP">MINUS</field>
                        <value name="A">
                          <shadow type="math_number" id="}x9(!:$PxL8Y|fCy2:fw">
                            <field name="NUM">1</field>
                          </shadow>
                          <block type="variables_get" id="MI4{TDw;Y1-+eF@/1Mah">
                            <field name="VAR" id="LbE2%mV/CRs,w^fwYIZy">setv</field>
                          </block>
                        </value>
                        <value name="B">
                          <shadow type="math_number" id="Vx6DV.E[^EK0[XA*6z{*">
                            <field name="NUM">1</field>
                          </shadow>
                          <block type="variables_get" id="Jw1)(p4%OsdJz_BLS?vB">
                            <field name="VAR" id="H_*1`7mVc%,q5xFloyPr">measured_voltage</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <value name="B">
                      <shadow type="math_number" id=")T$IvxiT[vJXT^8,+1:n">
                        <field name="NUM">1000</field>
                      </shadow>
                    </value>
                  </block>
                </value>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
  </block>
</xml>
