This component generates a square wave during simulation.
Time interval is in milliseconds and approximate (to about 10ms).
The source for this is here, export as a fcpx file to your components folder to include - it will be in the misc category:
A demo of this (just an empty loop) is here:
Open the Data Scope (Menu->View->Scope) to see the wave during simulation.
Jonny
Squarewave generator (sim only)
Moderator: Benj
- JonnyW
- Posts: 1230
- Joined: Fri Oct 29, 2010 9:13 am
- Location: Matrix Multimedia Ltd
- Has thanked: 63 times
- Been thanked: 290 times
- Contact:
Squarewave generator (sim only)
- Attachments
-
- squarewave.fcpx
- Compiled
- (1.55 KiB) Downloaded 432 times
-
- 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: Squarewave generator (sim only)
Hi Jonny, added component (thanks for posting ) to components directory.
Unfortunantly component won't add to Dashboard panel: Also when loading
the following message is displayed:
Then Flowcode closes.
Edit:
Same thing happens when trying to open squarewave.fcfx
Flowocde shows failed to document (array not found ) then closes.
Unfortunantly component won't add to Dashboard panel: Also when loading
Code: Select all
SquareWave_Test.fcfx
Edit:
Same thing happens when trying to open squarewave.fcfx
Flowocde shows failed to document (array not found ) then closes.
Martin
- 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: Squarewave generator (sim only)
Hi. Sorry Martin!
I have been adding multi-dimensional array support, so the 'array' attribute of variables has been removed and added as a tag list instead. I didn't think about this as I did it a couple of days ago, and this will work with the next patch, but anything I output now will have this issue.
Very sorry again for this, its a good point - I better not roll this out around the office until a patch is out!
EDIT: I have modded the executable to output temporarily backwards compatible files, and the above attachments should work OK now.
Jonny
I have been adding multi-dimensional array support, so the 'array' attribute of variables has been removed and added as a tag list instead. I didn't think about this as I did it a couple of days ago, and this will work with the next patch, but anything I output now will have this issue.
Very sorry again for this, its a good point - I better not roll this out around the office until a patch is out!
EDIT: I have modded the executable to output temporarily backwards compatible files, and the above attachments should work OK now.
Jonny
-
- 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: Squarewave generator (sim only)
Hi Jonny,
So long at it works in the end.
Thanks for reposting files.
Unfortunately its still not working for me.
I have added only the the latest squarewave.fcpx
Flowcode now opens, but the red square waveform is missing from component that's on the System panel.
The connection is missing from the scope.
When trying to add the squarewave component I get failed to add etc.: Martin
No worries, it does not matter to me if it does not work at first since it's trial and error.JonnyW wrote:Very sorry again for this, its a good point
So long at it works in the end.
Thanks for reposting files.
Unfortunately its still not working for me.
I have added only the the latest squarewave.fcpx
Flowcode now opens, but the red square waveform is missing from component that's on the System panel.
The connection is missing from the scope.
When trying to add the squarewave component I get failed to add etc.: Martin
Martin
- 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: Squarewave generator (sim only)
OK, must still be somewhere else I have changed the component, or not compiled/uploaded it correctly.
I will ensure this is done properly and works 100% in the next patch, should be today or more likely sometime tomorrow.
Jonny
I will ensure this is done properly and works 100% in the next patch, should be today or more likely sometime tomorrow.
Jonny
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
-
- 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: Squarewave generator (sim only)
Hi Jonny,
Just an update.
When I got home, I loaded squarewave.fcfx
changed Type of macro to simulation
Created component.
Now it works perfect!
I got it to trigger int interrupt on portB.
Waveform is showing correctly on the simulation scope, and number of detections showing on LCD is increasing as expected at the correct interval.: I have altered the interval to 200ms so it will look a bit different to your scope.
Some tweaks may be necessary in the finished version, but overall very happy with the generator so far.
Big improvement over Flwocode V5
So Thanks again for what you have done
Martin
Just an update.
When I got home, I loaded squarewave.fcfx
changed Type of macro to simulation
Created component.
Now it works perfect!
I got it to trigger int interrupt on portB.
Waveform is showing correctly on the simulation scope, and number of detections showing on LCD is increasing as expected at the correct interval.: I have altered the interval to 200ms so it will look a bit different to your scope.
Some tweaks may be necessary in the finished version, but overall very happy with the generator so far.
Big improvement over Flwocode V5
So Thanks again for what you have done
Martin
Martin
- 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: Squarewave generator (sim only)
Hi Martin, good news.
There was a bug in Flowcode where it was only compiling the properties in a certain order, so I couldn't add to that version what I wanted, which is a general purpose generator. If you add a list of features you wuld like to see, I'm sure we can sort something.
Jonny
There was a bug in Flowcode where it was only compiling the properties in a certain order, so I couldn't add to that version what I wanted, which is a general purpose generator. If you add a list of features you wuld like to see, I'm sure we can sort something.
Jonny
-
- 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: Squarewave generator (sim only)
Hi Jonny Thanks.
Here is my list:
On duration
Off duration
selectable Period Time or Frequency
Keys to press for Start, Pause, Continue and Stop. (Perhaps selectable from dropdown list?)
Hope I'm not asking for too much?
Also if anyone else would like to post on this thread what functions they would like to see that would be helpful.
Re scope.
I would like scope to show what pin is being used and if possible a x time scale perhaps in milliseconds?
Martin
Here is my list:
On duration
Off duration
selectable Period Time or Frequency
Keys to press for Start, Pause, Continue and Stop. (Perhaps selectable from dropdown list?)
Hope I'm not asking for too much?
Also if anyone else would like to post on this thread what functions they would like to see that would be helpful.
Re scope.
I would like scope to show what pin is being used and if possible a x time scale perhaps in milliseconds?
Martin
Martin