Just a heads up that wasted a bit of my time…
It seems our new CRIO (4 slot) can print to the Net Console using cout without a namespace qualifier:
cout << “In autonomous mode”;
Works fine. The exact same code on our old CRIO (8 slot) does not print to the screen. But printf works fine. Both have been 2012 re-imaged.
Not a big deal, but does anyone know why? Is there a magic namespace qualifier I can stick in front of cout to make it work for both?
netconsole::cout << “yada yada”;
cerr (not cout) worked on the 8 slot one, try it on the 4 slot one, or redirect cout to cerr
We have an 8-slot unit, and we get all the vxWorks startup output on NetConsole, but nothing from either a printf or cout. Tried the cerr suggestion as well, but nada!
We’re trying to embed a simple text message (like printf("I’m Alive!
"); )in the teleop section of the Simple Robot Template as a test case. Tried adding an Include# “stdio.h”, but that didn’t help either. No errors show up in the Build.
Anyone have an idea what I’m doing wrong?
Thanks,
Steve
Bryscus
January 21, 2012, 10:35pm
4
emusteve:
We have an 8-slot unit, and we get all the vxWorks startup output on NetConsole, but nothing from either a printf or cout. Tried the cerr suggestion as well, but nada!
We’re trying to embed a simple text message (like printf("I’m Alive!
"); )in the teleop section of the Simple Robot Template as a test case. Tried adding an Include# “stdio.h”, but that didn’t help either. No errors show up in the Build.
Anyone have an idea what I’m doing wrong?
Thanks,
Steve
You may need to check the box when you flash the cRIO with the imaging tool. It has to be enabled and is not by default.
We did that (checked the NetConsole box when imaging), and it does give us all the vxWorks system messages, just nothing from our code.
Too much broken…switching to Java for this season.