How to use the scope?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
MJU
Posts: 502
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 121 times
Been thanked: 108 times
Contact:

How to use the scope?

Post by MJU »

I made a simple Flowchart where a potentiometer is read by the ADC and the value is shown on an LCD.
I opened the scope window and want to show the reading from the LCD on the scope...
But where do I begin?

In the scope window there are no setting, no connections shown?
What am I doing wrong? :D
Attachments
scope.jpg
(181.74 KiB) Downloaded 4208 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: How to use the scope?

Post by medelec35 »

Hi MJW,
Have you taken a look here:
http://www.matrixmultimedia.com/mmforum ... 71&#p52371

Martin
Martin

MJU
Posts: 502
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 121 times
Been thanked: 108 times
Contact:

Re: How to use the scope?

Post by MJU »

Hey Martin, thank you.

I looked at the file.
It's a bit more complicated than I hoped for.

Maybe in the future there could be a settings button in the scope screen to add certain pins from the MCU to track by the scope?
In the mean time I will work without the scope or look forward to the first (video) tutorial.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: How to use the scope?

Post by medelec35 »

Your welcome MJU.
MJU wrote:Maybe in the future there could be a settings button in the scope screen to add certain pins from the MCU to track by the scope?
I second that.
Scope could a a little easier to use. Each channel can have a port selection just like components do just like your stating.


Martin
Martin

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: How to use the scope?

Post by JonnyW »

Morning.

Yes, I agree this could do with an interface. The scope and console were added to support components - idea is a component adds whatever output it requires. I will look into this and possibly add some UI to the front end of the scope.

In the meantime, here is a component that allows up to 4 digital and 2 analog streams. There is an issue in Flowcode where it is not calling the unconnected event for analog connections, so will pop-up a warning if these are not linked. This will be sorted in the next patch, in the meantime ignore it.
scopeview.fcpx
Compiled component
Add to your components folder
(2.32 KiB) Downloaded 361 times
scope_viewer.fcfx
Source code for the component
(16.5 KiB) Downloaded 374 times
scope_viewer_t01.fcfx
Demo file for the component
(4.09 KiB) Downloaded 332 times
Any problems or addition requests, please let me know.

Jonny

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: How to use the scope?

Post by medelec35 »

Hi Jonny,
Your modifications make the sope more practical to use, so thanks for that.

scope feature requests would be:

Adjustable time base so you can see several cycles within scope, no matter what duration is
Graduated time sections just like on a real scope.

Cursor time measurements
Perhaps just drag two lines may be easiest?

Hope not asking too much?

Thanks

Martin
Martin

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: How to use the scope?

Post by JonnyW »

Hi Martin.

You can zoom the scope in and out using ctrl-mouse wheel. I am not sure it is in 6.0.3, but the up/down cursors also work with this. Wherever the mouse is situated on the timeline should remain at that point when scrolled.

On the top bar of the scope there are two orange marks. These denote the cursors. When the scope is active, you can drag the bars on the scope to move these. In the bottom left the range between cursors is shown. Clicking on either of the marks on the top bar will jump to that point. The arrow in the middle of the bar allows you to scroll the window left and right.
000006_Data scope.png
(15.95 KiB) Downloaded 9819 times
I hope this helps with a few things.

Jonny

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: How to use the scope?

Post by medelec35 »

Thanks Jonny,
That brilliant!
I did not realise scope did all what i'm asking :)
Just one question How can we get sope to show time in microseconds/milliseconds or seconds.
Not use to a timebase in ticks.
Or is that an impossible request?
Martin

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: How to use the scope?

Post by acestu »

Hi Martin,

Is this similar to what I have just been doing with my pocket oscilloscope ?

cheers
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: How to use the scope?

Post by JonnyW »

Evening.
Just one question How can we get sope to show time in microseconds/milliseconds or seconds.
Not use to a timebase in ticks.
Or is that an impossible request?
When used with some profiling hardware such as the EB006v9, we can accurately gauge the meaning of 'ticks', and one tick will be a certain number of milliseconds.

