LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LCD Screen with Arduino uno interface for labview

Hello LabVIEW help,

 

I am using an arduino uno to output text to an LCD screen.  The output to the screen is determined through a LabVIEW code that can be changed at will.  The issue I am having is that every other time I run the LabVIEW code the LCD will print out gibberish in place of the strings I have written in LabVIEW.  I can run the code for the first time and everything runs flawlessly as I want, but whenever I stop and try to run again it will print all the goofy characters and symbols.  Then upon the 3rd run it is all back to normal again.  I have linked my labview code and I apologize if it is not as organized as some may desire I have just been getting quite complexed over why this will not function properly.

 

You will notice the file is named "final project for measurements 2" this is because yes it is for a final project.  However, I spoke with my professor today and he said he is not sure what to do in this case and that it would be a good idea to try the forums.  Furthermore this will be only a subVi used in a much larger project.  I linked the project file and all of my VIs in the project, but the one in question is the "LCD Screen Control Base.vi"  You will see in this VI there are a large number of time delays on every section and this was the way I was able to allow the program to run properly every time, since what was happening before, was data was being passed along the wire faster than the arduino could update the screen.

 

I am using the arduino interface for labview found in the VIPM.  Everything downloaded is recent as well I did not intentionally take anything that was not up to date.

 

I would really appreciate some sort of guidance on this one

 

Thank you all!

 

P.S.  This is my first time posting so I do not know all the normal protocols for a post.

0 Kudos
Message 1 of 5
(2,164 Views)

Well, I don't have the toolkit you're using but I can tell you that it's pretty weird that your VI is 14 megs in size.  If I just load it, and copy-paste everything from it into a new VI, it drops from 14 megs to 4 right away.  That's still too much,  (200Kish is what I would expect a VI to look like this on disk, max) but it might be better.  I deleted the front panel controls for the pin config and it got even smaller (400k-ish) which is at least in the right ballpark. 

 

Can you try doing that on your system and seeing if it runs any better (after recreating the pin config clusters, or course)?

 

Sometimes LabVIEW VIs get corrupted, but recreating the code in another VI suddenly makes them work because moving the code or deleting and recreating things forces an internal cleanup of sorts.

 

If that doesn't fix it, I'd open up the toolkit VIs way down deep in their code until you find the "VISA Write" sections of code, and add a probe to the wire running into that.  If it's writing different things each time you run it, then that gives you one vector to troubleshoot, and if it's writing the same thing both times but getting the same alternate readouts on the LCD, then you might be better suited asking on an Arduino board why your hardware is acting strange.

 

As for protocols on the post, you did pretty good (detailed explanation, posted actual code) but FYI that it's pretty common to save VIs back about 3 versions or so because not everyone has 2020 installed.  A lot of people decide to stick with the same version 2-4 years to avoid having to update all of their code quite so often, and the LabVIEW support software always supports the current version plus the 3 versions prior to that.

0 Kudos
Message 2 of 5
(2,125 Views)

Is it possible that since you do not have the arduino for labview downloaded, that whenever you copy then pasted it did not show the rest of all of the sub VIs?  There are quite a large number of nested Vis running behind the scenes.  The interface takes out a lot of the intermediate Vis to be created by putting them all into one input output thing.  I did also try the redo method just to see and I keep getting the same issue.  I am really leaning towards it being an issue somewhere in the sub VIs since I have already encountered this issue once before for another piece of hardware that was supported for the interface.  

 

I might need to head over to the arduino board here at some point as well I did not think to think of that haha.

 

Did that help narrow things down at all?

 

Thanks for such a quick response as well!

0 Kudos
Message 3 of 5
(2,119 Views)
  1. Why are you using LIFA?
  2. LIFA has long since been deprecated and replaced with LINX

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 5
(2,078 Views)

I am actually using both for my total project but I was reading other forums and the best way I could find to get the particular LCD I have to work was to use an outdated arduino code mixed with LIFA.  I am still using LINX as well.  I know there could be some issues here since the older dates but I feel like the issue I am encountering is not necessarily due to dates and more with code.  I am just not knowledgeable enough to understand what parts of the code may cause my error.  Also the interface I am using for the LCD VI is arduino for labview.  Just some parts of the LCD as a whole use LIFA.

0 Kudos
Message 5 of 5
(2,069 Views)