Multiple pots in program move in unison
Moderator: Benj
- E*2Engineer
- Posts: 35
- Joined: Wed Dec 25, 2013 6:54 pm
- Has thanked: 12 times
- Been thanked: 6 times
- Contact:
Multiple pots in program move in unison
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
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
- Attachments
-
- Smart one on right
- Smart one on right.jpg (34.42 KiB) Viewed 10731 times
-
- CODE PROGRESS 3 13 16 2348.fcfx
- This is just the start of the coding, the led bar at the top represents the B port output. (Which mux output is selected)
Rest of coding will be completed when pots can be turned individually. - (20.03 KiB) Downloaded 423 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Multiple pots in program move in unison
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- E*2Engineer
- Posts: 35
- Joined: Wed Dec 25, 2013 6:54 pm
- Has thanked: 12 times
- Been thanked: 6 times
- Contact:
Re: Multiple pots in program move in unison
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
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
- E*2Engineer
- Posts: 35
- Joined: Wed Dec 25, 2013 6:54 pm
- Has thanked: 12 times
- Been thanked: 6 times
- Contact:
Re: Multiple pots in program move in unison
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
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
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Multiple pots in program move in unison
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.
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.
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Multiple pots in program move in unison
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
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
- Attachments
-
- mux16.fcpx
- (1.68 KiB) Downloaded 377 times
-
- test_mux.fcfx
- (4.62 KiB) Downloaded 379 times
-
- mux16.fcfx
- (10.46 KiB) Downloaded 386 times
- E*2Engineer
- Posts: 35
- Joined: Wed Dec 25, 2013 6:54 pm
- Has thanked: 12 times
- Been thanked: 6 times
- Contact:
Re: Multiple pots in program move in unison
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
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
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Multiple pots in program move in unison
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
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
- E*2Engineer
- Posts: 35
- Joined: Wed Dec 25, 2013 6:54 pm
- Has thanked: 12 times
- Been thanked: 6 times
- Contact:
Re: Multiple pots in program move in unison
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
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
-
- Posts: 35
- Joined: Mon Jun 17, 2013 2:09 am
- Has thanked: 12 times
- Been thanked: 5 times
- Contact:
Re: Multiple pots in program move in unison
hi everyoneLeighM 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 "LeighM" ;
pleas can you upload your examples with flowcode V5 .
i need this examples
thank you
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Multiple pots in program move in unison
Hello Mossine,
I don't think that this is something Flowcode v5 can do.
I don't think that this is something Flowcode v5 can do.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel