The right tools help see what is wrong...
Chris_D
Posts: 305
Hi Guys,
While most of my posts are requesting help, I offering some general help this time.
I have been working lile crazy to finish up a CNC controller·I am making with 2 propellers and 2 other micros for the·contest at the end of the year.· Being a newbie to electonics and·also propellers, this has proven to be a big challenge for me.· Programming isn't too·bad as I have been·programming PCs for many years.·
Anyway, working with micros is problematic when trying to see what is happening.·As I am building a motion controller,·the obvious feedback is watching the machine move.· However, seeing very slight differences between·each of the axes during interpolated moves is next to·impossible.· So, I needed something·so that I·could see what is happening in the software - what the variables are currently set to etc..
Viewport (Can be purchased here at Parallax) is an outstanding tool to help with·programming/debugging propeller code - certainly money well spent.··While it is probably possible to get viewport to do much more than what I am doing with it so far, I also wanted to see port states·so that I could analyze them.·
So I also picked up an econimical logic analyzer.· This is like·a digitial storage scope that records a period of time showing the states of various pins·(up to 16 on my model).The one I puchases is the
Zeroplus model LAP-C1632 from microcontrollershop.com
This morning I ran some test files through my CNC control and was shown very clearly what I needed to see but couldn't with what i had available to me.· After seeing the timing of the outputs I now know I have rewrite my PASM code section to tighten up the timing between all the axes of motion.·
Anyway, the whole point of this discussion is that there are some very good and economical tools available that can help to provide you with useful information.· So, instead of pulling your hair out for weeks on end, save up a few bucks and pick·up these (or similar) tools. I am sure you experienced guys will read this and say "well duh", but for me these are some great revelations :-)
Chris
·
While most of my posts are requesting help, I offering some general help this time.
I have been working lile crazy to finish up a CNC controller·I am making with 2 propellers and 2 other micros for the·contest at the end of the year.· Being a newbie to electonics and·also propellers, this has proven to be a big challenge for me.· Programming isn't too·bad as I have been·programming PCs for many years.·
Anyway, working with micros is problematic when trying to see what is happening.·As I am building a motion controller,·the obvious feedback is watching the machine move.· However, seeing very slight differences between·each of the axes during interpolated moves is next to·impossible.· So, I needed something·so that I·could see what is happening in the software - what the variables are currently set to etc..
Viewport (Can be purchased here at Parallax) is an outstanding tool to help with·programming/debugging propeller code - certainly money well spent.··While it is probably possible to get viewport to do much more than what I am doing with it so far, I also wanted to see port states·so that I could analyze them.·
So I also picked up an econimical logic analyzer.· This is like·a digitial storage scope that records a period of time showing the states of various pins·(up to 16 on my model).The one I puchases is the
Zeroplus model LAP-C1632 from microcontrollershop.com
This morning I ran some test files through my CNC control and was shown very clearly what I needed to see but couldn't with what i had available to me.· After seeing the timing of the outputs I now know I have rewrite my PASM code section to tighten up the timing between all the axes of motion.·
Anyway, the whole point of this discussion is that there are some very good and economical tools available that can help to provide you with useful information.· So, instead of pulling your hair out for weeks on end, save up a few bucks and pick·up these (or similar) tools. I am sure you experienced guys will read this and say "well duh", but for me these are some great revelations :-)
Chris
·
Comments
For those on a budget there is alway the Propalyzer. It will sample 30 bits (I think) at 2Hz to 80MHz with I don't know what buffer size. For the price of a Propeller chip.
http://forums.parallax.com/showthread.php?p=788230
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Try out tutorial #1, read the manual about "quicksample", work through Andy Lindsay's excellent PE Kit, watch videos on my site, or just ask me...
Hanno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download 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!
Thanks for the plug heater. Propalyzer snaps 32 bits during capture, but having anything running on bit 30/31 will very likely interfere with operation. Only 470 or so longs are captured at once which is a limit imposed by the COG and capture code. The maximum capture frequency is whatever the capture propeller is running. I recently added a requested feature to display the times according to the frequency specified by the user ... so, "if by some miracle" your propeller is running at 1GHz, you will be able to see 1ns resolution on the display.
I've given up on a non windows .net version of the program though and plan to port it to Java for cross platform deployment since that is the path of least development resistance.
Edit to add:
I also just ordered this the other day:
www.circuitspecialists.com/prod.itml/icOid/10094
I was trying to wait on the prop-scope but decided in the end I would appreciate not being tied to the PC for measurements and it seems to allow you to attach to the PC if you like. We'll see if it turns out to be a dud or not.
Post Edited (photomankc) : 10/6/2009 3:13:06 PM GMT
In the Logic Analyzer mode one must be aware that the actual trigger point is not a zero time but 100 or more nanoseconds to the left of zero. If this is no problem for the user, great. One fine tool and no additional equipment required.
Many thanks to Hanno for providing this tool.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko