LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging LabVIEW RT Application

Solved!
Go to solution

Hello All

 

I am using a cRIO 9053 to develop a simple application. This is wrapped into a higher level code. All of this works fine in development version.

 

I tried to create an .exe file and set it as startup application. I found that it doesn't run. I tried the remote debugging but it would not talk to the cRIO - so am assuming the state-machine is not running. 

 

I tried to get a error report and I am unable to decipher that. I am attaching it with this thread. Any thoughts on next steps?


Kudos are the best way to say thanks 🙂
0 Kudos
Message 1 of 8
(2,488 Views)

Some things to check:

  • Did you enable debugging in the build specification?
  • Are the IP settings permissive enough to allow you to connect to the running application (assuming it is running) - see the Properties for the Target, or use MAX
  • What is the stop condition for your application (and can it have been triggered very quickly?)
  • Does the cRIO provide any feedback (in particular, using the Status LED)?

As a further comment, I don't see an error in your log - it appears to be a long list of the installation configuration and some settings on the cRIO.

Startup applications and startup FPGA are not disabled, which is good.


GCentral
0 Kudos
Message 2 of 8
(2,479 Views)

I can confirm that debugging is enabled.

 

I can also confirm the application runs in development version and thats how I assume IP is OK. When my application runs, I can ping the localhost at a port and confirm its running. While I can do that in development version, as a startup app i am unable to do so.

 

I am basically running a server style code and Stop is usually triggered by a stop boolean button.

 

One thing I did notice was - When I build the application and set as startup and cRIO reboots, the status LED goes yellow for 2-3s after reboot and then turns off.


Kudos are the best way to say thanks 🙂
0 Kudos
Message 3 of 8
(2,475 Views)

@winterishere8 wrote:

I can confirm that debugging is enabled.

I am basically running a server style code and Stop is usually triggered by a stop boolean button.

Ok - that seems fine.

 


@winterishere8 wrote:

One thing I did notice was - When I build the application and set as startup and cRIO reboots, the status LED goes yellow for 2-3s after reboot and then turns off.


This is totally normal.

 


@winterishere8 wrote:

I can also confirm the application runs in development version and thats how I assume IP is OK. When my application runs, I can ping the localhost at a port and confirm its running. While I can do that in development version, as a startup app i am unable to do so.


I'm not certain this is conclusive, but perhaps it's irrelevant anyway, and it seems like it's better to search elsewhere rather than chasing this too much.

 

I'd try opening a text file when your application starts (before anything else runs) and then writing some message ("2020-02-27 12:05:41 - App Started," or whatever) and then if you have some error out indicator, try logging the contents of that too ("%<...>T - Error code was %d, source string was %s" or similar).

Make sure not to wire error to the Write to Text File node, or else an error will prevent the write!

 

This will allow you to open the filesystem with e.g. Internet Explorer, WebDAV, MAX, ftp client and then read some status information.

You can try adding more detailed logging to trace the problem if you find something suggestive of an issue.


GCentral
0 Kudos
Message 4 of 8
(2,469 Views)
I did try writing a simple text file before anything happens and I don't see the file being written. So, my suspicion is the app is not running even though I set it to run as startup?

Kudos are the best way to say thanks 🙂
0 Kudos
Message 5 of 8
(2,457 Views)

Quick check (probably a stupid check but never know...)

 

To build and run as startup, you did the following:

  • Have a LabVIEW project (lvproj) file with the target defined.
  • Put whatever code on the target
  • Define a build specification for an RT Application
  • Set all the options and the startup VI in the build specification (see image below for message in 2019 when you don't do this - you didn't see this)
  • Right click on Build Specification and choose Build
  • Right click after some compilation dialog and click Run as Startup (not Set as Startup)
  • Wait for a deploying window
  • Watch the cRIO restart, yellow status light for a couple of seconds, blah blah.

noStartup.png


GCentral
0 Kudos
Message 6 of 8
(2,451 Views)

Correct

 

I read another forum where it suggested removing typedefs while building. I did that, and I see RT System error log where it says RT process encountered an unexpected error and restarted automatically. Gives me a bit more ammunition ...

 

Attaching screenshot and log.

Capture.PNG


Kudos are the best way to say thanks 🙂
0 Kudos
Message 7 of 8
(2,446 Views)
Solution
Accepted by topic author winterishere8

So, I resolved the issue.

 

These are steps I followed

- I removed property nodes from my main application

- I put local loggers to read error nodes

- I had 3x .VIM VIs that needed to be converted to its local instance

 

In addition, I also disconnected the typedef in RT App builder. 

 

In retrospective, when a RT app breaks, the error logs are useless. It doesn't give much information at all and it was frustrating. Are there others who feel the same way or am i missing something?


Kudos are the best way to say thanks 🙂
0 Kudos
Message 8 of 8
(2,327 Views)