LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO compiling another code as start-up

Solved!
Go to solution

Hi, I have compiled (build as start-up) a stand-alone application on cRIO and it works good. 

 

Now when I plug the Ethernet cable into the cRIO to connect to cRIO in order to remove the previous application and build another one, I can not connect to the cRIO due to the following error. 

 

I was wondering how to solve it. 

 

connect error.png

0 Kudos
Message 1 of 15
(2,612 Views)
Solution
Accepted by topic author Cashany

First steps - have you confirmed that the networking to the cRIO is still correct? When you plug in the ethernet cable, can you ping the cRIO (from a command line)? Can you see the cRIO in Measurement and Automation Explorer? If you can't access it at all, then there's a networking problem. Check your IP address, and firewall settings.

 

The cRIO has a set of DIP switches, one of which disables any startup application. If you set that switch, then reboot the cRIO, can you then connect to it? If so, there might be a problem with your startup application - perhaps you have a loop with no wait which is preventing background networking tasks from running (such as allowing connections from the development environment).

Message 2 of 15
(2,607 Views)

I used the on-board switch "NO APP" and then turned cRIO on. 

Now I can connnect to cRIO. 

 

When I don't use the swich "NO APP" I can not connect to my cRIO. 

Does it mean that my code has bugs?

0 Kudos
Message 3 of 15
(2,604 Views)

It probably means that your application is loading the processor so heavily that the cRIO does not have time to service lower-priority tasks like accepting network connections from the development environment. It's possible that your application really does need to do a lot of computation constantly, but more likely it means you should look at whether your application is loading the processor unnecessarily. The first thing to look for is any while loop that doesn't have a timing mechanism inside it (such as a Wait).

Message 4 of 15
(2,600 Views)

My while loop in real-time code is a timped-loop with a frequency of 1MHz. Maybe this frequency is very damanding for real-time CPU. 

0 Kudos
Message 5 of 15
(2,598 Views)

I doubt it's even successfully running at 1mhz - have you checked the timing? Do you need it to run that fast?

Message 6 of 15
(2,596 Views)

I used 1KHz first, but my DMA FIFO was getting full. 

So I increased the frequency to 1MHz. 

0 Kudos
Message 7 of 15
(2,594 Views)

Why do you need the timed loop? If the goal is to keep up with a FIFO, then use a standard while loop and let the FIFO Read determine the timing. Make sure the timeout value is long enough to allow the desired number of elements to fill the FIFO.If the FIFO is filling too fast, try increasing both the size of the FIFO (configure it to be larger on the host side) and read more elements at a time.

Message 8 of 15
(2,592 Views)

The writing to DMA FIFO is being done by NI 9234 module with a sampling rate of 51200 samples per second. 

I both increased the size of FIFO and increased the number of elements to be read. 

But FIFO was getting full. 

My last idea was to increase the frequency of reading time-loop to 1MHz. 

 

0 Kudos
Message 9 of 15
(2,590 Views)

Where did you increase the size of the FIFO: in the FIFO properties, or on the host side using the Configure method? If only in the FIFO properties, try using the Configure method to increase the amount of space allocated on the host side.

Message 10 of 15
(2,587 Views)