Vision Processing and Camera

Hi -

We are having a problem where the cRIO “crashes” or keeps losing comms from the laptop when we try to run the code for vision processing on the cRIO. We used the NI Vision Assistant to generate code which we put into Labview to run on the cRIO, and the actual NI Vision program works when the VI is ran locally on the computer. Is there something that we might have missed?

Thanks,
Jason Law

If you are using an 8-slot you may be using a function that isn’t in the vision library (the 8-slot has a reduced library). It is also possible you are using up all of the cRIO CPU. You can check this on the Charts tab of the Driver Station.

Beyond that what I would recommend is using the imaging tool to enable NetConsole and using that to see if there are any error messages being thrown to the console.

We are using a 4-slot cRio and will try debugging it using the Netconsole.

Thanks,
Jason Law

We imaged the cRIO with NetConsole, but when the cRIO crashes and reboots, it sends us this long error message:

*** BEGIN SYSTEM EXCEPTION LOG ***

Target type: cRIO-FRC II
Target code: 75C7

System time (UTC): 1970-01-01 00:01:53
System tick count: 114005 ms

Exception code: 0x00000300

Register contents:
DAR = 0x1364E936  DSISR = 0x40000000
MSR = 0x0000B012  FPCSR = 0xA2204000
 LR = 0x01DC284C    CTR = 0x00081508
 CR = 0x00000000    XER = 0x00000000

GPR  0 = 0x00000000    GPR  1 = 0x0299c710
GPR  2 = 0x00000000    GPR  3 = 0x1364e926
GPR  4 = 0x03EF0A4C    GPR  5 = 0x1860825e
GPR  6 = 0x00000000    GPR  7 = 0x0299ca88
GPR  8 = 0x00000002    GPR  9 = 0x00000000
GPR 10 = 0x400A0000    GPR 11 = 0x00000000
GPR 12 = 0x00000000    GPR 13 = 0x00000000
GPR 14 = 0x00000000    GPR 15 = 0x00000000
GPR 16 = 0x00000000    GPR 17 = 0x00000000
GPR 18 = 0x00000000    GPR 19 = 0x00000000
GPR 20 = 0x00000000    GPR 21 = 0x00000000
GPR 22 = 0x00000000    GPR 23 = 0x00000000
GPR 24 = 0x00000000    GPR 25 = 0x00000002
GPR 26 = 0x00000000    GPR 27 = 0x02440000
GPR 28 = 0x03EF0A4C    GPR 29 = 0x02444a38
GPR 30 = 0x02440000    GPR 31 = 0x1364e926
 PC = 0x0206908c in module lvrt.out

Thread ID: 0x0299CA88   Thread name: LabVIEW Execution System 2 Thre
Thread stack base: 0x0299CA88  stack size: 131072

Call Stack:
0x1fff698+0x754: ThSleep () in module lvrt.out
0x206a864+0x1120: OnOccurrenceAndOccurAtTimeForExec () in module lvrt.out
0x2069a78+0x334: OnOccurrenceAndOccurAtTimeForExec () in module lvrt.out
0x1a04a60+0xd344: _dtors () in module lvrt.out
0x1a04ba0+0xd484: _dtors () in module lvrt.out
0x1dc276c+0x4: ExtFuncWrapper () in module lvrt.out
0x2068fe8+0xbc8: GetCurrentExecutingVIPath () in module lvrt.out

All Loaded Modules:
	MODULE NAME     MODULE ID  TEXT START DATA START  BSS START
	--------------- ---------- ---------- ---------- ----------
	  niDiscExp.out 0x02c2a5f0 0x02d7a7d0 0x02dceb48 0x02dd2b08
	niSysNetCfg.out 0x02c28ea0 0x02cbd670 0x02cf2f20 0x02cf5368
	    NiViRpc.out 0x029b2648 0x02c899e8 0x02cbc258 0x02cbd2d0
	    NiViRio.out 0x0286b0e0 0x02b87a88 0x02b93308 0x02b95d60
	   NiViAsrl.out 0x0286a890 0x0299cd28 0x029b18c8 0x029b1e88
	    NiViSys.out 0x02872a28 0x02c2cad0 0x02c63648 0x02c65818
	   niriosae.out 0x00d9a788 0x02bafd78 0x02bd86a8 0x02bda678
	   wif_core.out 0x02698ec0 0x02843248 0x02866c00 0x02869c88
	  rtexecsvc.out 0x0269a808 0x02873718 0x02894b10 0x02896830
	nisysapisvc.out 0x012e7c40 0x02b43c30 0x02b6e5f8 0x02b712d8
	sysadminsvc.out 0x0269bcf0 0x02b022d0 0x02b40cb8 0x02b43a68
	  niauthsvc.out 0x00ef00b0 0x028a7ac0 0x028de088 0x028e1bd0
	FilesystemWebService.out 0x00d5ad90 0x00eb0fa0 0x00ee9b10 0x00eed4b0
	FRC_NetworkCommunication.out 0x0269e0f8 0x02962610 0x0297c2c0 0x0297c3b0
	   FRC_FPGA.out 0x013aaea0 0x028f28b8 0x029622b0 0x02962448
	   NiFpgaLv.out 0x013acdc8 0x0138d678 0x01390510 0x01390558
	     NiFpga.out 0x01392de8 0x02623178 0x0265d380 0x0265d858
	svclocmodule.out 0x014a6e80 0x014a8088 0x014bc518 0x014be038
	libcopyModule.out 0x014a54b0 0x014a5db8 0x014a6cb8 0x014a6d18
	 ws_runtime.out 0x01383e00 0x029c3ba0 0x02af1180 0x02afbca8
	libespM

I don’t really know what any of these actually means. Is there something else that we should try?

Thanks,
Jason Law

Here’s a picture of our Labview code. Is there something that we did wrong?

https://docs.google.com/file/d/0BxDNYNPyUql6TU9qdmJDSktSeEdVT2VjRllhVnNlUQ/edit?pli=1

Thanks,
Jason Law

What is the IVA icon at the far right of the picture doing? My guess is that you are using some uncommon vision functions and have found a but, possibly due to odd parameters being passed in. If you send in your entire project, we can look at it more closely. Send it to the NI forum.

Greg McKaskle

We had a problem like that for a while when we started vision processing. Look for memory leaks, undeleted pointers to images, etc. some of the different ways of image acquisition don’t overwrite the old image but put a new one in memory. Try a loop counter to see how many times it runs. if it runs 20-30 loops and then stops, that’s most likely your problem.

Can you post your code that handles images?

It never even get through the first loop (returned 0 loops)

Here is the vision processing VI:http://dl.dropbox.com/u/58862361/VisionWithParticleFilterting.vi

And here is how it is used: http://dl.dropbox.com/u/58862361/Vision%20Processing.vi

Jason Law