LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i interface esp and myRio through wifi?

I am using esp8266 to acquire data from the sensors , now i want to send that data collected to myRio through wifi so that i can operate further on NI LabVIEW.

0 Kudos
Message 1 of 5
(840 Views)

If you want to operate on your data with LabVIEW, and have a device (the ESP8266) that can gather the data from "the sensors" and send it somewhere using WiFi (and presumably TCP/IP), why don't you send it directly to your Windows PC running LabVIEW?

 

Although the myRIO also has WiFi, most of the time it uses TCP/IP (either through WiFi or through TCP/IP-over-USB (172.22.11.2) to communicate with a PC "Host", as the myRIO has no User Interface, and depends on its TCP/IP connection to a PC to facilitate interaction with humans.

 

Bob Schor

Message 2 of 5
(782 Views)

Thank you for your reply.

I want to use myRio because i am trying to make a device which can work independently , where i don't have to use my PC. Instead i want to connect a screen to myrio for the purpose of user interface.

I want to connect data from the sensors using esp8266 and send that data wirelessly to myrio.

and i will deploy my VI into the myrio to further operate on that data received from esp.

How can i do that?

 

0 Kudos
Message 3 of 5
(742 Views)

komal2031189@akgec.ac.in wrote:

I want to use myRio because i am trying to make a device which can work independently , where i don't have to use my PC. Instead i want to connect a screen to myrio for the purpose of user interface.

I want to connect data from the sensors using esp8266 and send that data wirelessly to myrio.

and i will deploy my VI into the myrio to further operate on that data received from esp.

How can i do that?


The short answer is "You cannot do that".

  • There is no way (short of connect a PC running the Host part of a LabVIEW Real-Time project with the myRIO as the "Real-Time Target") to "connect a screen" to the myRIO -- it has no Video hardware.
  • You can connect analog and digital lines to the myRIO, but without a "screen", it will be challenging to "see what you are doing".  Of course, you could use 8 digital lines to read 8 push-buttons (digital inputs), and another 8 digital lines to turn on 8 LEDs (digital outputs), but that's not so interesting.
  • The myRIO has two TCP/IP channels.  One is its USB connection at 172.22.11.2, which is how you connect it to the PC when you first get it in order to load firmware and software.  This is also a "frequently-used" connection for programming the myRIO as the Real-Time Target of a LabVIEW Real-Time Project, with the PC running (or not) the Host software, which is where the Front Panel (with "screens" and "formatted" Front Panel Controls, designed for human viewing) is located.  The other is its build-in WiFi chip, which can give it a different WiFi address that can allow it to connect (again, almost always to a PC) over a restricted set of IPs (I don't remember right now the "rules" for setting its static IP).
  • The myRIO has limited storage -- 512 MB, which include the NI Linux Real-Time OS and support files, and any code you deploy to it.  For this reason, many Real-Time routines on the myRIO do not attempt to write data on the myRIO.  When it is run as the Target of an LabVIEW-RT Project, the data are often saved on the Host (PC), getting there via TCP/IP, either through direct TCP commands or via Network Streams.  Another possibility (which I haven't tried) is to use the other USB port on the myRIO and connect a Flash Drive (which can have many GB).
  • Your plan to use the myRIO to acquire data via a wireless TCP/IP connection and "process it" in the myRIO can be done, but the only remaining I/O that the myRIO has to interact with a User are its connections on the A, B, and C connectors on its sides (plus the audio ports).

If you do plan to create a LabVIEW Real-Time Project using the myRIO, you should spend some time learning how to program in LabVIEW, including how to handle data acquisition (DAQmx) and processing in "stand-alone PC" LabVIEW.

 

Bob Schor

0 Kudos
Message 4 of 5
(728 Views)

The "you can't do that" is more specifically meant in respect to your request to attach a screen to your myRIO.

 

As far as connecting an ESP32 or similar device to the myRIO, you neither "connect" them together either. They both need to be able to connect to a WIFI access point, they don't typically can be made to work as access point themselves. Once they are both setup to connect to your WIFI access point you can find out the IP address (or if you have at least a minimal name server setup in your network) the DNS name and then connect with normal TCP/IP functions in your application. But there is no screen in the myRIO unless you go to the trouble of attaching and programming an LCD screen of some sort. That is however far beyond an introductory newbie session! 

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 5
(705 Views)