<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Digital Signal from Labfew/LINX to Arduino in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Digital-Signal-from-Labfew-LINX-to-Arduino/m-p/3790360#M1069167</link>
    <description>&lt;P&gt;Hi GerdW,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I just figured out that the problem is not that the main loop takes so long.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tested the response in a really basic program and figured out that my serial comunication itself is verry slow.&lt;/P&gt;
&lt;P&gt;When I press the buttun "Signal Simulation" it takes over a secont to set output pin HIGH and light an test LED. &lt;BR /&gt;Is there any way to do faster communication?&lt;/P&gt;
&lt;P&gt;I attached the vi,&amp;nbsp; Ardunio Skript below. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Greeting Florian&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;String Input = "";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;const int output = 10;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;void setup() {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; pinMode(output, OUTPUT);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; digitalWrite(output, LOW);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; // put your setup code here, to run once:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; Serial.begin(9600);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; delay(10);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; Serial.print("ready");&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;void loop() {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; if (Serial.available() &amp;gt; 0) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Input = Serial.readString();&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (Input == "SignalLow") {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; digitalWrite(output, LOW);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (Input == "SignalHigh") {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; digitalWrite(output, HIGH);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; }&amp;nbsp; &lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 08 May 2018 09:11:49 GMT</pubDate>
    <dc:creator>FloMaye</dc:creator>
    <dc:date>2018-05-08T09:11:49Z</dc:date>
    <item>
      <title>Digital Signal from Labfew/LINX to Arduino</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Digital-Signal-from-Labfew-LINX-to-Arduino/m-p/3790008#M1069026</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;I want so send a digital signal (0v or 5V) from LabVIEW/Linx&amp;nbsp; to my arduino because I need to use the interrupt pin from my Arduino for faster comunication. &lt;BR /&gt;I tryed via serial communication but I can not affort to wait in the programm till I reach the line where the Aruino reads the serial input.&lt;/P&gt;
&lt;P&gt;If anyone has an Idea, pleas let me know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards&lt;/P&gt;
&lt;P&gt;Florian&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 14:27:55 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Digital-Signal-from-Labfew-LINX-to-Arduino/m-p/3790008#M1069026</guid>
      <dc:creator>FloMaye</dc:creator>
      <dc:date>2018-05-07T14:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Digital Signal from Labfew/LINX to Arduino</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Digital-Signal-from-Labfew-LINX-to-Arduino/m-p/3790036#M1069036</link>
      <description>&lt;P&gt;Hi Florian,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&lt;FONT color="#FF0000"&gt;I tryed via serial communication but I can not affort to wait in the programm till I reach the line where the Aruino reads the serial input.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;When using LINX, then you have to use serial communication and so you have to wait until the Arduino "reaches the line"…&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which "line" are you waiting for?&lt;/P&gt;
&lt;P&gt;What have you tried so far?&lt;/P&gt;
&lt;P&gt;Where are you stuck?&lt;/P&gt;
&lt;P&gt;Mind to attach a VI?&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 14:52:24 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Digital-Signal-from-Labfew-LINX-to-Arduino/m-p/3790036#M1069036</guid>
      <dc:creator>GerdW</dc:creator>
      <dc:date>2018-05-07T14:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Digital Signal from Labfew/LINX to Arduino</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Digital-Signal-from-Labfew-LINX-to-Arduino/m-p/3790340#M1069160</link>
      <description>&lt;P&gt;Hi GerdW,&lt;/P&gt;
&lt;P&gt;thanks for your reply. &lt;/P&gt;
&lt;P&gt;I want to send a signal from my PC to alter something in the Arduino Programm while its running.&lt;/P&gt;
&lt;P&gt;The Arduino programm is cycling in main loop while performing different tasks on after another till it reachs the lline:&amp;nbsp; &lt;BR /&gt;if (Serial.available() &amp;gt; 0) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Input = Serial.readString();&lt;BR /&gt;...........&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Response is to slow beacause the Arduino needs to long to process the other tasks in the main loop.&lt;BR /&gt;(For example it reaches the line only every 0.5 sec)&lt;BR /&gt;My idea was to use the interrupt pin.&amp;nbsp;&lt;BR /&gt;I could use an second Arduino which just waits for serial signals and set one pin HIGH which is attachet to the interrupt pin of the first Arduino. &lt;BR /&gt;&lt;BR /&gt;But i hope there is a more elegant solutiuon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Florian&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 08:16:05 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Digital-Signal-from-Labfew-LINX-to-Arduino/m-p/3790340#M1069160</guid>
      <dc:creator>FloMaye</dc:creator>
      <dc:date>2018-05-08T08:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Digital Signal from Labfew/LINX to Arduino</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Digital-Signal-from-Labfew-LINX-to-Arduino/m-p/3790360#M1069167</link>
      <description>&lt;P&gt;Hi GerdW,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I just figured out that the problem is not that the main loop takes so long.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tested the response in a really basic program and figured out that my serial comunication itself is verry slow.&lt;/P&gt;
&lt;P&gt;When I press the buttun "Signal Simulation" it takes over a secont to set output pin HIGH and light an test LED. &lt;BR /&gt;Is there any way to do faster communication?&lt;/P&gt;
&lt;P&gt;I attached the vi,&amp;nbsp; Ardunio Skript below. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Greeting Florian&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;String Input = "";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;const int output = 10;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;void setup() {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; pinMode(output, OUTPUT);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; digitalWrite(output, LOW);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; // put your setup code here, to run once:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; Serial.begin(9600);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; delay(10);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; Serial.print("ready");&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;void loop() {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; if (Serial.available() &amp;gt; 0) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Input = Serial.readString();&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (Input == "SignalLow") {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; digitalWrite(output, LOW);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (Input == "SignalHigh") {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; digitalWrite(output, HIGH);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; }&amp;nbsp; &lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 09:11:49 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Digital-Signal-from-Labfew-LINX-to-Arduino/m-p/3790360#M1069167</guid>
      <dc:creator>FloMaye</dc:creator>
      <dc:date>2018-05-08T09:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: Digital Signal from Labfew/LINX to Arduino</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Digital-Signal-from-Labfew-LINX-to-Arduino/m-p/3790377#M1069176</link>
      <description>&lt;P&gt;Hi Florian,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;your VI looks quite ok - you should have used AutoCleanup once before posting the VI…&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With 9600baud you need ~10ms to transfer your commands "SignalHigh"/"SignalLow" (about 1ms per byte). When it comes to speed you might think about using a different baudrate (like 57600baud) and to shorten your commands (like "S1"/"S0", respectively).&lt;/P&gt;
&lt;P&gt;On the other hand I wouldn't expect (or cannot explain) your code to need ~1s to execute those commands.&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 10:40:04 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Digital-Signal-from-Labfew-LINX-to-Arduino/m-p/3790377#M1069176</guid>
      <dc:creator>GerdW</dc:creator>
      <dc:date>2018-05-08T10:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Digital Signal from Labfew/LINX to Arduino</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Digital-Signal-from-Labfew-LINX-to-Arduino/m-p/3790464#M1069218</link>
      <description>&lt;P&gt;Hi GerdW,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the advice. &lt;BR /&gt;Shorten the commands helped a lot, was not necessary to alter the baudrate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;BR /&gt; Florian&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 14:01:17 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Digital-Signal-from-Labfew-LINX-to-Arduino/m-p/3790464#M1069218</guid>
      <dc:creator>FloMaye</dc:creator>
      <dc:date>2018-05-08T14:01:17Z</dc:date>
    </item>
  </channel>
</rss>