During simulation there is no background timer that it is fast and accurate enough to be calling every executed instruction, so I use the instruction counter as a 'tick' - this is not an exact time, and will be different on different machines and depending on the instruction - an 'add' will be quicker than a 'sim command'. For this reason I have been deliberately vague with the 'tick', though it may be I allow the plugins to name the units, so the ICT stuff can rename 'tick' to 'microsecond'.

In short, it is not possible at present to show millisecs accurately during simulation.

Jonny

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: How to use the scope?

Post by medelec35 »

Thanks Jonny,
I'm just brain storming here, so I may be talking rubbish?

How about when scope if first ran it has to reset ticks to 0, activate a 1ms delay for example store new tick value after 1ms delay is completed. Since it is known how many ticks has elapsed for 1ms e.g 500 (a random number) then every 500 ticks 1ms has elapsed as a rough guide. so then the sale at the top is then 1ms every 500 ticks etc. Its only a rough guess as things like interrupts will effect hao many ticks has elapsed every 1ms.
Martin

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: How to use the scope?

Post by JonnyW »

Hi. The simulation worked like that internally for a while - every so often the simulation needs to let the rest of the system have a go, and this used a moving average filter to approximate the number of ticks per second and thus decide when to 'breathe'.

Problem is that each instruction does not execute at the same rate and also pausing, stepping through and other tasks hogging the CPU will cause rates to vary wildly.

The main issue however is that the port changes are recorded each time a port changes. The Windows high-speed timer may be accurate enough to record this, but I am not keen on calling into the kernel for something that has the potential to be called so frequently. From what I have read Windows QueryPerformanceCounter can take nearly 1.5ms, which would destroy frame-rates when pins are toggled quickly.

I could approximate the time based on clock settings and scale the scope based on this, but this would probably give rise to support requests from users noting that one simulation millisecond is not the same as one millisecond, and that simulation times do not reflect downloaded readings. I may add this as an option though, just for completeness. It would be a completely cosmetic change though.

Jonny

MJU
Posts: 502
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 121 times
Been thanked: 108 times
Contact:

Re: How to use the scope?

Post by MJU »

Thanks Jonny!

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: How to use the scope?

Post by medelec35 »

Thanks for your feedback Jonny.
I will leave what you add and don't add since you know the ins and out's far better then me to perform an informed decision.
I'm just going on the basis of other simulators has this function so would be good if Flowcode had this to.
Martin

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: How to use the scope?

Post by medelec35 »

Hi Jonny,
JonnyW wrote: I am not sure it is in 6.0.3, but the up/down cursors also work with this.
Cursors do not appear to work with 6.0.3.
JonnyW wrote:On the top bar of the scope there are two orange marks. These denote the cursors. When the scope is active, you can drag the bars on the scope to move these.
I could not drag the cursors. is this available in 6.0.3.
Unless I'm not doing something right?

I will say you have not mentioned a great feature!
If you hover the mouse between two different logic levels, the time is actually displayed!
Scope test1.png
(36.16 KiB) Downloaded 9775 times
That is what i'm mainly after.

Martin
Martin

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: How to use the scope?

Post by JonnyW »

Hi. Yeah, the scope can show overlays like that. The default decoding works off the graphic, so is affected by aliasing, but it will work off the 'raw' data like the component packet decoding can eventually. This will work between any points, including on analogue streams.

For the cursors, hover the mouse over the cursor in the scope view itself. It will highlight the cursor, which can then be dragged. Clicking on the bar at the top of the screen will jump to the location, and the markers are there to show where the cursors are, as it is pretty easy to loose them when you zoom in without them.

I made a typo with 'I am not sure it is in 6.0.3, but the up/down cursors also work with this.' - it is ctrl-up/down to zoom in/out. May not be in 6.0.3 though.

Cheers,

Jonny

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: How to use the scope?

Post by medelec35 »

JonnyW wrote:For the cursors, hover the mouse over the cursor in the scope view itself. It will highlight the cursor, which can then be dragged.
Hi Jonny, when overing over the cursor (triangle shape) it does go orange, but will not allow me to drag at all :?
Holding down left mouse button the orange edges just disappears.
Nothing else happens when left mouse button is still held, and mose moved to different positions.

Martin
Martin

balles
Posts: 31
Joined: Fri Sep 06, 2013 1:37 pm
Has thanked: 16 times
Been thanked: 12 times
Contact:

Re: How to use the scope?

Post by balles »

Hello Jonny, Martin;

The scope is working as Jonny's picture on above post, Martin the cursors are hide on the extreme right border of the scope view, click on the border (even if you don't see anything) and drag it to the center of the window. But guys sorry, how did the scope be assigned for the PORTA, i can't find it out! :?:

Jonny, couldn't these two cursors start on the middle of the window, to be easier to find them?

Thanks!

EDITED: I didn't made myself clear on the above question.
I'm asking if the two cursors couldn't start lets say 100 or 200 'ticks' from the center as the picture below, instead the right border?
Attachments
01.jpg
01.jpg (118.92 KiB) Viewed 16201 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: How to use the scope?

Post by medelec35 »

balles wrote:Martin the cursors are hide on the extreme right border of the scope view, click on the border (even if you don't see anything) and drag it to the center of the window.
Got it! Thanks for that balles. :)
To assign ports including ADC connections from scratch:
1) in Misc category add Scope monitor to Dashboard panel for example.
2) Right click on the Scope monitor thats on the dashboard panel and select properties.
3) Assign Trace/s to any pin you desire:
Scope connections.png
(64.92 KiB) Downloaded 9735 times
Martin
Martin

MJU
Posts: 502
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 121 times
Been thanked: 108 times
Contact:

Re: How to use the scope?

Post by MJU »

I can't seem to drag the red cursor from it's place.
I tried several key combinations to drag it, nothing works.

What am I doing wrong? :-)

balles
Posts: 31
Joined: Fri Sep 06, 2013 1:37 pm
Has thanked: 16 times
Been thanked: 12 times
Contact:

Re: How to use the scope?

Post by balles »

Got it! Thanks for that balles.
Welcome Professor Martin!!! :D
And many thanks for the input on the scope, things are there but sometimes hard to find in V6.
I can't seem to drag the red cursor from it's place.
MJU
You need to drag it into the window of the scope, not on the bar where is the triangle shape cursor.
Cause of that i asked for Jonny if they can start on the middle, each of one side by side that triangle cursor...

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: How to use the scope?

Post by medelec35 »

Your welcome balles,
I'm no professor, but thanks for the compliment anyway :)
I agree it should not be left as it is, since now I know how to drag cursors, sometimes it still does not want to play ball.

I all have another suggestion.
Eith when cursor is exactly on the trace that is changing state, then either have a snap function (so long as can enable or disable snap)

Or the cursor changes colour when on the changing state trace.
Not sure which one I would prefer?

I know Im getting greedy with suggestions, but is is possible to allow us to have an additional entry box in which allows us to add our own multiplying factor.
Default can be 1.
So if a 1ms duration is shown as 2.5 ms then we just change the 1 to 0.40

Martin
Martin

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: How to use the scope?

Post by JonnyW »

Hi. Things are very hectic at the moment (as always, it seems) due to upcoming presentations, but I can add these to the list and get them in when I can. I would imagine that everyone who has posted on this thread has used a scope a good deal more than me, so suggestions for functionality are welcome.

Jonny

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: How to use the scope?

Post by medelec35 »

Additional features for the scope (especially when using with ICT) is trigger on rising or falling edge. When triggered, time can be reset to 0.

Martin
Martin

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: How to use the scope?

Post by medelec35 »

Option to display frequency would also be useful :)
Martin

Post Reply