<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent posts to Discussion</title><link>https://forge.codesys.com/drv/relay-pi-plate/discussion/</link><description>Recent posts to Discussion</description><language>en</language><lastBuildDate>Thu, 29 Sep 2022 13:43:11 -0000</lastBuildDate><atom:link href="https://forge.codesys.com/drv/relay-pi-plate/discussion/feed.rss" rel="self" type="application/rss+xml"></atom:link><item><title>How to turn on a GPIO from a device function block</title><link>https://forge.codesys.com/drv/relay-pi-plate/discussion/general/thread/0e1bf5739b/?limit=25#7ecd</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, I was working on libraries for Pi-Plates in codesys back in 2019 too :)&lt;br/&gt;
I was struggling with the same issue as you regarding GPIO25. &lt;br/&gt;
Looks like you cannot access the GPIO25 outside a task eg. changing state within the library for each read/write cycles in a for loop.&lt;/p&gt;
&lt;p&gt;But I found a workaround: Connecting a optocoupler controlled by CS1 (chip select) to toggle GPIO25 towards Pi-Plate wire. and adjusting SPI communication speed/frequency and delay, I got it working.&lt;/p&gt;
&lt;p&gt;I decided to update and publish my work on github today :)&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/lwalbert/piplates-CodeSys" rel="nofollow"&gt;https://github.com/lwalbert/piplates-CodeSys&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Lennart&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">lwalbert</dc:creator><pubDate>Thu, 29 Sep 2022 13:43:11 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.comba299a16f6469b3f76baf256834dc3c9148fbec6</guid></item><item><title>How to turn on a GPIO from a device function block</title><link>https://forge.codesys.com/drv/relay-pi-plate/discussion/general/thread/0e1bf5739b/?limit=25#9adc</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I need to link a GPIO to a function block.  I think I just need to point the address to the GPIO when the function block is initialized.  Then control the output when needed.&lt;/p&gt;
&lt;p&gt;Output 25 turns on just before the SPI transmits to the relay board then turns off afterward.  I don't know what is used for, but I am going to follow what the creator of the relay board did. &lt;/p&gt;
&lt;p&gt;Any suggestions?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">BG_Automation</dc:creator><pubDate>Sat, 07 Dec 2019 16:20:25 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com35eb0459c1fce8904414f797f5e16a16e9683dd1</guid></item></channel></rss>