Difference between revisions of "Simulation Debugger"

From Flowcode Help
Jump to navigationJump to search
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<sidebar>Sidebar: Overview of Simulation</sidebar>
+
[[File:Simulation debugger.png|right]]
[[File:Gen_Simulation_Debugger_Example.png|right]]
+
The '''simulation debugger''' window becomes active during simulation. It is used to monitor the status of the variables in your program and the macros which are being called. Despite it's name, the simulation debugger also supports ICD mode, allowing for the macro call stack and variable values to be read directly from the microcontroller as it runs. It can also be used to pass or receive values of memory locations and registers on board the target microcontroller. This is useful for detecting and troubleshooting call stack overflows and precisely monitor the program as it runs in hardware.
The '''Simulation debugger''' window becomes active during simulation, it is used to monitor the status of the variables in your program and the macros which are being called, this monitors the process of the microcontroller (and simulation) when running the program.
 
  
 +
When operating in 'normal speed', variables are not updated live. However, when the simulation is paused, running at a slower speed or 'Step Into' and 'Step Over' are used, the variables are updated.
  
The Macro Calls and Variable values are updated when the simulation is paused, using 'Step Into' and 'Step Over' allows you to accurately monitor and debug your flowchart program you can also control components this way to accurately record component functions.
+
You can actively change the speed of the simulation using the slider at the top left of the Simulation Debugger window, the default simulation speed is 'Normal' where no updating of variables visually occurs. The speed can also be reduced from 50Hz down to 0.25Hz, this will result in the simulation going through each icon individually at the specified speed and variables can be seen to update.
  
  
The Simulation debugger also supports the ICD mode allowing for the macro call stack and variable values to be read directly from the microcontroller as it runs, it can also be used to pass or receive values of memory locations and registers on board the target microcontroller. This is useful for detecting and troubleshooting call stack overflows and precisely monitor the program as it runs.
+
There is also a 'Simulation delay:' section at the top right of the 'simulation debugger' window which displays the length and progress of delays set by [[Delay Icon Properties|Delay icons]]. This feature alerts you of long delays, to confirm the simulation has not crashed. It also allows users the ability to 'Skip' any delays and move to the next icon.
  
  
You can actively change the speed of the simulation using the slider at the top left of the Simulation Debugger window, the default simulation speed is 'Normal' although it can be increased to 'As fast as possible' although this may result in graphic tearing. The speed can also be reduced from 50Hz down to 0.25Hz, this will result in the simulation going through each icon individually at the specified speed.
+
'''Changing variable values during Simulation'''
  
[[File:Gen_Simulation_Debugger_Change_Variable_Value.png|right]]
+
When simulating, variable values can be changed from the 'simulation debugger' window by clicking on the 'Value' box next to the variable name and inputting a value.
  
  
There is also a 'Simulation delay:' section at the top right of the 'Simulation Debugger' window which displays the length and progress of delays set by [[Delay Icon Properties|Delay icons]], this section also allows you to skip the delay by pressing the 'Skip' button which will stop the delay and carry on with the program and go to the next icon.
+
When using ICD Mode, you can still manually adjust variable values to allow you to skip certain elelemts of code.
 
 
 
 
'''Changing variables during Simulation'''
 
 
 
When simulating variable values can be changed from the Simulation Debugger window by clicking on the 'Value' box next to the variable name and then simply typing in a value.
 
 
 
 
 
If the ICD Mode is enabled in your [[Project Options]] then stepping into or over icons during simulation will cause the ICD hardware to react accordingly. Changing variable values during the simulation will also work seamlessly with the ICD operation.
 
 
 
 
 
You can change variable values during simulation to alter the program accordingly, by doing so you can control components and quickly test them without the use of other inputs and icons to help and locate the error and improve the program.
 

Latest revision as of 08:37, 2 July 2019

Simulation debugger.png

The simulation debugger window becomes active during simulation. It is used to monitor the status of the variables in your program and the macros which are being called. Despite it's name, the simulation debugger also supports ICD mode, allowing for the macro call stack and variable values to be read directly from the microcontroller as it runs. It can also be used to pass or receive values of memory locations and registers on board the target microcontroller. This is useful for detecting and troubleshooting call stack overflows and precisely monitor the program as it runs in hardware.

When operating in 'normal speed', variables are not updated live. However, when the simulation is paused, running at a slower speed or 'Step Into' and 'Step Over' are used, the variables are updated.

You can actively change the speed of the simulation using the slider at the top left of the Simulation Debugger window, the default simulation speed is 'Normal' where no updating of variables visually occurs. The speed can also be reduced from 50Hz down to 0.25Hz, this will result in the simulation going through each icon individually at the specified speed and variables can be seen to update.


There is also a 'Simulation delay:' section at the top right of the 'simulation debugger' window which displays the length and progress of delays set by Delay icons. This feature alerts you of long delays, to confirm the simulation has not crashed. It also allows users the ability to 'Skip' any delays and move to the next icon.


Changing variable values during Simulation

When simulating, variable values can be changed from the 'simulation debugger' window by clicking on the 'Value' box next to the variable name and inputting a value.


When using ICD Mode, you can still manually adjust variable values to allow you to skip certain elelemts of code.