Page 1 of 1
Multiple pots in program move in unison
Posted: Tue Mar 15, 2016 4:40 am
by E*2Engineer
Hello people,
The program attached has 4 potentiometers in it, with only 2 involved in the start of this program,
and for some reason, if I move any one of them, they all turn equally and simultaneously amount.
Strangely enough, I would prefer them to move individually.
What simple, stupid thing am I doing wrong?
Thanks,
-Craig C
Re: Multiple pots in program move in unison
Posted: Tue Mar 15, 2016 10:49 am
by Benj
Hello Craig,
If you look at the properties for each ADC component then you will see they are all connected to same analogue channel AN0.
If you change the channels so that each ADC has it's own ADC channel then they should work independently as you are expecting.
Re: Multiple pots in program move in unison
Posted: Tue Mar 15, 2016 10:23 pm
by E*2Engineer
But I have so many analog inputs in my project, I will be using a MUX to change from 1 signal to the next. It shows that in my program.
I first choose an input using the output of Channel B, going to a MUX then I sample the selected signal. Any way to sim this?
If I can't get to simulate this in the software, it's going to make my programming much tougher.
-CC
Re: Multiple pots in program move in unison
Posted: Wed Mar 16, 2016 5:14 am
by E*2Engineer
Benj,
That will get me by on the 1st 8 Analog inputs, but I have 16 analog voltages to read, all from separate sources.
And even then it would mean I couldn't use the code the way it will be written/ run in the actual project, making it a exercise in futility.
The 16 channels will be coming from potentiometers and sensors. It just worked out to 16, it has nothing to do with 2 bytes worth of data. This works well with my
4067 16 channel MUX. I plan on running all signals through the 4067, 4 to 16 channel MUX output to 1 (AN0) A/D input.
I assume at this point that there is no way to use this type design on the FC6 simulator?
-CC
Re: Multiple pots in program move in unison
Posted: Wed Mar 16, 2016 10:53 am
by LeighM
One idea...
The 4067 could be simulated by creating a new component which uses 16 sliders (see simulation controls)
The component would also have macros created for setting the channel and reading back the value.
So the component would have "downloadable" macros to set the mux outputs and read the AN0 value,
and also simulation versions to save the channel number and then return the correct slider value.
Re: Multiple pots in program move in unison
Posted: Wed Mar 16, 2016 11:54 am
by LeighM
Hi,
I've put together a very quick starter, attached.
Currently only has 4 channels, but you can see what needs to be done.
Hope it helps.
Leigh
Re: Multiple pots in program move in unison
Posted: Thu Mar 17, 2016 3:05 am
by E*2Engineer
LeighM,
i really like your solution, And thanks so much for the start of the code needed, I would have had some problems without it, as I am still learning FC6.
Are 2 of the 3 variants of the program for 32 or 64 bit? test_mux.fcfx opened right up on my Win 7 64 bit computer.
And mux16.fcpx was not recognized by my version FC6.
Cheers!
Craig C
Re: Multiple pots in program move in unison
Posted: Thu Mar 17, 2016 9:26 am
by LeighM
Glad it was of help.
mux16.fcpx is the actual component that needs to be copied into your Flowcode/components directory.
mux16.fcfx is the source code for the component, so you can edit and add to that, then "Export Component" from the File menu.
That will then re-create the component and overwrite mux16.fcpx
Leigh
Re: Multiple pots in program move in unison
Posted: Thu Mar 17, 2016 2:13 pm
by E*2Engineer
Leigh,
This was more than a solution, it was a great bit of usable information in making components, and programming as well.
Very useful for all other projects.
Thanks again,
-Craig
Re: Multiple pots in program move in unison
Posted: Sun May 15, 2016 7:13 am
by mossine
LeighM wrote:Hi,
I've put together a very quick starter, attached.
Currently only has 4 channels, but you can see what needs to be done.
Hope it helps.
Leigh
hi everyone
hi "LeighM" ;
pleas can you upload your examples with flowcode V5 .
i need this examples
thank you
Re: Multiple pots in program move in unison
Posted: Mon May 16, 2016 2:11 pm
by Benj
Hello Mossine,
I don't think that this is something Flowcode v5 can do.
Re: Multiple pots in program move in unison
Posted: Tue May 17, 2016 2:56 pm
by mossine
hi Benj
thanks ;
i must change to flowcode v6