<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to How to activate Raspi internal pull-ups and pull-downs</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/4c7e6e9844/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/4c7e6e9844/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/4c7e6e9844/</id><updated>2021-07-04T20:24:21.794000Z</updated><subtitle>Recent posts to How to activate Raspi internal pull-ups and pull-downs</subtitle><entry><title>How to activate Raspi internal pull-ups and pull-downs</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/4c7e6e9844/?limit=25#3989" rel="alternate"/><published>2021-07-04T20:24:21.794000Z</published><updated>2021-07-04T20:24:21.794000Z</updated><author><name>nothinrandom</name><uri>https://forge.codesys.com/u/nothinrandom/</uri></author><id>https://forge.codesys.com4db2fd16991a6cd97066cd0bf34ff315d6b88cc1</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;a class="user-mention" href="/u/yann2021/"&gt;@yann2021&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;I believe you should be able to achieve this inside of CoDeSys.&lt;br/&gt;
1) Find this file /etc/CODESYSControl_User.cfg and add the following to it:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;[SysProcess]&lt;/span&gt;
&lt;span class="na"&gt;Command&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;AllowAll&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;2) In your project, add the SysProcess library in Library Manager and execute the following command (example to set pin 18 to pull-up):&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;SysProcess.SysProcessExecuteCommand2(pszCommand := 'gpio -g mode 18 up');&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Another example to set it as output:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;SysProcess.SysProcessExecuteCommand2(pszCommand := 'gpio -1 mode 18 out');&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>How to activate Raspi internal pull-ups and pull-downs</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/4c7e6e9844/?limit=25#4443" rel="alternate"/><published>2021-06-18T09:59:57.894000Z</published><updated>2021-06-18T09:59:57.894000Z</updated><author><name>yann2021</name><uri>https://forge.codesys.com/u/yann2021/</uri></author><id>https://forge.codesys.comac984b38bc6941c368627eba92d96c78c71a3ba2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello aseitzinger,&lt;/p&gt;
&lt;p&gt;Many thanks for your reply. Far too complicated for me! I will simply put external pull up / pull down resistors ! :-D&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to activate Raspi internal pull-ups and pull-downs</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/4c7e6e9844/?limit=25#07ee" rel="alternate"/><published>2021-06-18T07:44:30.675000Z</published><updated>2021-06-18T07:44:30.675000Z</updated><author><name>aseitzinger</name><uri>https://forge.codesys.com/u/aseitzinger/</uri></author><id>https://forge.codesys.comf968fc81031b8a6d30a80640130d946bdeb68b0c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, the setting has to be done outside of CoDeSys. Preferrably at boot time so all pins you want to use as outputs are initialized with the desired level at boot time.&lt;br/&gt;
Here are a few links.&lt;br/&gt;
I have successfully used the method with modifying dt_blob.bin but there seem to be other ways too.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.raspberrypi.org/documentation/configuration/pin-configuration.md" rel="nofollow"&gt;https://www.raspberrypi.org/documentation/configuration/pin-configuration.md&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.raspberrypi.org/documentation/configuration/config-txt/" rel="nofollow"&gt;https://www.raspberrypi.org/documentation/configuration/config-txt/&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to activate Raspi internal pull-ups and pull-downs</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/4c7e6e9844/?limit=25#7961" rel="alternate"/><published>2021-06-06T16:20:50.016000Z</published><updated>2021-06-06T16:20:50.016000Z</updated><author><name>yann2021</name><uri>https://forge.codesys.com/u/yann2021/</uri></author><id>https://forge.codesys.com5d5f161d7521835d16342d4b81060be62272fdfb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;br/&gt;
Fast all is in the tittle... As explained here: &lt;a href="https://raspi.tv/2013/rpi-gpio-basics-6-using-inputs-and-outputs-together-with-rpi-gpio-pull-ups-and-pull-downs" rel="nofollow"&gt;https://raspi.tv/2013/rpi-gpio-basics-6-using-inputs-and-outputs-together-with-rpi-gpio-pull-ups-and-pull-downs&lt;/a&gt; it is possible to enable pull-ups and pull-downs internal resistor of a Raspberry.&lt;br/&gt;
How can I achieve this with Codesys ?&lt;/p&gt;
&lt;p&gt;Many thanks for your answers.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>