Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to show and use graphs (Read 9818 times)
RoboBill
Junior Member
**
Offline


Posts: 32
Location: Northern California
Joined: Apr 14th, 2013
How to show and use graphs
May 11th, 2013 at 11:16pm
Print Post  
I am a real beginner and am trying this VM debugger. 

So far, so good. I've got 6.1 installed with Intellisense working. It compiles everything fine (I think) ... But I'm stuck trying to figure out how to bring up and use those VM graphs...  for instance...I was hoping to "monitor" a couple of encoders.

Can someone please point me in the right directions?

Thanks

RoboBill

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to show and use graphs
Reply #1 - May 11th, 2013 at 11:25pm
Print Post  
Hi Bill,

If the encoders are on analog pins then you will find it easy, if not then you have a learning curve because how to create your own graphs is not documented yet.

First off we need to get you working with the debugger. Can you please follow the rather boring youtube video linked on the debugger page of the visualmicro.com website.

Once you have switched on the debug, have added a debug trace point and seen that work you can set the project property "Report Analogs=True" (the property is in the "Micro Debug Reporting" property category)

Best of luck, let us know if a problem or if you need something other than analogs (no promises on a quick response for that although if I recall there might be an example we can use somewhere)

If your motors usng pwm then let me know, I have been meaning to do a pwm graph

Atmel Studio (patch required)

Please also see the note on this page (known issues and workarounds) about the patch for Atmel Studio which allows the project debug properties ALT+ENTER to be viewed
« Last Edit: May 11th, 2013 at 11:55pm by Tim@Visual Micro »  
Back to top
IP Logged
 
RoboBill
Junior Member
**
Offline


Posts: 32
Location: Northern California
Joined: Apr 14th, 2013
Re: How to show and use graphs
Reply #2 - May 12th, 2013 at 2:33am
Print Post  
Thanks Tim for the quick response. I will follow your directions and see where it takes me. 

BTW the Parallax quadrature encoders are attached to the Uno digital inputs. My motors run off of pins 9 & 10 to a Sabertooth 60amp motor driver in RC indivitual mode... (then I can quickly switch over to my Spektrum RC so I can manual drive this heavy robot back to my shop if the Arduino program runs amuk.  Grin...    I use the Dimension Engineering - Arduino library to program the motors.

Bill
« Last Edit: May 12th, 2013 at 2:37am by RoboBill »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to show and use graphs
Reply #3 - May 14th, 2013 at 5:42pm
Print Post  
Hi,

Sorry for the delay in responding I missed your update.

Are you using pwm on those digital pins?

Currently the only std graphical views available to you are

1) Digital Pin Report (Detects 0/1 via digitalRead() shows a red/green square per pin)

2) Notice in some of the examples on the debug pages there are three vertical dial controls. These controls are a single open source example that allow values to be passed that are reflected onto the dials. I think I could dig out some info about using these if they would serve a purpose.

I plan to, with the help of the community, to gather whole bunch of useful controls that can be installed with the product. The entire debugger graphics system is open source and easy to extend with new controls, just haven't had time to document it or make any nice controls.

Vertical dials example

  
Back to top
IP Logged
 
RoboBill
Junior Member
**
Offline


Posts: 32
Location: Northern California
Joined: Apr 14th, 2013
Re: How to show and use graphs
Reply #4 - May 14th, 2013 at 6:42pm
Print Post  
Hi Tim

I'm really not sure what kind of signal is driving the Sabertooth. I'll throw my scope on later tonight to see.
 
But I did want you to know that I now have those graphs showing up. Not real sure yet what I'm really seeing (partially cuz I'm red-green colorblind) but its a bonus on top of the trace point read outs. 

One possible use for your graphs and dials might be where the programmer could compare sensor inputs and constants to outputs... particularly if the programmer was thinking about delving into PID. (Yea I'm a real beginner but I love to dive head first).

Bill
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to show and use graphs
Reply #5 - May 14th, 2013 at 7:06pm
Print Post  
It's all good stuff, I look forward to seeing what you uncover and will think about some better representations that colors Smiley
  
Back to top
IP Logged
 
RoboBill
Junior Member
**
Offline


Posts: 32
Location: Northern California
Joined: Apr 14th, 2013
Re: How to show and use graphs
Reply #6 - May 14th, 2013 at 8:21pm
Print Post  
I checked with my scope to confirm the Sabertooth docs... pasted here..
from their website: http://www.dimensionengineering.com/products/sabertooth2x60

Microcontroller pulses, independent
linear control: An R/C servo signal is
connected to terminals S1 and S2. A
1000us – 2000us pulse controls speed
and direction. 1500us is stop.

And don't worry about the colors... I can always get help from others.

Bill
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to show and use graphs
Reply #7 - May 14th, 2013 at 8:29pm
Print Post  
Okay that is pwm, the digital pin viewer will not be of any use to you. This is also how most servos work.

What you will need is to know is which variables from the library you are using contain the current values for the pins. When I get time I will try to add some useful bits but the arduino code isn't my strongest area. 

Hopefully others will join in and help


  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint