Created Mon, 20 Jun 2011 13:20:47 +0000 by doumdi
Mon, 20 Jun 2011 13:20:47 +0000
Hello Everybody,
I have made available the Arduino support for the NetworkViewer interface I am working on for the OpenECoSys (Open Embedded Computing Systems) project:
[url]http://www.openecosys.org[/url]
This is work in progress, but you can already use it for visualization of internal variables in real-time. This can be useful for viewing ADC values in real-time like a simple oscilloscope for instance. I have made a little tutorial on how to use the system at :
[url]http://sourceforge.net/apps/mediawiki/openecosys/index.php?title=Use_NETV_with_Arduino[/url]
I have tested it on Arduino UNO and it works perfectly for me. It should also work pretty well on ChipKit derivatives. I have tested it on my PIC32Dev module available here :
[url]http://sourceforge.net/apps/mediawiki/openecosys/index.php?title=PIC32Dev[/url]
The idea behind NetworkViewer is that we need to be able to monitor the internal states of micro-controllers while they are running to avoid breaking their real-time constraints. My goal is to provide an easy-to-use interface that is cross-platform and versatile. Supporting multiple communication hardware from the same interface is also required. Right now, NetworkViewer supports Ethernet, CAN and serial. They are available as dynamic (loaded at run time) drivers. Over time, other plugins will be created to support other communication devices and visualization / interactive interfaces. My short term goal is to support multiple communication protocols at once to display an unified view of the heterogenous network through the NetworkViewer interface. Scripting and logging is also available as software plugins. More information about NetworkViewer can be found here :
[url]http://sourceforge.net/apps/mediawiki/openecosys/index.php?title=NetworkViewer[/url]
All comments and suggestions are welcomed.
Regards,
Tue, 21 Jun 2011 14:40:59 +0000
Very good :D
Less than 20 minutes after I received my first Arduino compatible board (chipKIT Max32) I was able to monitor my variables on my computer thanks to your NetworkViewer (see attachment where var1 is playing a sinus).
2 minutes later I was able to turn on and off the led by writing a value in one of the variables directly from the software.
Thank you, it's very easy to use and it fills my head with ideas for my next projects.
Tue, 28 Jun 2011 23:12:33 +0000
I'm really interested in this project. I've downloaded the Network Viewer and the sketch on my Uno 32. It compiled well, everything looked ok.
When I start the viewer I just don't see any available board on your upright corner as you have, I have only the terminal messages on the up left. What could be wrong?
Thanks.
Thu, 30 Jun 2011 15:08:57 +0000
I'm really interested in this project. I've downloaded the Network Viewer and the sketch on my Uno 32. It compiled well, everything looked ok. When I start the viewer I just don't see any available board on your upright corner as you have, I have only the terminal messages on the up left. What could be wrong? Thanks.
Have you selected the right serial port with baudrate = 115200? You need to use the SerialEmulator driver. Also, are you using the Windows or Mac version?
Tell me if you are successful with this.
Fri, 01 Jul 2011 01:51:40 +0000
Exactly, I've used SerialEmulator, I'm using Windows version in my case \.\COM22;115200 and when I push on the Configure button it reports:
Then I've chosen again 115200.
Nothing, the same thing as I described previously...
Mon, 04 Jul 2011 02:02:04 +0000
It finally worked but on wine in my Ubuntu computer. Under Windows XP I can't see de boards connected. It works as well with my Max32 as with my Uno32.
Thanks.
Finalement ça a marché mais sous wine dans mon Ubuntu. Sous Windows XP je n'arrive pas à voir les modules connectés. Cela a marché aussi bien avec mon Max32 qu'avec le Uno32.
Merci.
Tue, 05 Jul 2011 13:46:28 +0000
It finally worked but on wine in my Ubuntu computer. Under Windows XP I can't see de boards connected. It works as well with my Max32 as with my Uno32. Thanks. Finalement ça a marché mais sous wine dans mon Ubuntu. Sous Windows XP je n'arrive pas à voir les modules connectés. Cela a marché aussi bien avec mon Max32 qu'avec le Uno32. Merci.
I am glad it worked with wine. However, it seems rather strange that it doesn't work under the native Windows XP. We had no problem under Windows 7. I will make some tests with Windows XP and come back to you. Also, I would like to know if you were successul with the software for your application.
Regards,
Fri, 08 Jul 2011 20:26:30 +0000
Very good :D Less than 20 minutes after I received my first Arduino compatible board (chipKIT Max32) I was able to monitor my variables on my computer thanks to your NetworkViewer (see attachment where var1 is playing a sinus). 2 minutes later I was able to turn on and off the led by writing a value in one of the variables directly from the software. Thank you, it's very easy to use and it fills my head with ideas for my next projects.
Could you post the code you used for the chipKit Max 32? I tried to duplicate your effort and am meeting with resistance! Also how did you modify the configuration .xml file for the Module 1 display? I looked for a blank templet and also did not find a way to modify an existing config file by deleting variable entries....
I did finally modify a config file using Wordpad , but that seemed clunky to me....
David G.
Sat, 09 Jul 2011 18:45:16 +0000
Could you post the code you used for the chipKit Max 32? I tried to duplicate your effort and am meeting with resistance! Also how did you modify the configuration .xml file for the Module 1 display? I looked for a blank templet and also did not find a way to modify an existing config file by deleting variable entries.... I did finally modify a config file using Wordpad , but that seemed clunky to me.... David G.
Finally got it (sin wave plot) to work!! famous "finger problems" coupled with "brain Jel" ..
I am looking forward to the additons to the Network viewer. I find it useful in one project i am working on. It will allow me to fine tune some variables without having to modify the code and wait for the download to see the results!
Thanks for your efforts!
David Garrison
Sat, 09 Jul 2011 22:29:25 +0000
Could you post the code you used for the chipKit Max 32? I tried to duplicate your effort and am meeting with resistance! Also how did you modify the configuration .xml file for the Module 1 display? I looked for a blank templet and also did not find a way to modify an existing config file by deleting variable entries.... I did finally modify a config file using Wordpad , but that seemed clunky to me.... David G.
David,
There is a XML installed with NetworkViewer in the config directory that matches the projectID of the Arduino project :
When a module answers the "ALIVE" request made on the serial port from NetworkViewer, it returns the projectID associated with it and other information. If one XML file in the "config" directory matches the projectID, it is automatiacally loaded.
In the demonstration, you can see that the "NETVArduino_Analog.xml" file contains : projectID="50". Other fields are not tested when loading the profile.
If you look a the Arduino code :
You can see that we initialize the module like this :
netvArduino.setup(
50, //Project ID
1, //Module ID
1, //The Code Version
115200, //The baud rate
variables.NETV_SHARED_MEMORY_TABLE, //The shared memory
sizeof(NETVSharedVariables)); //The size of the memory mapped
For a custom project, create a new XML file with a different ProjectID and it will automatically be loaded when the module is discovered. You can also create a configuration by double clicking at the module and add variables as you wish for a new project.
Have you been able to run the NETVArduino_Analog.pde example?
Thanks for your interest in NetworkViewer.
Sun, 10 Jul 2011 13:34:52 +0000
David, There is a XML installed with NetworkViewer in the config directory that matches the projectID of the Arduino project : http://sourceforge.net/apps/trac/openecosys/browser/trunk/NetworkViewer/config/NETVArduino_Analog.xml When a module answers the "ALIVE" request made on the serial port from NetworkViewer, it returns the projectID associated with it and other information. If one XML file in the "config" directory matches the projectID, it is automatiacally loaded. In the demonstration, you can see that the "NETVArduino_Analog.xml" file contains : projectID="50". Other fields are not tested when loading the profile. If you look a the Arduino code : http://sourceforge.net/apps/trac/openecosys/browser/trunk/NETVProtocolStack/NETVArduino/examples/NETVArduino_Analog/NETVArduino_Analog.pde You can see that we initialize the module like this :
netvArduino.setup(
50, //Project ID
1, //Module ID
1, //The Code Version
115200, //The baud rate
variables.NETV_SHARED_MEMORY_TABLE, //The shared memory
sizeof(NETVSharedVariables)); //The size of the memory mapped
For a custom project, create a new XML file with a different ProjectID and it will automatically be loaded when the module is discovered. You can also create a configuration by double clicking at the module and add variables as you wish for a new project. Have you been able to run the NETVArduino_Analog.pde example? Thanks for your interest in NetworkViewer.
Yes I was able to run it, I did have to change the memory offsets to accomodate the 32 bit size of the Uno32..it took awhile to puzzle out what the "memory offset" parameter was for. In my innocence I supposes that the Variable names were used to identify the location in the memory array ..but then I puzzed out that it was a matter of location in array memory that was used....no matter, every problem is a learning experience! Here is a screen shot of a project with three varaibles being monitored (and loadable!). [img][attachment=0]NETVUNO32_sin.png[/attachment][/img]
That messy display is of a sin plot that is running very fast and the asyncronus sampling of Network viewer produces what looks like garbage. I get a very nice sin wave plotted out when I slow down the sin generating software. Plotting of variables is a nice feature, but the main attraction is the ability to modify variables on the 'fly"
Thanks for the tips!
Best to all on this project
David Garrison
Mon, 11 Jul 2011 01:00:24 +0000
David,
You can also change the "Scheduler Variable Request Interval" if you go in the "File/Preferences/NetworkSheduler" menu. The default is 10ms, but you can go as fast as 1ms with a 115200 baud connection.
What you are experiencing with the high frequency sinus is aliasing. By default, sampling rate should be always 2X the maximum frequency of the signal.
Good luck with your projects.
Dominic
Mon, 11 Jul 2011 17:53:53 +0000
Hello Everyone,
I have posted a new version of NetworkViewer that adds a delay between the time the serial port is opened and the first communication occurs.
[url]http://sourceforge.net/projects/openecosys/files/NetworkViewer/Pre-Release/[/url]
This fixes the communication problem with the chipKit modules that were entering the bootloader after opening the serial port and stayed in the bootloader looping forever. We have to wait for a minimum of 4 seconds before communicating with the chipKit to make sure we have exited the bootloader.
Tell me if it works for you!
Tue, 12 Jul 2011 01:15:14 +0000
Hello Everyone, I have posted a new version of NetworkViewer that adds a delay between the time the serial port is opened and the first communication occurs. [url]http://sourceforge.net/projects/openecosys/files/NetworkViewer/Pre-Release/[/url] This fixes the communication problem with the chipKit modules that were entering the bootloader after opening the serial port and stayed in the bootloader looping forever. We have to wait for a minimum of 4 seconds before communicating with the chipKit to make sure we have exited the bootloader. Tell me if it works for you!
I saw the problem, with my UNO32, and did not know what caused it. I just softly cursed and reloaded my code into the the UNO32 and restarted NetworkViewerand got on with it.... I just downloaded the new release and poof the problem went away...good work!
David Garrison
Tue, 12 Jul 2011 02:26:14 +0000
Thanks for the feedback David.
I just set up a forum for the project :
[url]https://sourceforge.net/apps/phpbb/openecosys/index.php[/url]
Please feel free to post your questions, comments or suggestions.
Regards,
Tue, 12 Jul 2011 13:47:25 +0000
Hello Everyone, I have posted a new version of NetworkViewer that adds a delay between the time the serial port is opened and the first communication occurs. [can't post url] This fixes the communication problem with the chipKit modules that were entering the bootloader after opening the serial port and stayed in the bootloader looping forever. We have to wait for a minimum of 4 seconds before communicating with the chipKit to make sure we have exited the bootloader. Tell me if it works for you!
Hello doumdi.
I just tested the new version "1.1.14alpha" and it works fine on Windows 7 (32-bit) and also on Windows XP. The software waits for 5 seconds before start to communicate with the board (chipKIT Max32) and it works now even after unplugging and replugging the usb cable.
So, problem solved, good job ;)
Mon, 18 Jul 2011 20:12:49 +0000
The next version of OpenECoSys-NetworkViewer (1.1.15) will support multiple interfaces at once. Here is a quick preview of how it works :
[url]http://sourceforge.net/apps/mediawiki/openecosys/index.php?title=NetworkViewer-Preview[/url]
Any suggestions / comments ?