Whenever the flowcode closes, potentiometers reset themselfs and do not keep their set value. Is there any setting that makes program to keep the value of potentiometers?
When developing a complex project I can use up to 12-14 potentiometers. I do not want to set them every time I started the Flowcode.
Thanks.
Potentiometer resetting its value
-
- Posts: 11
- http://meble-kuchenne.info.pl
- Joined: Thu Sep 01, 2022 7:39 am
- Has thanked: 3 times
- Been thanked: 2 times
-
- Matrix Staff
- Posts: 1472
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 204 times
- Been thanked: 349 times
Re: Potentiometer resetting its value
There is a Built-in Function called "Connection.SetAn" which you can use to set the value of an analogue input. If you put calls to this at the beginning of your "main" routine, the potentiometers should get set to the values you specify whenever you begin simulation.
-
- Matrix Staff
- Posts: 1922
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 623 times
- Been thanked: 645 times
Re: Potentiometer resetting its value
Hello.
As an alternative, I have modified the Potentiometer (Colour) component.
You will need to enable Retain Value within its properties.
When you save your project the pot value should be retained.
If you would like to give the component a try then Browse to this location using file explorer, it's hidden by default so just paste the link into your address bar.
Replace the existing file with the attached file.
The flowchart will need to be refreshed if Flowcode was open when you replaced the file.
After reloading your project, if you have a project already with a lot of pots that are different, they can easily be replaced with the modified pot.
Just select the pot on the panel, right-click and select Selection then Replace.
Tick Preserve current scale and choose Potentiometer (colour).
Can you let me know how it goes, please?
As an alternative, I have modified the Potentiometer (Colour) component.
You will need to enable Retain Value within its properties.
When you save your project the pot value should be retained.
If you would like to give the component a try then Browse to this location using file explorer, it's hidden by default so just paste the link into your address bar.
Code: Select all
C:\ProgramData\MatrixTSL\FlowcodeV9\Components
The flowchart will need to be refreshed if Flowcode was open when you replaced the file.
After reloading your project, if you have a project already with a lot of pots that are different, they can easily be replaced with the modified pot.
Just select the pot on the panel, right-click and select Selection then Replace.
Tick Preserve current scale and choose Potentiometer (colour).
Can you let me know how it goes, please?
- Attachments
-
- knob_color_cap.fcpx
- (13.49 KiB) Downloaded 417 times
Martin
-
- Posts: 11
- Joined: Thu Sep 01, 2022 7:39 am
- Has thanked: 3 times
- Been thanked: 2 times
Re: Potentiometer resetting its value
Thank you both for helping. Both of the solutions are worked smoothly.
Modified version of Potentiometer (colour) retained its set value.
Modified version of Potentiometer (colour) retained its set value.
-
- Matrix Staff
- Posts: 1922
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 623 times
- Been thanked: 645 times
Re: Potentiometer resetting its value
Hi, egearabaci.
Thanks for the update.
If you feel that Steve's solution is the only one required, then the modified component won't be pushed onto the update system.
Alternatively, if you like the way the modified component works, then I could update all the potentiometers and they could be available next week as some matrix staff is on holiday this week.
Thanks for the update.
If you feel that Steve's solution is the only one required, then the modified component won't be pushed onto the update system.
Alternatively, if you like the way the modified component works, then I could update all the potentiometers and they could be available next week as some matrix staff is on holiday this week.
Martin
-
- Posts: 11
- Joined: Thu Sep 01, 2022 7:39 am
- Has thanked: 3 times
- Been thanked: 2 times
Re: Potentiometer resetting its value
Hi medelec35 again,
I like the way the modified component works more because its easier to implement and also new users can use it without any help. Moreover, Steve's solution adds more blocks to flow, therefore I always prefer less seen blocks because of the simplicity.
I was using the Potentiometer (slider) because of that I continued with Steve's solution. Therefore it would be nice if you can update the all potentiometers.
Thank you for your further interest.
I like the way the modified component works more because its easier to implement and also new users can use it without any help. Moreover, Steve's solution adds more blocks to flow, therefore I always prefer less seen blocks because of the simplicity.
I was using the Potentiometer (slider) because of that I continued with Steve's solution. Therefore it would be nice if you can update the all potentiometers.
Thank you for your further interest.