| REVIEW: ViewPort |
| All News -> Reviews |
| Written by Nicholas McClanahan |
| Sunday, 29 August 2010 14:18 |
Easier debugging on the Propeller?
What is ViewPort?ViewPort is a software tool to help you develop on the Prop. There are 2 core features;
It also includes a few additional objects that expand the functionality of ViewPort;
Most users probably won't use the Fuzzy Logic or OpenCV objects, although they're nice to have. The QuickSample object is very high resolution, but it was higher resolution then I need. I usually use the Propeller Serial Terminal to spy in variable values, so I don't need it when using ViewPort, anyway.
How do you use it?You'll need to modify your code slightly to take advantage of ViewPort.
Here's my hardware test rig;
Download ViewPort here, you can grab a 30-day trial & install it. A few demo programs are already built in, but to use your own programs, you'll need to add a few lines of code;
vp : "Conduit" is the object that communicates with ViewPort, Tracking & Updating VariablesBe sure to save your program in My Documents/Viewport, because that's where the Conduit object is located. Open up your test program in ViewPort, connect your Propeller to your PC and turn it on. Hit 'Load' on ViewPort and the program will compile and load into the Prop. Now, switch between the top tabs (dso, lsa, all, analog, fuzzy, mixed) to see the shared variables changing values;
Further, you can change the value of each variable by clicking the edit button to the right of the variable name. The value will change in real-time, without needing to restart the program. Each tab gives you a different view on the variables you're passing to ViewPort — some tabs are designed to look like Oscilloscopes (DSO), and another is designed to look like a logic analyzer, but they're both just showing the value a of a variable in Propeller memory. You can design your own tabs, too — it can have inputs to change the value of variables and can display variables in different ways. DebuggingThe 2nd tab on ViewPort is 'code'. This is an integrated lightweight code editor & full-featured debugger. To begin debugging, open your code in ViewPort, hit 'Load' and switch to the 'code' tab. Then hit 'start debugging';
The top right code box shows your code, the bottom right box is the 'command' box, where you can tell the debugger to step through the code, pause execution, update a variable value, and otherwise control debugging. The left-hand boxes tell you how long each PUB or PRI block take to execute (profiler), update the value of variables (watch), and show the state of the Propeller's I/O pins. Connecting The Prop to your PCViewPort lets you update & monitor values from your PC, so why just use it for development? Dashboards can be built inside of ViewPort for interacting with your Propeller programs — a sample using the existing widgets (the DSO) is in the tutorials folder;
Custom visualizations can also be created. Additionally, Hanno has released the ViewPort Client kit, which enables Dynamic Data Exchange (DDE). DDE is used to share information between Windows applications. Hanno has provided DDE samples for Excel, dot net, Python, and C Sharp. DDE is pretty widely supported, here's the DDE example running in Excel; How Much Does It Cost?ViewPort is commercial software. A 30 day free trial is available, but to continue using it, you'll have to pay. The basic version is $29, the standard version is $60, and the ultimate version (which includes the capability to make your own custom visualizations and the OpenCV Objects) is $150. Unless you know which visualizations you're going to create, I think most people are better off with the $60 version because it includes the Spin debugger. Complaints Nice Stuff VERDICT Comments (0)
![]() |

Easier debugging on the Propeller?




