Page 2 of 2

Re: Constants Visibility

Posted: Wed Feb 24, 2021 5:55 am
by p.erasmus
Hi All,

Was thinking last night after my issue with Constants ,I realize that FC is very powerful and I think most people are not aware of this hidden power.
As I now dig deeper into FC I realize that everytime I ask a question get help it opens another huge topics which is so powerful but to be honest these things a person can not learn from the Wiki,The wikki is support document for people that knows FC well,

How can we learn these deeper hidden power from Flowcode is my concern, I am feeling already ashamed that I ask all these questions in the Forum you guys must be tired of me already ,I feel like an amateur (I know these things in a normal C program) starting to program

Again Thanks to all of you great guys helping me out .I appreciate there is good reason for me digging deeper in FC

:D :D

Re: Constants Visibility

Posted: Wed Feb 24, 2021 9:54 am
by Steve-Matrix
Please don't ever feel ashamed. I've been working on Flowcode for most of the past 20 years and I'm still finding new things it can do. I'm also adding some new things too (there will be some nice new features alongside the bugfixes in the next update).

And don't stop asking - it's probably the best way to learn. It also gives the development team ideas to improve Flowcode if there isn't currently an easy way of doing what you ask.

Re: Constants Visibility

Posted: Wed Feb 24, 2021 10:02 am
by p.erasmus
Steve,
Thank you for these words of encouragement ,I appreciate it .
:D

Re: Constants Visibility

Posted: Thu Feb 25, 2021 7:40 am
by p.erasmus
Hello Ben.

I am trying your method with the setting of Constant to public I am having problem when the component is exported the Constants does not show up anywhere what I doing wrong.( I am trying all advises given here Martin and Steve's options are working) I must be doing something wrong that your option is not working :D

Here I set them as Public and trying to set a name as I know it (example CH0) then flowcode says unknown variable
P1.jpg
P1.jpg (33.15 KiB) Viewed 5166 times
P2.jpg
P2.jpg (62.73 KiB) Viewed 5166 times
Appreciate your help Ben! :oops:

Re: Constants Visibility

Posted: Thu Feb 25, 2021 12:01 pm
by BenR
Hello,

It looks like they only appear if you know to enter the comp name followed by ::. I'm sure it used to be better then this but has maybe become a bit buried by other updates and improvements.
Consts.jpg
Consts.jpg (32.91 KiB) Viewed 5160 times

Re: Constants Visibility

Posted: Thu Feb 25, 2021 12:24 pm
by p.erasmus
Hello Ben.

Thank you this is working but as you said could maybe be a bit better ,I do not know this,it only makes a bit difficult for a user to know what to enter and
it makes the call very long in the FC ,Maybe for know Martins and my idea of using the mask as properties look neater what would your advise be ?

I am new in component making cannot judge the correct or more elegant ways :oops:

P1.jpg
P1.jpg (49.53 KiB) Viewed 5158 times

The call mess the Flowchart a bit :D :D :D

P2.jpg
P2.jpg (24.09 KiB) Viewed 5158 times
:D

Re: Constants Visibility

Posted: Thu Feb 25, 2021 12:33 pm
by p.erasmus
Hi Ben.

Thinking about maybe using the bit names as per datasheet will shorten things just not sure how a user which does not really understand datasheet will use the component, if he did he probably do not need a component as he can code himself, I have to think a bit on this ;
This device can handle differential/Single ended and temperature elements at different channels at different Sampling speeds so it needs a bit of configuration each time you want to sample a channel which makes it necessary to have the ability to configure the sample you want


P1.jpg
P1.jpg (61.56 KiB) Viewed 5157 times