LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Real-Time Application doesn't run; source code works fine

Solved!
Go to solution

Well, the client shipped the cRIO to me and I started troubleshooting -- then everything fell apart. I have completely lost communication with the unit and rather than confuse this thread I started another one (http://forums.ni.com/t5/LabVIEW/Can-t-make-IP-connection-to-cRIO-anymore/td-p/3109407). Once that problem is resolved I'll come back here and we'll try working on this one.

 

Computers. Making our lives easier...

0 Kudos
Message 11 of 25
(3,331 Views)

So here's the latest.

Per my other thread, the reason the network port was so unstable was the the RIO was in an endless reboot loop. I haven't gotten a chance to look at that particular error because I've been dealing with two other bugs.

I went back through previous versions until I found one that didn't reboot the RIO and ran correctly rather than showing the broken arrow. I made some minor changes, and the problems immediately came back. I started brutally slashing away big chunks of code -- yeah I could have used the disable structure but sometimes you just need the visceral feel of a machete -- until it started working. Then I started putting stuff back.

First I got a version that was stable (no reboots) but showed the broken arrow. I disconnected the network variable typedefs, and it ran fine. So that is part of the solution but I don't want to mark this solved yet.

Bccause I found a new problem, a different reboot problem. I plugged in an external monitor so I can watch the cRIO. During the constant reboot mentioned above, it would boot up, run the rtexe, say there was an error, and then reboot. However now it boots up, says everything is fine, and then reboots anyhow without any error message.

That problem I finally tracked down to the Read/Write FPGA Control commands in the watchdog. This project is based on the NI sample project "LabVIEW FPGA Control on CompactRIO". The VI in question is "RT Loop - Watchdog.vi" which is unmodified from the example. If I disable the two Read/Write Control commands for Enable Watchdog and Pet Watchdog then everything is fine (except I lose my watchdog). However if I enable either, then I get the reboot cycle.

Note that other VIs, such as "RT Loop - System Health and FPGA Monitoring.vi", use Read/Write Control commands with no problem.

I'll work on it some more tomorrow but I've had enough for now.

0 Kudos
Message 12 of 25
(3,309 Views)
Solution
Accepted by topic author Andy_Humphrey

There ended up being three problems.

RT code works in the LabVIEW development environment but not when built and deployed to the cRIO. Fixed that by checking the box to disconnect typedefs when building the RT application. Thank you Sam & Michael.

cRIO boots up but then immediately reboots without an error. I'm a moron. I hacked out code as I mentioned above and then when I replaced it I did it wrong. I sent a timeout value of 40,000 ticks instead of 40,000,000 ticks to the watchdog. It didn't get petted fast enough and rebooted the system. Oops.

cRIO boots up but then immediately reboots WITH an error. This I believe was because I was trying to recycle bitfiles from old versions. I create a distribution version by copying the code to a subdirectory named by version number. If the FPGA VI has not changed from the last version, I'd copy over the bitfile from that version to save the 2-hour compile time. I fixed that by changing the Open FPGA command to point to the bitfile itself rather than the FPGA VI.

The code still has some bugs, but the key issue in this thread was figuring out why the RT wasn't running. I did that so I'll mark this as solved. Thanks for the help, everyone.

0 Kudos
Message 13 of 25
(3,279 Views)

I am using LabView 2014 SP1 developing cRio-9075. had the same issue and solved it using this mothod. 

 

 

0 Kudos
Message 14 of 25
(3,166 Views)

I have LV 2014sp1 and cRIO9067 but with check disconnect type def not solve.

The source run on labview, but the startup.exe not.

With a debug Application the exe has broken arrow and if i push on not error list appear, if i select view error list from labview menu the only error is RT-led.vi but this not the real error, because if i build only a vi with this is work fine.

I use a QMH architecture, with STM to connect to HOst, I tried to disable one module at time to limit the part of code that generate the trouble, i check the part, then i build only this part and it's builded without error and the exe execute fine. I rebuild the completely vi and the problem still remain.

 

Nicola
LabVIEW DeveloperByteLABS.
0 Kudos
Message 15 of 25
(2,816 Views)

ByteLABS,

 

Are you able to post your code?

 

Can you post the error that is thrown when trying to build the entire project?

 

Andrew B.
Application Engineer
National Instruments.
http://www.ni.com/support
0 Kudos
Message 16 of 25
(2,798 Views)

I need to share the project with all files, but the first issue i have is that the problems starts from MAX also.

With my laptop i can operate in MAX with all features, with the customer pc where the cRIO is installed other issue appear, until yesterday the source code work, but today not work and i try MAX to format the cRIO.....

I have this error each times i try to operate some functions (like format,or restart) from MAX and now from project.

operation timeout.PNG

 

 

Nicola
LabVIEW DeveloperByteLABS.
0 Kudos
Message 17 of 25
(2,779 Views)

I'm try to link with usb cable, but the same, the cRIO are showed on the list, i can chenge IP adress and so on but if i try to use function like format or restart i get timeout error.

Other strange, when i connect the usb cable the device monitor not recognize nothing ...No device.PNG

Nicola
LabVIEW DeveloperByteLABS.
0 Kudos
Message 18 of 25
(2,776 Views)

Is the cRIO still recognized on other computers, and it's just the customer PC that is having issues with the timeout, etc.

Andrew B.
Application Engineer
National Instruments.
http://www.ni.com/support
0 Kudos
Message 19 of 25
(2,765 Views)

With my computers this work. With my pc remain only the issue startup.exe that is compiled, with not error, but i have broken arrow.

 

Nicola
LabVIEW DeveloperByteLABS.
0 Kudos
Message 20 of 25
(2,733 Views)