PDA

View Full Version : ViewPort Problem



jazzed
07-01-2009, 09:41 PM
Hi. I have a licensed copy of ViewPort. I was able to connect to a PropPlug as COM8 ... exactly one time. I can't connect again. What's up?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve


Propalyzer: Propeller PC Logic Analyzer (http://www.brouhaha.com/~sdenson/Propalyzer)
http://forums.parallax.com/showthread.php?p=788230 (http://forums.parallax.com/showthread.php?p=788230)

Hanno
07-01-2009, 09:50 PM
Hi Steve,
Sorry that ViewPort is giving you problems- let's fix it! At the moment I don't have enough information to diagnose your problem- please help by trying some things and giving me more to go on:
- What's different now than when it was working before?
- Does the Propeller Tool connect without problems?
- Does the "Check Propeller Version" command work from within ViewPort
- Anything special about your system?
Hanno

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download (http://mydancebot.com) a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!

jazzed
07-01-2009, 09:52 PM
- What's different now than when it was working before?
Nothing
- Does the Propeller Tool connect without problems?
Yes
- Does the "Check Propeller Version" command work from within ViewPort
Yes
- Anything special about your system?
No. WinXP SP3 Single Core CPU

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve


Propalyzer: Propeller PC Logic Analyzer (http://www.brouhaha.com/~sdenson/Propalyzer)
http://forums.parallax.com/showthread.php?p=788230 (http://forums.parallax.com/showthread.php?p=788230)

Hanno
07-01-2009, 09:57 PM
Thanks for the quick answers...
Here more questions:
- Is the Propeller running at 80MHz?
- Does one of the "tutorials" that's shipped with ViewPort work?
- What worked? Did you connect to a "tutorial"? Or your own program? How did you know it was working?
- What baud rate are you using?
Hanno

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download (http://mydancebot.com) a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!

jazzed
07-01-2009, 09:57 PM
Ok, so you have to double-click on a file in the startup screen for this to work? What is a viewport header?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve


Propalyzer: Propeller PC Logic Analyzer (http://www.brouhaha.com/~sdenson/Propalyzer)
http://forums.parallax.com/showthread.php?p=788230 (http://forums.parallax.com/showthread.php?p=788230)

Hanno
07-01-2009, 10:02 PM
It's 3am here- so will have to head to bed soon...
Yes, to use ViewPort you need to load a spin program to the Propeller that uses the conduit. The conduit sets up the connection with the PC program and passes data back and forth. If you didn't load the Propeller with such a program, it won't connect. Try out the tutorials by following the directions onscreen- select a file, then click "run". Andy wrote up a nice PE LAB for ViewPort, there's a link on the bottom of the welcome screen. Also manual, help, videos.....
Hanno

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download (http://mydancebot.com) a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!

jazzed
07-01-2009, 10:03 PM
Ok, I got it. You can't just open a file from the File menu and make it work. Very odd.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve


Propalyzer: Propeller PC Logic Analyzer (http://www.brouhaha.com/~sdenson/Propalyzer)
http://forums.parallax.com/showthread.php?p=788230 (http://forums.parallax.com/showthread.php?p=788230)

Hanno
07-01-2009, 10:06 PM
Glad it's working for you. Opening a file just opens it into ViewPort. Just like the Propeller Tool. To debug it with ViewPort, it has to be loaded to the Propeller. Going to bed now, will look to see if I can make it more intuitive- thanks for bringing it up and answering so quickly.
Hanno

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download (http://mydancebot.com) a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!

jazzed
07-01-2009, 10:20 PM
Well, you should expect some error reports I guess.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve


Propalyzer: Propeller PC Logic Analyzer (http://www.brouhaha.com/~sdenson/Propalyzer)
http://forums.parallax.com/showthread.php?p=788230 (http://forums.parallax.com/showthread.php?p=788230)

WNed
07-02-2009, 12:45 AM
I alluded to this in the ViewPort and OpenCV thread... ViewPort is a complete enough environment that it really should be usable to manage a whole project. In other words, you might as well make it run plain vanilla apps, without analytical display so the user can open the project in ViewPort, load it to the Prop to see that it runs at all, then if desired / necessary, add in the ViewPort code required to perform analysis. Jumping back and forth between the Prop Tool and ViewPort is really quite tedious after a while.

I'll admit I haven't completed al the tutorials yet, but I tried retrofitting one of my simpler programs and am seeing "unexpected results". If I'm not mistaken, the following line should display the activity on pins 10, 11, 30, 31.

vp.config(string("var:io(bits=[cntr[10..11],30tx,31rx]),freq(unit=kHz,f=x/1000,min=1,max=10)"))

What I get, though, is a listing of every pin, which limits the display size of the ones I'm actually interested in. Any thoughts?
(I may have just had a "D'oh!" moment and realized what the issue is, but I'll let the question stand to see what else I might learn from the response.)

Ned

Added: Now I am well and truly confused... I went to see if I had recognized the error in my config line. I opened ViewPort and ran the program without making any changes. When I looked at the lsa view, and clicked on "parameter / Plot" just the 4 IO lines I had asked for were displayed, but with no data. I unchecked the option, so no data was displayed, then re-clicked it, and all the pins were displayed, but with data on the four I want... I have not been able to re-create the four line display.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"They may have computers, and other weapons of mass destruction." - Janet Reno

Post Edited (WNed) : 7/1/2009 6:03:35 PM GMT

Hanno
07-02-2009, 03:54 AM
Wned,
I'll answer here and copy into other thread as well...
You don't need to use the Propeller Tool- although for longer editing sessions I still use it because my editing control isn't as full featured yet (will change soon)
Compiling and loading files from ViewPort to the Propeller has been supported for a long time. Just select a file on the welcome view (you can browse to your own directory if you like or choose from one of the tutorials) and then click the "run" button. This will compile and load the file. If you want to edit your code, just click the "code" view to get a syntax highlighting editor that looks and feels almost like the Propeller Tool.

Which version of ViewPort are you using and what spin file? Latest is always here: mydancebot.com/viewport/beta.php (http://mydancebot.com/viewport/beta.php)Can you post so I can reproduce?
Hanno

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download (http://mydancebot.com) a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!

jazzed
07-02-2009, 08:49 AM
Hanno said...
Glad it's working for you. Opening a file just opens it into ViewPort. Just like the Propeller Tool. To debug it with ViewPort, it has to be loaded to the Propeller. Going to bed now, will look to see if I can make it more intuitive- thanks for bringing it up and answering so quickly.
Hanno


Well, it's not really working ... hope you got the crash dumps.

In the propeller tool, opening a file makes the file the active source to compile and load. ViewPort does not act the same way and that threw me.

Andy's tutorial is nice, but it is very lightweight in the Spin debugger area which is what I care about. Please expand on the usages of the conduit methods.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve


Propalyzer: Propeller PC Logic Analyzer (http://www.brouhaha.com/~sdenson/Propalyzer)
http://forums.parallax.com/showthread.php?p=788230 (http://forums.parallax.com/showthread.php?p=788230)

WNed
07-02-2009, 09:40 AM
Hi Hanno,
Here is the program I was playing around with. It's not a production sort of thing, I just wanted to see if PWM would look the way I imagined... it's pretty close. Of course my mind doesn't have to worry about triggering.
I've included the source code, which is Raymond Allen's Tone Gen with VP objects added, and also a screen print of the display I'm getting. I am running ViewPort v4.1.4, and it still has 17 days left. My OS is XP Pro w/ SP3.

The other point that I was trying to make is that you could, perhaps, make ViewPort a bit more promiscuous and allow it to load plain vanilla source files so that the VP objects can be added and removed from the source while in the VP editor. I start VP, load my source, add the VP objects and code, do my analysis, remove the VP code, save and go. Right now, my copy at least, refuses to load a source file without the VP objects already added and configured in the file. Viewport is, otherwise, a complete environment, why leave that extra step of opening the Prop Tool just to add the VP objects before actually going into ViewPort.

Ned

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"They may have computers, and other weapons of mass destruction." - Janet Reno

Hanno
07-03-2009, 02:58 PM
Hi Ned,
Nice program- you're really close.
Your spin programs configures the variables that ViewPort shares two times- in line 38 and 39. Each ViewPort parameter should only be configured once- I suggest you delete line 38 and use this for line 39:
vp.config(string("var:io(bits=cntr[10,11,30tx,31rx]),parameter"))
This tells ViewPort that you're sharing 2 channels- the io frame which the quicksample object uses to quickly sample the io port, and the parameter variable, which you use.
Good luck!

ViewPort is "promiscuous"- you can open any spin file from the file system in the built-in editor. You can also compile and load any file to the Propeller. Right now I've assumed that you would compile and load files that included the conduit so you could work with ViewPort- so once the file is loaded, it'll try to establish a viewport connection with the Propeller. If your program doesn't include the conduit, then ViewPort will complain at that stage- but your program will happily run... So, you are able to either start editing a new file from scratch, or open an existing spin file into which you can edit whatever you want.

Steve, thanks for the feedback and crash dumps- I'll make sure to add more documentation to the conduit methods.
Hanno

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download (http://mydancebot.com) a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!

WNed
07-03-2009, 10:31 PM
Hi Hanno,
Thanks for the timely reply.
Picking up a new tool, for me, always leaves open the potential of feeling like an idiot... I like "doing" more than I like reading about doing. Now that my curiosity about how PWM looks is satisfied, I can go through the tutorials properly, and perhaps read large segments of documentation before asking more "idiot" questions.
My other "idiot" point was due to my misunderstanding the situation; I thought that the error that popped up when trying to load a "non-ViewPort" program meant that the program had not loaded... never bothered to look in the code window to see... sometimes one feels like an idiot quite justifiably. http://forums.parallax.com/images/smilies/blush.gif

Thanks again for the help.
Ned

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"They may have computers, and other weapons of mass destruction." - Janet Reno