Introduction: Memory Slider and Switch for Flowstone!
I use Flowstone and the labjack u3 hv as the core of my home automation system. It's the best and I can live with it's few limitations (such as not being able to commmunicate with my USB UIRT but Girder 6 has handled that for me). Often for sliders and switches, I wish the compiled EXE file could rememder the last position or state of those virtual on screen components. Flowstone by default won't remember squat. I developed a means to save a file to drive (in my case an SSD) for each slider and switch so that when the PC boots up another time, the same exact settings are pulled back up.
All this is mainly the preparation for my upcoming Car PC project. I really want fan speed, Air conditioning, Headlights etc to remember their individual settings. Read on for the simple yet effective fix I made for memory!
Step 1: Memory Slider.
Here I used the standard slider and the value it produces (0 to 1) is saved as a file to drive. The file type I used is *.mj but you can change that to *.txt or anything your heart desires. Each slider will need a unique name. When the fsm file or EXE file is opened, it loads the last saved value and adjusts its position to that.
Saving is automatically done when the mouse clicks on the slider. Very automatic and extremely cool.
Step 2: Memory Switch.
This switch remembers its last state by loading a file during fsm or EXE opening. The file name will of course need to be unique per switch but now everything will be remembered. You can use different switch type in flowstone, just copy and paste my schematic into yours!
I have proudly included the fsm file for your enjoyment and butchery!