FAQ
For questions not answered in this FAQ or if you require additional support using SimWB, please contact us at support@ccur.com.
Contents
General Questions
What are the system requirements for SimWB?
Please see Installation Prerequisites.
Is there a 64 bit version of SimWB?
Yes, there is a 64 bit version of SimWB which can be installed on the 64 bit RedHawk Operating System.
Does SimWB support 32 and 64 bit MATLAB on Windows and Linux?
Yes, SimWB supports both 32 and 64 bit MATLAB on Windows as well as Linux. SimWB has a small MATLAB/Simulink footprint so SimWB is easily made compatible with the latest version of MATLAB/Simulink offered by the MathWorks.
Using SimWB
SimWB Control Center
How can I build custom HMI's in SimWB?
How do I create test in SimWB?
How do I create a test session in SimWB?
How do I record a test in SimWB?
How do I playback a test in SimWB?
SimWB Toolkit for MATLAB
How does SimWB fit into Model Based Design
For additional details please see SIMulation Workbench Toolkit.
What is the SimWB Toolkit for MATLAB?
Please see SIMulation Workbench Toolkit.
How do I create a RTDB from a Simulink model?
Please see SIMulation_Workbench_Toolkit#RTDB_Creator_Tab
How are subsystem inports and outports handled during SimWB compliant code generation from the SimWB Toolkit?
Inports and Outports are different from other Sources and Sinks in Simulink because they behave differently inside and outside of Simulink subsystems. Subsystem inports and inports have to be connected to other blocks in the subsystem one level higher until we reach the root level (bdroot) of the model. At the root level, inports and outports are indicative of signals external to the Simulink model (i.e they come from the outside world). During SimWB compliant code generation the user can choose the following options:
- Map using block names
- Map "SW" prefixed blocks
If the user chooses the first option i.e. Map using block names, inports and outports are picked up only from the root level(bdroot) to be replaced by RTDB variables in the SimWB compliant generated code. All inports and outports within subsystems are ignored and will not be mapped to RTDB variables. If the user chooses the second option i.e. Map "SW" prefixed blocks, inports and outports with the SW prefix are picked up irrespective of which subsystem they are in within the model. For example, lets consider the model shown here.
The SW prefixed inport "SWin1" is picked and replaced by a RTDB variable during SimWB compliant code generation since we are telling RTW that the "SWin1" port data is essentially going to come from an external source. The RTW engine sees this during code generation and infers that the Sine Wave source block is no longer connected to the "SWin1" port for code generation purposes and so the Sine Wave block is optimized out of the generated code. During code generation, you will see a warning which is expected.
Warning: Unconnected output line found on 'testinports/Sine Wave' (output port: 1)
The following is a snippet of the generated code and we can see that the inport "SWin1" is now mapped to a RTDB variable "in1" which is a part of the the cvtTable structure. There is no mention of the "Sine Wave" block as it has been optimized out during the code generation process.
/* Model output function */ static void testinports_output(int_T tid) { /* local block i/o variables */ real_T rtb_SWin1; /* M-S-Function: '<S1>/SWin1' */ /* M-S-Function Block: <S1>/SWin1 */ rtb_SWin1 = cvtTable.in1 ; /* Gain: '<S1>/Gain' */ testinports_B.Gain = testinports_P.Gain_Gain * rtb_SWin1; /* M-S-Function: '<Root>/SWScope' */ /* M-S-Function Block: <Root>/SWScope */ cvtTable.Scope = testinports_B.Gain; /* tid is required for a uniform function interface. * Argument tid is not used in the function. */ UNUSED_PARAMETER(tid); }
SimWB I/O
Is there a list of I/O supported by SimWB?
Please see Wide selection of COTS I/O boards.
Troubleshooting
How do I debug my source code in SimWB?
Debugging source code under SimWB
SimWB provides the ability to debug models using KDbg. The following steps are needed to start the debugger from SimWB.
- First re-make the code with the –g flag. This is done by modifying the make file in the source code folder on the real-time host. For example:
- Go to "/usr/local/ccursim/projects/RTW.Sources/modelname_ccurt" folder where "modelname" is the name of the model.
- Edit the "modelname.mk" file
- In the General User Options add the –g flag. Approximately line 153 in the MAKE file should now read OPTS = -g
- Use the commands "make –f modelname.mk clean" and "make –f modelname.mk" to remake the model.
- In the SimWB Control Panel start the Run/Playback test GUI
- In the Test Control GUI select the test with the model that was compiled with the –g flag.
- Press the CTRL key on the keyboard and left click the mouse on the Start button. This will open a menu with the NightTrace and the Debug option
- Hover the mouse over the Debug option and this will display a list of User Tasks and System Tasks which one can debug.
- Select the model that you want to debug from the User Tasks list. Upon selection of the model the KDbg GUI will open and stop in the ccurrt_mainC.c file for this model. If the debugger stops in the schedutils.c task it is an indicator that you need to remake the source with the –g file.
- Now you can place debug points in the source code to debug the model. The model is called by the rt_OneStep() function.