<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to How to control the Amp2 from HifiBerry ?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/f63f3ec788/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/f63f3ec788/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/f63f3ec788/</id><updated>2023-07-04T12:26:29.075000Z</updated><subtitle>Recent posts to How to control the Amp2 from HifiBerry ?</subtitle><entry><title>How to control the Amp2 from HifiBerry ?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/f63f3ec788/?limit=25#e70a" rel="alternate"/><published>2023-07-04T12:26:29.075000Z</published><updated>2023-07-04T12:26:29.075000Z</updated><author><name>yann2021</name><uri>https://forge.codesys.com/u/yann2021/</uri></author><id>https://forge.codesys.comc7a2fc1b2da1fd17f0876cec894001de3b2c93b7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;br/&gt;
Any other hints...?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to control the Amp2 from HifiBerry ?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/f63f3ec788/?limit=25#c41b/3c50" rel="alternate"/><published>2023-06-28T11:10:44.952000Z</published><updated>2023-06-28T11:10:44.952000Z</updated><author><name>yann2021</name><uri>https://forge.codesys.com/u/yann2021/</uri></author><id>https://forge.codesys.com0d6e01aeb2da7d87ce49cec872f1f48b178cf349</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;br/&gt;
I tryed this:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;SysProcessExecuteCommand('amixer cset numid=3 20%', ADR(cmdResult2));           &lt;/span&gt;
&lt;span class="err"&gt;SysProcessExecuteCommand('aplay /home/pi/mb/post.wav', ADR(cmdResult));&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;But it's not working... the sound is played but the volume is still at maximum...&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to control the Amp2 from HifiBerry ?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/f63f3ec788/?limit=25#c41b" rel="alternate"/><published>2023-06-27T19:55:28.090000Z</published><updated>2023-06-27T19:55:28.090000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com11ac87fa98096779e56dbf3a44c615f4188d29cb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;if you call the amixer command via CODESYS?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to control the Amp2 from HifiBerry ?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/f63f3ec788/?limit=25#a1b9" rel="alternate"/><published>2023-06-27T16:18:41.704000Z</published><updated>2023-06-27T16:18:41.704000Z</updated><author><name>yann2021</name><uri>https://forge.codesys.com/u/yann2021/</uri></author><id>https://forge.codesys.com810f02a3529fe37a3cce3da7c86488a38f6d295b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;br/&gt;
Of course with:&lt;br/&gt;
"amixer cset numid=3 50%"&lt;br/&gt;
I can change the volume. This is working only if the sound is played in the command line on the Raspi (via Putty) with the command:&lt;br/&gt;
"aplay /home/pi/mb/post.wav"&lt;br/&gt;
But when the command is done via Codesys with:&lt;br/&gt;
"SysProcessExecuteCommand('aplay /home/pi/mb/post.wav', ADR(cmdResult));"&lt;br/&gt;
the volume set before seems ignored and the sound is played at the maximum volume...&lt;br/&gt;
What can I do...?&lt;/p&gt;
&lt;p&gt;Thx&lt;br/&gt;
Yann&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to control the Amp2 from HifiBerry ?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/f63f3ec788/?limit=25#eba1" rel="alternate"/><published>2023-06-27T14:27:29.111000Z</published><updated>2023-06-27T14:27:29.111000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com97fcf9ec30bbc94874337fe5e1743dfaa0dccd4a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;google for 'amixer' cmd under linux&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to control the Amp2 from HifiBerry ?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/f63f3ec788/?limit=25#8462" rel="alternate"/><published>2023-06-27T14:11:43.061000Z</published><updated>2023-06-27T14:11:43.061000Z</updated><author><name>yann2021</name><uri>https://forge.codesys.com/u/yann2021/</uri></author><id>https://forge.codesys.com3726cb9cd2c0377682fab018346069e9116d585e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;br/&gt;
Many thanks, it's working but now how can I adjust the volume ?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to control the Amp2 from HifiBerry ?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/f63f3ec788/?limit=250#708f/c1d4" rel="alternate"/><published>2023-06-27T07:37:16.263000Z</published><updated>2023-06-27T07:37:16.263000Z</updated><author><name>h-hermsen</name><uri>https://forge.codesys.com/u/hermsen/</uri></author><id>https://forge.codesys.com3df6885c2fd81f0db41ad830e8279e990e7cc1f9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;You define a Result in your PLC code, to monitor wether the SysProcess.SysProcessExecuteCommand returns a succes or fail.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to control the Amp2 from HifiBerry ?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/f63f3ec788/?limit=25#708f" rel="alternate"/><published>2023-06-23T12:40:45.618000Z</published><updated>2023-06-23T12:40:45.618000Z</updated><author><name>yann2021</name><uri>https://forge.codesys.com/u/yann2021/</uri></author><id>https://forge.codesys.com8cbf00fc9b1ea3673805fe10d0423af8e2d8e298</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Many thanks for your answer. What exactly "ADR(Result)" do?  How should I declare it?&lt;/p&gt;
&lt;p&gt;Yann&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to control the Amp2 from HifiBerry ?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/f63f3ec788/?limit=25#b93d" rel="alternate"/><published>2023-06-21T18:13:55.099000Z</published><updated>2023-06-21T18:13:55.099000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com2a9d71110da75546418a841abb0d316d3e010220</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I do it for example on a Wago Touchpanel 600 that way:&lt;br/&gt;
(Play sound)&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;IF xTest OR PLC_PRG.xAlarm THEN &lt;/span&gt;
&lt;span class="err"&gt;    //SysProcess.SysProcessExecuteCommand('aplay /var/opt/codesys/alarm1.wav', ADR(Result)); &lt;/span&gt;
&lt;span class="err"&gt;    SysProcess.SysProcessExecuteCommand('aplay /var/opt/codesys/PlcLogic/Application/alarm1.wav', ADR(Result)); &lt;/span&gt;
&lt;span class="err"&gt;    xTest := FALSE; &lt;/span&gt;
&lt;span class="err"&gt;END_IF &lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>How to control the Amp2 from HifiBerry ?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/f63f3ec788/?limit=25#22b2" rel="alternate"/><published>2023-06-21T13:36:16.653000Z</published><updated>2023-06-21T13:36:16.653000Z</updated><author><name>yann2021</name><uri>https://forge.codesys.com/u/yann2021/</uri></author><id>https://forge.codesys.com0c3ca363bb70927eec1e7c8f8d95eebb32aed925</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;To have a good sound quality I would like to use the Amp2 from HifiBerry:&lt;br/&gt;
&lt;a href="https://www.hifiberry.com/shop/boards/hifiberry-amp2/" rel="nofollow"&gt;https://www.hifiberry.com/shop/boards/hifiberry-amp2/&lt;/a&gt;&lt;br/&gt;
Is it possible to control it from Codesys? If yes how?&lt;/p&gt;
&lt;p&gt;Many thanks in advance for your replies.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>