Search found 54 matches

by SteveM
Thu Apr 09, 2015 9:57 am
Forum: General Programming
Topic: Bytes to string
Replies: 5
Views: 7012

Re: Bytes to string

If the string grows longer, more memory is automatically assigned (assuming there is any memory free!) As programmers often like to say "your milage may vary!". As kersing helpfully reminded me (thanks!), when working with microcontrollers that have limited amounts of memory, this kind of automatic...
by SteveM
Wed Apr 08, 2015 4:56 pm
Forum: General Programming
Topic: Bytes to string
Replies: 5
Views: 7012

Re: Bytes to string

Hi, Yes. You can do all those things. In reality, a String is just an Array of Bytes with a few special properties. Just like an Array, you can read and write individual characters using the [brackets], and FC is not fussy whether you use text or bytes to set the values. For example... my_string = "...
by SteveM
Wed Apr 08, 2015 4:27 pm
Forum: Flowcode V6
Topic: Specifying gain of a filter
Replies: 8
Views: 6033

Re: Specifying gain of a filter

Bingo! My hunch was right - looks like some code was copy/pasted without updating the variable names. (You'd never catch me doing a thing like that, honest! :wink: :lol: ) Here's an updated version of the filter component definition... DSPFilter.fcpx Just copy the file to the "C:\Program Files (x86)...
by SteveM
Wed Apr 08, 2015 3:04 pm
Forum: Flowcode V6
Topic: Specifying gain of a filter
Replies: 8
Views: 6033

Re: Specifying gain of a filter

Hi again, Ouch - that looks nasty! Leave it with me - I've had a quick look at the code behind the component, and something looks a little off to me (some coefficents not used!). I'll check over it with Ben and get back to you - if my hunch is right, we should be able to get this fixed pretty quickly.
by SteveM
Wed Apr 08, 2015 10:30 am
Forum: Flowcode V6
Topic: Specifying gain of a filter
Replies: 8
Views: 6033

Re: Specifying gain of a filter

Hi there, Jarro, If you open the DSP filter component properties, and set "Type" to "IIR", and "order" to 2, you will have a biquad! The other properties will change to show you a list of the filter coefficients. You can find a handy biquad coefficent calculator HERE - that will take your desired fr...
by SteveM
Mon Oct 27, 2014 6:21 pm
Forum: Flowcode V6
Topic: Problem with component Motor (Full Bridge)
Replies: 3
Views: 3148

Re: Problem with component Motor (Full Bridge)

Hi All, Apologies for this having taken so long, but I think we have got to the bottom of this problem now. Seems that the motor was only able to start when the pin changed , but not if the pin was already turned on at the start of simulation. Fixed versions of the motors will be provided in the nex...
by SteveM
Thu Oct 16, 2014 10:41 am
Forum: Bug reports
Topic: Flowcode 6.1 for PIC not compiling
Replies: 26
Views: 17256

Re: Flowcode 6.1 for PIC not compiling

Hi Tom, It may also be worth checking your anti-virus software - some are rather over-zealous, treating certain FS files as viruses and moving them into "quarantine". We have made good progress getting the anti-virus makers to 'white list' all of the Flowcode files, but it does still happen from tim...
by SteveM
Mon Sep 22, 2014 12:16 pm
Forum: Flowcode V5 Free Edition
Topic: How to implement "else if" in Decision
Replies: 7
Views: 11573

Re: How to implement "else if" in Decision

Hi all, Nesting "if ... else if ... else if ... else ..." is quite simple using just the decision icons. The thing to remember is that the 'No' branch from the decision icons is equivalent to 'else' - anything you put in that branch is executed only when the condition is false. The structure ends up...
by SteveM
Thu Sep 18, 2014 12:47 pm
Forum: E-blocks
Topic: EBlock Schematic
Replies: 4
Views: 8284

Re: EBlock Schematic

Hi there, Here at Matrix, I do all of the e-block layouts for our curriculums etc. using CorelDraw (version 12, which is ancient!!) - which is really just a simple 2D vector drawing package. Pretty much any vector drawing package could achieve similar results - the most commonly used seems to be Ado...
by SteveM
Fri Aug 22, 2014 12:41 pm
Forum: Flowcode V6
Topic: Problem with component Motor (Full Bridge)
Replies: 3
Views: 3148

Re: Problem with component Motor (Full Bridge)

Hi there,
Thanks for the bug report, we'll take a look at that and get a fixed versions out as soon as we can.
Best regards,
Steve.
by SteveM
Thu Jul 31, 2014 3:26 pm
Forum: General Programming
Topic: int64 is it possible ??
Replies: 3
Views: 4075

Re: int64 is it possible ??

I assume a float variable wouldnt be able to hold this value either?? That shouldn't be a problem when the maths is done using floats - once the registers are converted to float, you'll need to make sure that all of your 'intermediate' variables are also floats. You might be familiar with the "E" n...
by SteveM
Wed Jul 30, 2014 12:17 pm
Forum: General Programming
Topic: int64 is it possible ??
Replies: 3
Views: 4075

Re: int64 is it possible ??

Hi Cobra, That might depend on which microcontroller you are using, and how much precision you really need. What I'm thinking is that you could read all of the coefficients from the register values, then convert them to float variables using the "int2float()" function. Then use the same formulas as ...
by SteveM
Mon Jul 28, 2014 4:24 pm
Forum: E-blocks
Topic: HPACT DataSheet Errors
Replies: 3
Views: 4173

Re: HPACT DataSheet Errors

I'll put that one to our marketing/website guys too, it's a timely request as they're canvasing for ideas at the moment. Frankly, we've realised ourselves that our web presence really needs a good spring clean, and that includes trying to get to grips with our version control. Hopefully that'll mean...
by SteveM
Mon Jul 28, 2014 11:32 am
Forum: E-blocks
Topic: HPACT DataSheet Errors
Replies: 3
Views: 4173

Re: HPACT DataSheet Errors

Thanks Martin,
Indeed, all of the photos are of a version 3 board, yet the technical data and schematic are for the new version 4 board - I'll pass the info on to our marketing department so that we can bring everything up to date.

Cheers,
Steve.
by SteveM
Tue Jul 22, 2014 4:32 pm
Forum: E-blocks
Topic: C for AVR Ex 1.4 Delay Routine
Replies: 5
Views: 5891

Re: C for AVR Ex 1.4 Delay Routine

Looks like the compiler is trying to be "helpful" - i.e. it sees that the loop is empty, so "optimises" for greater speed and less memory usage by ignoring the code. Adding the assembly effectively tells the compiler that the loop is empty on purpose, and prevents the optimisation. If you were writi...
by SteveM
Tue Jul 08, 2014 12:17 pm
Forum: Flowcode V6
Topic: Shifting bits
Replies: 3
Views: 3247

Re: Shifting bits

Hi Robert, It can be done, but you have to work out which bits "fall off the end", and store them somewhere, by writing a flowchart to do it. Within the chip itself, bits which are right-shifted off the end ("underflows"), and bits which are left-shifted off the top ("overflows"), just disappear for...
by SteveM
Thu Jun 19, 2014 10:16 am
Forum: Bug reports
Topic: loops
Replies: 2
Views: 3221

Re: loops

Hi Robert, This is a known bug that has been passed to our programmers to look at. For some reason the compiler is always using just a single byte for the loop index, even if you specify a value that doesn't fit into a byte - so the counter just keeps wrapping around to zero and never reaches the ta...
by SteveM
Tue Jun 10, 2014 4:55 pm
Forum: Flowcode V6
Topic: Converting strings without loosing Char
Replies: 8
Views: 4763

Re: Converting strings without loosing Char

Hi Brian, There's no way to do that directly, because the values are stored within the chip as fixed length binary numbers. e.g. if you store your number as a ULONG (4 bytes), it will always be 32bits long inside the chip. When you convert the String to an Integer, any leading zero's in the string w...
by SteveM
Mon Jun 09, 2014 1:01 pm
Forum: Feature requests
Topic: Slow Drag-Select, and Identifying Pre-Disabled Icons
Replies: 6
Views: 5555

Re: Slow Drag-Select, and Identifying Pre-Disabled Icons

Thumbs up all round ('hope I didn't miss anyone'). These are exactly the kind of suggestions that we're looking for at the moment - the next release is all about finally nailing the last of the "show-stopper" bugs, and we're hoping then to have time to start really sorting out the user interface, an...
by SteveM
Thu Jun 05, 2014 10:12 am
Forum: Flowcode V6
Topic: 3D variable array?
Replies: 8
Views: 6053

Re: 3D variable array?

You're welcome. :D A quick warning - I've just had a PM to say that the download misbehaves when trying to generate a report, so I'll take a look into that just in case it indicates a problem for compiling the code. I'll get back to you about that ASAP, and re-upload the file if any fixes are needed...
by SteveM
Thu Jun 05, 2014 9:58 am
Forum: Feature requests
Topic: 2D: Dashboard Panel
Replies: 1
Views: 2521

Re: 2D: Dashboard Panel

Hi Rob, We're aware that there are a few problems with the recovery of window layouts when loading files. Not sure if those can be fixed in time for the update that's due shortly, as we are naturally prioritising bugs that cause crashes and errors when compiling flowcharts and components. However, i...
by SteveM
Wed Jun 04, 2014 12:10 pm
Forum: Flowcode V6
Topic: 3D variable array?
Replies: 8
Views: 6053

Re: 3D variable array?

Hi there, A byte is the smallest 'unit' that you can make an array of - although the Boolean data type looks smaller (it's only on or off!), the data would still be stored as a whole byte, because of the way that access to the chip's memory works. So, although your 90 element array has room for 90 *...
by SteveM
Mon Jun 02, 2014 11:00 am
Forum: Flowcode V6
Topic: 3D variable array?
Replies: 8
Views: 6053

Re: 3D variable array?

Hi, For an array of fixed size, you can simulate a multi-dimensional array by using a bit of maths to calculate an index to use with a normal 'flat' array. So our 'multi-dimensional' array (or matrix!)... [a1, a2, a3] [b1, b2, b3] [c1, c2, c3] ...etc... Becomes the 'flat' array [a1, a2, a3, b1, b2, ...
by SteveM
Thu May 29, 2014 12:18 pm
Forum: Feature requests
Topic: Option Check Box "Debuging off unknown Exceptions"
Replies: 2
Views: 2574

Re: Option Check Box "Debuging off unknown Exceptions"

Hi Rudi, Interesting point - as you say, an error message from any software must always be useful to the customer... - Should describe the problem in the customer's language - no cryptic codes! - Make clear if the customer did anything unexpected, and tell them what they can do to make things right....
by SteveM
Thu May 29, 2014 11:20 am
Forum: Getting Started
Topic: version 5 to version 6
Replies: 4
Views: 8153

Re: version 5 to version 6

Hi Phil, We'll need to see the troublesome file to be able to give you a clear answer. You could either attach it to a post here, or if you would prefer to keep your project confidential, attach it to a private message to one of the Matrix staff (SteveM, Benj or LeighM). To attach a file, use the 'U...