Search found 1226 matches

by Steve-Matrix
Wed Oct 15, 2025 9:38 am
Forum: General
Topic: Contents of an OR statement
Replies: 2
Views: 21

Re: Contents of an OR statement

It often helps to use brackets to describe your intent in these situations. Experienced programmers will often write code that doesn't use brackets and assumes anyone reading the code will understand the natural order of operators within C. But with the addition of a few brackets, it means even novi...
by Steve-Matrix
Wed Oct 15, 2025 9:17 am
Forum: General
Topic: Is there an issue replying to posts (Windows 7)
Replies: 2
Views: 23

Re: Is there an issue replying to posts (Windows 7)

Is that something that has started happening fairly recently - i.e. in the past few months? I did make a small change on these forums to alleviate some web attacks we experience from time to time. I will revert that to see if that helps.
by Steve-Matrix
Wed Oct 15, 2025 9:14 am
Forum: Feature Requests
Topic: Minimise 2D panel
Replies: 1
Views: 20

Re: Minimise 2D panel

Thanks for the suggestion. It might actually be quite tricky to implement that with the way things currently work behind the scenes. The "close" is essentially a "minimise" anyway and so perhaps what you are wanting is an easier way to re-open a closed/minimised panel window. Hav...
by Steve-Matrix
Tue Oct 14, 2025 9:35 am
Forum: General
Topic: dsPIC BL0032 upload problem
Replies: 13
Views: 7054

Re: dsPIC BL0032 upload problem

Hi I'm travelling just now with no access to FC, however in this link, if you click on resources you should be able to download an example. https://www.matrixtsl.com/webshop/e-blocks2-dspic-programmer.html Regards Due to some website changes, the like above no longer works. Instead, you can search ...
by Steve-Matrix
Tue Oct 14, 2025 8:49 am
Forum: General
Topic: Global C-Code
Replies: 2
Views: 58

Re: Global C-Code

You can create a normal macro in Flowcode that has the suitable parameters and return type for that function. In this macro add a single C-code icon and put the code of that function into that icon, matching the parameters of your C function with the parameters of the macro. Or you can just use supp...
by Steve-Matrix
Sat Oct 11, 2025 10:45 am
Forum: General
Topic: Loop While!
Replies: 21
Views: 671

Re: Loop While!

UNTIL(RemoteDown == 1 || Endestop_Down == 1) UNTIL(RemoteDown = 1 OR Endestop_Down = 1) WHILE(RemoteDown == 0 && Endestop_Down == 0) UNTIL((RemoteDown == 0) && (Endestop_Down == 0)) And your suggest Martin (RemoteDown == 1) || (Endestop_Down == 1) :? none of them work I sense that o...
by Steve-Matrix
Fri Oct 10, 2025 8:37 am
Forum: General
Topic: Elephant in the room
Replies: 3
Views: 1113

Re: Elephant in the room

We hope to have an announcement in the middle of next week.
by Steve-Matrix
Tue Oct 07, 2025 9:49 am
Forum: General
Topic: Integer to float calculation
Replies: 3
Views: 282

Re: Integer to float calculation

I forgot another trick, and that is to simplify the calculation (by multiplying by 5/1023) to this instead:

Code: Select all

Cell_1_Voltage_Float = Cell_1_Voltage_Int * 0.0048875855
(if you did this, it would be beneficial to add a comment in the code to explain where that value came from)
by Steve-Matrix
Tue Oct 07, 2025 9:19 am
Forum: General
Topic: Integer to float calculation
Replies: 3
Views: 282

Re: Integer to float calculation

I think there is an alternative you can use which is this: Cell_1_Voltage_Float = (Cell_1_Voltage_Int / 1023.0) * 5.0 For those who are interested, here's what's going on: Without the (FLOAT) casting or the addition of the ".0", the C compiler will see this: Cell_1_Voltage_Float = (Cell_1_...
by Steve-Matrix
Mon Sep 29, 2025 10:00 am
Forum: General
Topic: Error when compiling to target
Replies: 6
Views: 1970

Re: Error when compiling to target

There has always been a bit of confusion with the terms "AND", "OR" and "NOT" within Flowcode, because these refer to "bitwise" operators rather than "logical" operators. These were used in the very first version of Flowcode when the logical AND/OR/N...