LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

myRIO with Waveshare 1602 I2C LCD Display

Hello 

Im trying to interface myRIO with waveshare 1602 I2C LCD display and we are getting the error which is pasted below even though the connection are perfect , but i have a doubt that does the waveshare I2C LCD module supports with myRIO ??

Download All
0 Kudos
Message 1 of 6
(222 Views)

Two (I hope helpful) comments to help you get the most out of the LabVIEW Forums:

  1. If you have something that is not working in your LabVIEW code, don't just send "pictures of the Error Messages", but also include the LabVIEW Code that caused the Errors!.  When sending LabVIEW code, remember that we can't easily inspect, edit, or execute "pictures of code" (unless they are LabVIEW "snippets"), and also that many of the more-experienced LabVIEW users on this Forum are not running the latest version of LabVIEW, so you should "Save for Previous Version" and specify LabVIEW 2019 or 2021.
  2. It is also a good idea to use the Forum's Search feature (not to mention using Google).  Try "myRIO I2C" and check out the solutions found there.

One more thing (especially important for myRIO discussions) you should mention is the version of LabVIEW you are running.  In this case, the most recent versions that might work are LabVIEW 2019 and LabVIEW 2021, as they have a myRIO Software Toolkit available.

 

Bob Schor

0 Kudos
Message 2 of 6
(183 Views)

So im using the labview 2021 version which is supported by the myRIO and i have attached he project file which is downloaded from NI website under the myRIO projects.

0 Kudos
Message 3 of 6
(161 Views)

sathvikum@gmail.com wrote:

So im using the labview 2021 version which is supported by the myRIO and i have attached he project file which is downloaded from NI website under the myRIO projects.


I apologize for not making my request clear.  You attached the "main VI" of a LabVIEW Real-Time Project which is "governed" by a Project File, a file whose extension is ".lvproj".  Please attach the "LabVIEW Project", including the Project File and the various VIs (I suspect there may be only one) in the Project.  Assuming that the Project File and the "files in the Project" are all in the same Folder, the best way to do this is to right-click the Project Folder, choose "Send To:", and select "Compressed (zipped) Folder".  With all these pieces, I can test your code and try to understand the problem you are having.

 

Bob Schor

0 Kudos
Message 4 of 6
(140 Views)

As per your instruction i have attached the folder 

 

0 Kudos
Message 5 of 6
(137 Views)

A little bit of progress.  This Project is from LabVIEW 2013 (I think SP1), which means you didn't write it, and it probably will work with the right hardware/software.  Your Main VI is written in LabVIEW 2021, but my myRIO is running LabVIEW 2019, so if I open your Project with LabVIEW 2019, I can't deploy the LabVIEW 2021 "Main", and if I open it with LabVIEW 2021, I don't have (right now) a myRIO provisioned for LabVIEW 2021.

 

So I did the next-best thing, I "Saved for Previous Version" you Main to LabVIEW 2019, and was able to deploy it successfully to the myRIO.

 

So here are the steps I did, and you should do the same thing on your end.

 

  1. With the myRIO connected via USB to your PC running LabVIEW 2021, open your Project.  You should see something like this:LCD (I2C) Demo Project.png
  2. Double-click Main to open its Front Panel.  Bring up the Block Diagram.
  3. Adjust the view so you can see the beginning of the code and maybe the While Loop.
  4. Turn on "Highlight Execution" (the light-bulb, 5th Tool-bar icon).
  5. Press "Start Single Stepping" (two more icons to the right).  That should deploy the code.
  6. Your code should start, and stop at "String to Byte Array".
  7. Push single-step.  You should see "#7", and now ready for first I²C function.
  8. Single-Step.  I get Error -363011, which translates as "LabVIEW myRIO: Received a NAK bit from the slave device after the last address transmission".

This is, undoubtedly, because I didn't have your Waveshare 1602 I2C LCD Display connected.  So before running this test yourself, on your system, with your LabVIEW 2021 myRIO, be sure to wire the Display correctly to the right pins on the right port.

 

If you get past this step without an error, keep single stepping, looking for errors, and looking to see if you "get stuck" on a function (for example, you ask for something but get no response).  Let me know how it goes.  

 

Bob Schor

0 Kudos
Message 6 of 6
(124 Views)