02-08-2016 01:53 PM
I am using a myRIO and Kinect for Xbox 360 (model 1414) (https://decibel.ni.com/content/docs/DOC-34889) for a project and I am able to run the code perfectly in interactive mode.
Then I want to run it independently from the PC, so I create the RT application, including the startup VI and all the needed subVIs.
I choose "Run as startup" and the myRIO reboots. After reboot, it works great, but the moment I unplug the USB cable from the PC, it crashes.
I hard-reset the myRIO and it seems that the application wants to run again, but it keeps crashing.
Does anybody know how the USB connection between my PC and the myRIO could be affecting the functionality of the application?
Any help would be much appreciated!
Thanks
02-08-2016 09:31 PM
I would first check to see if the application is actually crashing or just getting into an error state in your main application loop. One of the easiest ways to do this is to just have a seperate loop that just toggles the LED on and off every second. If the LED keeps toggling on and off when you unplug the device then you know your LabVIEW application is still running. If the LED suddenly stops then it is possible that the system is indeed crashing. If it is, you will be able to get more information from the error log. This isn't always the case because an error may cause you to manually stop the entire application downstream but it's a good start.
http://digital.ni.com/public.nsf/allkb/E734886E027D0B6586256F2400761E30
It's obviously hard to troubleshoot a problem that only happens when you disconnect from the computer but one good way is to add functionality which logs the current time and state you are in as well as any errors that come up to a local text file. This means that when you reconnect your device you can ftp that log to your computer to see what your application what doing and what state it was in right before it stopped.
I have not seen your application but the most likely cause of this is that some part of your program requires some sort of connection to the host PC (SV or Network Stream) and when you disconnect from your PC you lose that connection which causes an unhandled error in your application.
02-09-2016 02:59 PM
First of all, thank you for your reply.
The recommendations you gave me led me to solvie the problem. Now I can unplug the USB cable and the application works fine.
I don't use SVs or Network Streams. I have a strong feeling that the FPGA-related code on the RT Host was causing some error that was stopping the program. I would bet that it was because I was using a myRIO VI Express (e.g. LED, Button,...that opens an FPGA reference to a Custom FPGA Personality VI??) at the same time than my own FPGA VI...and I can't open more than one reference to different FPGA VIs on the same target at the same time, can I? Does this mean that I can't use the myRIO palette VIs and my own developed FPGA VI at the same time? That would be a little limted, for example if I want to add the LED functionality you suggested to check if the application is crashing.
However, it is yet unclear to me how this can be related to the USB connnection to the PC.
Thank you very much for your help.
Seitseman