LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MyRio Datenaustausch auf den PC

Hallo Zusammen

 

Vielleicht kann mir jemand helfen, ich habe folgendes Problem.

 

An einem MyRio 1900 habe ich diverse externe Sensoren angeschlossen. Diese übertrage ich mittels globaler Variabeln auf mein Main auf dem PC. Von da aus will ich die Daten dann mit Hilfe einer Queue Struktur weiterverarbeiten. Das heisst manche Werte analysieren und auf dem Frontbildschirm anzeigen und beim Überschreiten von Grenzwerten Warnungen absetzen, sowie automatisch ein Log-File erstellen.

 

Ich verstehe leider nicht ganz wo ich die Daten der globalen Variabel einspeisen soll. mach ich dies in einem separaten While-Loop ausserhalb der Queue-Struktur oder innerhalb eines Consumer-Loops? im Producer Loop mit integrierter Event-Struktur kann ich dies ja nicht abrufen da dieser nur bei einem Event ausgeführt wird.

 

Wenn mir jemand weiterhelfen kann bin ich sehr dankbar.

 

Vielen Dank schon im Voraus für eure Bemühungen.

Gruss Kilian

0 Kudos
Message 1 of 2
(137 Views)

Hello, Kilian.  Please forgive my responding in English -- Google translated your request for me, and I hope it can translate my response, should you need it.

 

You realize, I hope, that the myRIO is a computer, running an Operating System (NI Real-Time Linux), and has a number of useful Data Acquisition peripherals, such as A/D converters and digital I/O ports.  It is meant to work as the "Real-Time" component of a LabVIEW Real-Time Project, with a PC running the "Host" code that has the normal LabVIEW Front Panel, with Controls and Indicators that the "User" can use to control the program and visualize data, as well as spool data to the PC's disk, while the myRIO handles the "hardware" used to gather data and control acquisition peripherals.

 

The PC Host and myRIO Real-Time Target communicate over TCP/IP, either through the USB cable that plugs into the myRIO (the "B" end of the A/B USB cable) or through WiFi.

 

For sending one or two signals back and forth between the Host and Target, you could use Global Variables, shared between Host and Target, but that is slow and somewhat unreliable.  You also have to think about how you want to synchronize the timing between the myRIO, which acquires the data, and the PC, which receives it from the myRIO some (unknown?) time later.

 

Many of us working with LabVIEW Real-Time systems use some form of TCP/IP (I use Network Streams, a LabVIEW communication protocol that works quite nicely to send commands and data back and forth between PC and myRIO).  

 

Have you had experience using the simpler USB DAQmx data acquisition peripherals from NI that plug directly into the PC's USB port and can be directly addressed by LabVIEW, showing up on MAX in the "My Computer" section (instead of "Remote Systems", where the myRIO appears)?  This would be much simpler to program.  It is much simpler to manage a LabVIEW Project that has a single computer (the PC) with a few peripherals (USB DAQmx devices) than a LabVIEW Real-Time Project that has two computers (the PC and the myRIO) with Real-Time I/O on the myRIO and User Interaction, User Control, and User Visualization all on the PC.

 

Bob Schor

0 Kudos
Message 2 of 2
(102 Views)