Jump to content

Send string from LabVIEW to ARDUINO via serial port


Recommended Posts

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.   

 

 

post-38707-0-42358300-1414700507.jpg

Arduino code.txt

Edited by Majo
  • Like 1
Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

Link to post
Share on other sites
  • 1 year later...
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.   

 

 

Labview.JPG

Arduino code.txt

i want exactly opposite to this.. i want to send any abc string to labview serially.. could any one provide codes..

 

Link to post
Share on other sites

@ 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 

Link to post
Share on other sites
  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By Yaw Mensah
      I have installed Labview 2020 on Dedian Buster using the rpm to deb conversion method via alien. Due to Architecture mismatch i deleted the *i386.rpm files before conversion.
      My Problem is that after creating a project at "Build Specification"-> "rigth click" i am only able to select "Source Distribution". Application does not show up as an option. 
      I will be grateful for any suggestions.
      Thank you in advance.
    • By javier_r
      VIPM.io now allows you to post LabVIEW Resources, Ideas, and Tools. For example, you could post a link to a video tutorial or blog article about a package. You can also post ideas, like feature requests or new tools. Best of all, package developers are notified when you post your ideas and resources, and you can comment and discuss posts with the community. Take a look at this video to learn more: https://www.vipm.io/posts/664960df-f111-4e13-989a-24be8207182d/

    • By Shuvankar Das
      I want to connect My ccd camera with labview. The details of my system is given bellow. I cannot connect it please help   OS:  WINDOWS 7, 64bit   LabView Run-Time 2013(64-bit) NI-IMAQ 4.8 NI-IMAQdx 4.3   Camera: QICAM Monochrome Cooled (QIC-F-M-12-C) Model QICAM Resolution 1392 x 1040 Sensor 1/2" Sony ICX205 progressive-scan interline CCD Pixel Size 4.65 x 4.65µm Cooling Type Peltier thermoelectric cooling to 25˚C below ambient Digital Output 12 bit Video Output FireWire (IEEE 1394b) Max. Frame Rate 10 fps full resolution @ 12 bits Pixel Scan 20, 10, 5, 2.5MHz Mount Type C-mount optical format  
       
    • By javier_r
      Hello everybody!
      Wondering how many people have tried the new vipm.io site. We have added a ton of features to make it easy to Discover LabVIEW Tools and there are some cool ones coming soon.
      Check it out and let me know what you think 😀
       
      Javier

    • By DigDoug
      CLA_ATM_QMH_PRACTICE.zipHi Folks,
       
      I'm taking the CLA exam in a few weeks and would like some feedback on the solution I put together (attached). A few specific questions:
      Can I dump tags in the VI Documentation of the VI like I did in Error Handler - Console Error.vi and get credit since there are instructions for developers to complete this work? This would be my strategy if I run out of time. 
      Does this seem like a passing solution? Why/why not?
      Where do you think I would lose the most points in this solution?
      Any other feedback on this exam or general strategy tips are greatly appreciated!
       
      Best Regards,
      Aaron
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.