Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Newbie Here - cRIO Confusion

Greetings LabVIEW Community,

 

I'm working with the compactRIO-9067 and an assortment of NI cards plugged into the chassis. 

 

After reading through several NI articles, I am still just as uncertain as when I started. When an article says that the LabVIEW FPGA module is "optional" - what exactly does that mean? One article said I only need the FPGA module if I'm programming the FPGA to do some hardware-level signal processing & another said that I need the FPGA module if I want the Linux-RT chip to have access to the I/O. 

 

All I need is a data acquisition unit that can read 50 sensor values at 10 Hz and give them to a host computer for storage and processing in Python.

0 Kudos
Message 1 of 10
(2,130 Views)

Scan mode, see https://www.ni.com/en-us/innovations/white-papers/08/understanding-ni-compactrio-scan-mode.html is what makes the FPGA programming part optional.


Certified LabVIEW Architect, Certified Professional Instructor
ALE Consultants

Introduction to LabVIEW FPGA for RF, Radar, and Electronic Warfare Applications
0 Kudos
Message 2 of 10
(2,123 Views)

At that rate, you can probably use the Scan Engine, which means you shouldn't need the FPGA module.  I'll have to see if I can make a setup to check that out.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 10
(2,120 Views)

Thank you,

 

So I have to write two LabVIEW programs, one for the host and one for the compactRIO's RT module?

 

Is there a way to ensure that the Host's LabVIEW program begins running at boot?

 

I was thinking of running Linux for the Host PC, but the Real-Time module is only available for Windows. Are there any work-arounds?

0 Kudos
Message 4 of 10
(2,114 Views)

You only need a Windows machine to program the RT part of the cRIO.  The cRIO actually runs NI Linux RT on it.

 

For a host, you just need a program that can communicate with the cRIO over the TCP connection, not necessarily written with LabVIEW.  That communication protocol can be whatever you define it.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 10
(2,105 Views)

Hey crossrulz,

 

Will TCP work if the cRIO is plugged directly into the host using USB - what port on the localhost would it appear as?

0 Kudos
Message 6 of 10
(2,101 Views)

When directly plugged in through USB, the cRIO actually shows up as a network device.  I don't remember the exact addresses it defaults to.  But, yes, TCP will still work.  Personally, I don't do that.  I use the USB connection for configuration and debug (through the LabVIEW project and/or MAX) and the Ethernet connection for deployment (communicating with host application).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 10
(2,085 Views)

Why don't you use the USB connection? Do you just plug the cRIO directly into the host's ethernet port?

Would you happen to have any good references for TCP communication on the cRIO? I think I can get moving after I see a Hello World TCP server program for the cRIO.

0 Kudos
Message 8 of 10
(2,046 Views)

1. I don't trust USB for permanent connections.  I use Ethernet to communicate with my instruments as much as possible.  So my racks have Ethernet switches that all of my instruments and computer connect to.

 

2. All you really need is to learn TCP communications.  In LabVIEW, you can go into the Example Finder (Help->Find Examples) and just do a simple search for TCP.  If you want a more fleshed out communication, look into the STM library (Simple TCP Messaging, available in VI Package Manager).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 10
(2,036 Views)

Ok, ethernet cable ordered. I started trying out an example to test functionality but it's not working.

 

Right now I'm using the USB connection, which has the default address of 172.22.11.2

 

I tried out the TCP examples in LabVIEW, namely:

Simple TCP - Client.vi 

Simple TCP - Server.vi

 

I added the cRIO to the project and moved the Server.vi under it; updating the ports and addresses in the two Vi's (client's target is 172.22.11.1:5020 ; server's host port is 5020). The Sever.vi deployed to the cRIO successfully. However, when I run the programs, first running the server, then client, I get an error message:
From the client:

 

LabVIEW: (Hex 0x3F) Serial port receive buffer overflow.

=========================

LabVIEW: (Hex 0x3F) The network connection was refused by the server.

 

After 30 seconds the Server.vi gets the timeout error, since it doesn't get the connection.

 

I did look at the VI Server properties of the cRIO, checked the TCP/IP box, and deployed.


I'm not sure what the problem is, other than maybe the cRIO is not on the same subnet as the host, which is on a 192.168.X.X network, but that that can't be the problem since the cRIO's subnet is just another network that the host is connected to? Is this a firewalling issue?

0 Kudos
Message 10 of 10
(1,979 Views)