Hi everyone.
I'm creating a simulation program for Flowcode training purposes, using the simple/lightweight 2D dashboard that I only use for setting up component parameters and lightweight simulation for debug.
However, creating a simple LED array (binary bit representation) sitting above a simulated LCD graphic, where the LCD represents the numerical value of a variable passed to the port driving the LEDs, the persistent prior state of LEDs (not being updated on simulation restart) can only add confusion when moving on to discuss and demonstrate bit-masking - unless I tell my students they must close Flowcode and restart to re-run simulation.
I'm hoping the simple 2D dashboard hasn't been deprecated and forgotten, so just asking if anyone else has a workaround to resolve graphical persistence in the dashboard? In other words, individual LEDs (active High) remain 'On' once set, and not reset on restarting the simulation with their associated port bits first set to all zero's.
Many thanks,
Brendan
2D Dashboard running simulation
-
- Posts: 11
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 20, 2023 2:13 pm
- Has thanked: 6 times
- Been thanked: 4 times
-
- Matrix Staff
- Posts: 1465
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 204 times
- Been thanked: 347 times
Re: 2D Dashboard running simulation
Can you set the port to zero with an Output icon at the beginning of your project to force the LEDs to reset?
Re: 2D Dashboard running simulation
Hi Steve.
As a matter of course (emphasising good programming practice to students), I expressly initialise all LED-driving ports to zero, which originally highlighted this issue. However, I found a 'fudge' that appears to largely resolve dashboard persistence in the binary-representative display.
I provide three screenshots which include the start of the program...
1st simulation run with port initialisation icons enabled and fudge disabled. Allowed to loop-count to 10.
2nd - Simulation stopped, then restarted, and stopped at loop-count of 1, showing LED persistence from previous run.
3rd - Simulation re-run with fudge icons enabled.
Certainly something going on between PC speed/run-time timings and the dashboard, where the dashboard isn't always getting initialised before the debug simulation starts to run. This is obviated further by slowing the simulation down.
Thanks and best regards,
Brendan
As a matter of course (emphasising good programming practice to students), I expressly initialise all LED-driving ports to zero, which originally highlighted this issue. However, I found a 'fudge' that appears to largely resolve dashboard persistence in the binary-representative display.
I provide three screenshots which include the start of the program...
1st simulation run with port initialisation icons enabled and fudge disabled. Allowed to loop-count to 10.
2nd - Simulation stopped, then restarted, and stopped at loop-count of 1, showing LED persistence from previous run.
3rd - Simulation re-run with fudge icons enabled.
Certainly something going on between PC speed/run-time timings and the dashboard, where the dashboard isn't always getting initialised before the debug simulation starts to run. This is obviated further by slowing the simulation down.
Thanks and best regards,
Brendan
Last edited by Qualcomm5 on Mon Mar 04, 2024 11:50 am, edited 3 times in total.
-
- Matrix Staff
- Posts: 1465
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 204 times
- Been thanked: 347 times
-
- Matrix Staff
- Posts: 1913
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 619 times
- Been thanked: 644 times
Re: 2D Dashboard running simulation
Hello.
I have made a minor change to the LED Mono component.
Can you try it and if you are happy with it, I will roll it out on all the 2D LEDs
To try the updated component.
Browse to this location using file explorer , it's hidden by default so just paste the link into your address bar.
Place the attached component.
If Flowcode is already open, then you will need to reload your project for the new component to work
If you run any component updates, then the component you added will be overwritten, so it will stop working again (unless the component update has been pushed).
I have made a minor change to the LED Mono component.
Can you try it and if you are happy with it, I will roll it out on all the 2D LEDs
To try the updated component.
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\FlowcodeV10\Components
If Flowcode is already open, then you will need to reload your project for the new component to work
If you run any component updates, then the component you added will be overwritten, so it will stop working again (unless the component update has been pushed).
- Attachments
-
- LED_Mono_2dgi.fcpx
- (7.02 KiB) Downloaded 531 times
Martin
Re: 2D Dashboard running simulation
Hi Steve.
Many thanks for providing the updated component to try, though sadly no change.
My original suspicions related to possible timings, though I observe the same behaviours when stepping through from start with F8 on each occasion.
Best regards,
Brendan
Many thanks for providing the updated component to try, though sadly no change.
My original suspicions related to possible timings, though I observe the same behaviours when stepping through from start with F8 on each occasion.
Best regards,
Brendan
-
- Matrix Staff
- Posts: 1913
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 619 times
- Been thanked: 644 times
Re: 2D Dashboard running simulation
Hi Brendon.
Before the component change, If I stepped through the code with the switch on, then after LED on A1 and A2 toggled, I switched the switch off and single stepped a few more times, until just LED on A2 is lit
After stopping the simulation and restarting the simulation, repeating above, both LEDS lit.
With the updated component it does not.
Can you select Help > Library Updates.. and take a screenshot and post the Updates windows, please.
Before the component change, If I stepped through the code with the switch on, then after LED on A1 and A2 toggled, I switched the switch off and single stepped a few more times, until just LED on A2 is lit
After stopping the simulation and restarting the simulation, repeating above, both LEDS lit.
With the updated component it does not.
Can you select Help > Library Updates.. and take a screenshot and post the Updates windows, please.
Martin
Re: 2D Dashboard running simulation
Hi Martin.
I provide the requested screenshots...
"Files In Use" reflects no updates, although "Full Database" does, and also double-checked the correct location of the replaced file (reflected by file date). Just to confirm, I have closed and re-opened FC a few times since replacing the file.
Hopefully this may be of some help.
Thanks and best regards,
Brendan
I provide the requested screenshots...
"Files In Use" reflects no updates, although "Full Database" does, and also double-checked the correct location of the replaced file (reflected by file date). Just to confirm, I have closed and re-opened FC a few times since replacing the file.
Hopefully this may be of some help.
Thanks and best regards,
Brendan