From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with arduino labview Interface

Solved!
Go to solution

I've the interface labview-arduino, but the problems came when i run the program, sometimes this run perfectly, but sometimes (almost all the time), i cant connect this both, the programs runs and don't show me any kind of problems, I can see only in the visa resourse two computers, i dont know if this is because it soppose I have comunication, but my arduino dont work, and I used the Arduino IDE to be shure that my Arduino board is working, and I can use this perfectly with the IDE for arduino but not with VISA,

 

 

so if you know how to solve this, please help me!!!

 

Thank you!

 

0 Kudos
Message 1 of 4
(3,128 Views)

Hello WallsMan,

 

Thanks for using the NI Discussion Forums, I would like to check your code in order to help you, could you share your code with us?

 

Best regards.

David P.
National Instruments
Applications Engineer
www.ni.com/soporte
Message 2 of 4
(3,048 Views)

Of course!

 

and sorry for the time to answered you!

 

https://drive.google.com/open?id=0B1v551LYPaarYldOc05WeHBoQWc&authuser=0

 

Thank you!

 

Wallsman

student

0 Kudos
Message 3 of 4
(2,965 Views)
Solution
Accepted by WallsMan

There is no need to host files somewhere else.  Feel free to upload them to the forums and attach them to your post.

 

Minor comments first.  Why are you re-reading your config file every 2 seconds?  Do you expect it to change?  If not then read it once and don't read it again.

 

I think it would be best if you stopped when an error occured, you can do this by wiring an error to the Or going into the stop condition, or use the compound arithmatic with Or.

 

But I think the major issue you have is that your Arduino reference can be wipped out if you do things wrong.  If your equal comparision is false you go to the false case, where you aren't passing the arduino reference.  So when you go to close you won't close your reference, and your hardware will still be open, and trying to run again will result in an error.  Similarly if your for loop runs for 0 iterations your reference is lost.  Attached is an updated version which has some of these changes.

Message 4 of 4
(2,905 Views)