Majo Posted October 30, 2014 Report Posted October 30, 2014 (edited) Hello, I need a little help. I want to send from LabVIEW to Arduino via serial port the string for example "ABC" and so on. The problem is that when I send the string from LabVIEW .......the Arduino do nothing. Sometimes shows some kind of sign. When I send the string via Visual Studio it works perfectly. Is there someone who can help me. I attached picture of vi and Arduino code Thank you very much. Arduino code.txt Edited October 30, 2014 by Majo 1 Quote
hooovahh Posted October 30, 2014 Report Posted October 30, 2014 Wow, okay well you are opening that serial port over and over again as fast as Windows will allow. Now luckily the resource will be locked and you will generate an error the second time that loop runs. Unfortunately you aren't looking at the error, and the error isn't stopping your loop so you won't know there is an error until you stop it your self. Go to the Help >> Find Examples and search for Serial. In newer versions of LabVIEW the example is called Continuous Serial Write and Read. Older ones had a similar example but it has been re-written. This should perform basic serial I/O and assuming it works, you can takes pieces out and make your own application with it. Quote
Majo Posted October 30, 2014 Author Report Posted October 30, 2014 Well, I tried to open serial port outside of the loop, but the result was the same. OK, I will look at Continuous Serial Write and Read and I will see if there something which I can use. Quote
Bryan Posted October 31, 2014 Report Posted October 31, 2014 Aside from moving your serial configuration VI outside the while loop, you may want to also add a delay to the loop as well. You may be pounding it with data faster than it can handle them (maybe, I've never had the opportunitiy to play with Arduino). Additionally, how is your Arduino set up to handle termination characters? I didn't see anything in the Arduino code specifying anything other than the baud rate. By default, the serial config VI enables a termination character using a line-feed. I don't know what VB serial configuration defaults are. Quote
kshata Posted October 3, 2016 Report Posted October 3, 2016 On 10/31/2014 at 1:58 AM, Majo said: Hello, I need a little help. I want to send from LabVIEW to Arduino via serial port the string for example "ABC" and so on. The problem is that when I send the string from LabVIEW .......the Arduino do nothing. Sometimes shows some kind of sign. When I send the string via Visual Studio it works perfectly. Is there someone who can help me. I attached picture of vi and Arduino code Thank you very much. Arduino code.txt i want exactly opposite to this.. i want to send any abc string to labview serially.. could any one provide codes.. Quote
kshata Posted October 7, 2016 Report Posted October 7, 2016 @ arduino code u provided in attachment... i tried to compile in arduino ide but its showing error msg like this Arduino: 1.6.12 (Windows 7), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)" C:\Users\310257021\Documents\Arduino\readtry\readtry.ino:5:30: fatal error: Adafruit_ILI9341.h: No such file or directory #include <Adafruit_ILI9341.h> ^ compilation terminated. exit status 1 Error compiling for board Arduino/Genuino Mega or Mega 2560. This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. how could i remove this?? i also want to receive serial data from com port Quote
VladimirM Posted January 14, 2017 Report Posted January 14, 2017 During debugging stage you can use RS232 terminal tool to send receive data For example http://docklight.de/ That is nice one since it has binary/HEX/ascii view and you can make predefined strings for sending. Also supports easy scripting.. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.