This subdirectory is defined by the scriptdir keyword in the /etc/ccursim.conf file and contains all the Script user programs.
All the files that make a single script program are stored in a directory with the same name as the script program. The name of the script program executable must also have the same name. This is how the scheduler will execute the program at test start up. There must be a Makefile in the script’s directory that will compile and create the executable upon invocation of the make without additional argument. The local Makefile includes a Makefile in the Script directory above to set proper environment variables for header file includes and library paths.
This subdirectory is defined by the rtwdir keyword in the /etc/ccursim.conf file and contains all the RTW user programs. The executable for a RTW model is stored in its own directory along with some auxiliary files.
The name of the subdirectory is the name by which the RTW program is known. The name of the RTW program executable must also have the same name. This is how the scheduler will execute the program at test start up. There must be a Makefile in the RTW directory that will compile and create the executable upon invocation of the make without additional argument. The local Makefile includes a Makefile in the RTW directory above to set proper environment variables for header file includes and library paths.
Note: RTW is called Simulink Coder in recent versions of MATLAB. |
This subdirectory is defined by the rtwsourcedir keyword in the /etc/ccursim.conf file and contains the ‘C’ source files generated by RTW. Each individual model is stored in its own directory where the name of the directory is modelenname_ccurrt. The RTW build will create a makefile inside the directory which can be invoked to recreate the executable. The executable will be place in the RTW/modelname directory described above.
This subdirectory is defined by the mdldir keyword in the /etc/ccursim.conf file and contains all the Simulink MDL files corresponding to the individual models used in SimWB. This is where the GUI application expects to find the models when generating ‘C’ sources with MATLAB RTW.
This subdirectory is defined by the usersourcedir keyword in the /etc/ccursim.conf file and contains the source files corresponding to the user programs. Each individual user program is stored in its own directory. When creating a user program from the template in the GUI, a directory is created under UserSources that contains a skeleton source and the Makefile necessary to compile and link the program.
This subdirectory is defined by the userexecdir keyword in the /etc/ccursim.conf file and contains the executable for the user programs. Each individual user program is stored in its own directory.
This subdirectory contains the calibration file for the hardware boards that support calibration. Each board instance has its own file where the file name is defined by BoardID.x where BoardID is the identifier of the board in SimWB and x is the board instance. Board 1 is always the first board of that type in the system. If the calibration file is missing for a particular board instance, no calibration correction will be applied to the input/output values read or written by the hardware I/O tasks.
Calibration entries in the calibration file are similar for all devices and are of the form:
channel=xx,offset=iii.dd,gain=iii.dd
Where xx is the hardware channel on the board and iii.dd is the offset specified in volt units.
In order to be consistent, calibration entries are always specified in term of raw count to voltage even when the board is an output board and you could expect it to be specified in reverse unit.
This subdirectory is defined by the userexecdir keyword in the /etc/ccursim.conf file and contains the wave form files.
The wave form files are used in Control Center to associate an 16AO16 output channel to a wave file. The Control Center can upload wave files to the real-time host.
This subdirectory is defined by the circularlogger_dir keyword in the /etc/ccursim.conf file and contains the data logger circular log files.
The directory contains up to circularlogger_maxfile subdirectories which hold the data logger files for the individual runs. The format of these files is identical to the regular data logger files.
This subdirectory is defined by the rtdbdir keyword in the /etc/ccursim.conf file and contains all the real-time databases created by the user.
Each RTDB consists of several files such as the signal database and the hardware setup files for specific hardware board. The set of those files constitute what SimWB knows as an RTDB.
All the files that make up a real-time database are stored in a subdirectory under the main RTDB directory described above.
The name of each subdirectory is the name of the database.
This file is stored under the /usr/local/ccursim/projects/RTDB directory. It is not part of a particular database but is instead shared by all database configurations. It defines the type and number of I/O devices present in the system. Ultimately, it defines the name and instance number of each board that can be mapped. This file is created by the Control Center GUI using the I/O devices configuration.
Sample file:
boardid=JOYSTICK,boardnum=1,nchannels=1024,nais=0,naos=0,ndigitals=0,ncounters=0,hascalibration=0,type=BADioDir
boardid=CP-FPGA-ENG-NS,boardnum=1,nchannels=0,nais=0,naos=0,ndigitals=0,ncounters=0,hascalibration=0,type=BADioDir
boardid=CP-COS-64,boardnum=1,nchannels=0,nais=0,naos=0,ndigitals=0,ncounters=0,hascalibration=0,type=BADioDir
boardid=CP-FISC,boardnum=1,nchannels=0,nais=0,naos=0,ndigitals=0,ncounters=0,hascalibration=0,type=BADioDir
boardid=CP-KnockSensor,boardnum=1,nchannels=4,nais=0,naos=0,ndigitals=0,ncounters=0,hascalibration=0,type=BADioDir
boardid=CP-MFIO,boardnum=1,nchannels=0,nais=0,naos=0,ndigitals=0,ncounters=0,hascalibration=0,type=BADioDir
boardid=CP-SENT,boardnum=1,nchannels=0,nais=0,naos=0,ndigitals=0,ncounters=0,hascalibration=0,type=BADioDir
boardid=CP-UEGO,boardnum=1,nchannels=4,nais=0,naos=0,ndigitals=0,ncounters=0,hascalibration=0,type=BADioDir
boardid=CP-WSSensor,boardnum=1,nchannels=0,nais=0,naos=0,ndigitals=0,ncounters=0,hascalibration=0,type=BADioDir
There is 1 line of comma separated keyword=value tokens per board instance.
Common tokens include:
boardid
- Defines the board type. For example, CP-FPGA-ENG-NS indicates an instance of the Concurrent FPGA Engine Simulator card.boardnum
- Instance number of the board. The first board instance is 1.nchannels
- Number of hardware channels usable on the board.The following files make up a real-time database. All the database files are ASCII and record-oriented with one line per record. They are all formatted as comma-separated lists of keyword=value pairs.
signal.db
- Contains RTDB items definitions.hardwarerecord.db
- Contains information of RTDB item mappings to I/O devices and channels..group
- Specifies the group name of the user that created the RTDB.euconversions.db
- Contains Engineering Unit conversion definitions.description
- Specifies the RTDB description text. This file must be present in the directory. Maximum number of characters permitted is 255.cvtorder.c
, cvtorder.txt
, cvtorder
- Contains the CVT table order information for the RTDB items.This file defines all the items in the database as well their mapping to an I/O board if any. Each record defines a single item. The first part of the record defines general information about the item. When mapped to a hardware I/O device, the record also points to an entry in the hardwarerecord.db file. When the EU conversion is not a simple linear Ax+B conversion, the record contains the euconversion keyword to point to conversion record in euconversions.db. All the keyword=value must be separated by comma in the file.
Example:
name=ai_000,pointtype=AI,description=Analog+1,cvttype=float,A=0.003,B=0,metaflags=0x000A
Keyword | Value |
---|---|
name |
ASCII string of at most 32 characters. The name must begin with an underscore or letter, and consist of underscores, letters, and digits after that, similar to valid ‘C’ language identifier. |
pointtype |
The RTDB item function type. Specified as one of the following:
|
cvttype |
Specifies the ‘C’ type for the item when stored in the CVT table. Specified as one of the following: |
description |
(Optional) URL-encoded sequence of up to 128 characters describing the item. |
defaultvalue |
(Optional) Numerical value for the default the item is initialized to when the RTDB is loaded into memory when the item is either of analog or digital type. URL encode string of characters for string type items. |
A |
Engineering unit conversion factor (scale) Only applies to analog data items |
B |
Engineering unit conversion factor (offset) |
euconversion |
Points to a EU conversion record in the euconversions.db when the conversion is not defined as simple Ax+B. Only present when the |
eumaxvalue |
Optional and only for analog items. Maximum value in engineering units allowed for the item. |
euminvalue |
Optional and only for analog items. Minimum value in engineering units allowed for the item. |
eumsgperiod |
Optional Number of seconds before engineering unit conversion error messages are repeated. Default is 10 seconds. Those messages are generated by the I/O task associated to the item when the I/O task converts the data item value from/to engineering units to/from raw value. |
Optional units |
URL encoded sequence of up to 12 characters with the engineering unit for the item |
metaflags |
Hexadecimal flag with additional properties for the item. This is an or mask of the following bits: 0x01 (Has EU conversion) 0x02 (Has a default value) 0x04 (Has EU limits) 0x08 (Log the data values to the data logger) 0x20 (Invert the hardware value for Boolean data item) 0x40 (The value is signed) 0x80 (Clamp EU value to eu limits) 0x100 (The point has no alternate value. This is the case for RTW signals & parameters) 0x400 (The item should also be logged in the circular data logger) 0x1000 (The item uses a EU conversion record instead of the simple linear Ax+b conversion) |
loggingperiod |
Period in milliseconds to log the data item. Required when the item is marked for logging by the metaflags bit. |
mappingrecords |
Slash (“/”)-separated list of keys that map to individual records in the hardwarerecord.db file Multiple keys are present when an input RTDB item is mapped to multiple hardware I/O devices. |
The hardwarerecord.db file contains the mapping information for RTDB items defined in the signal.db file. The records in this file are pointed to by the keys defined in the mappingrecords keyword in the signal.db file.
The records are device-specific as the definition of a device channel or access point on the device is particular of that device.
Although the keywords vary according to the hardware that the device specifies, the following keywords must always be present when an item is mapped to an I/O board:
Keyword |
Value |
---|---|
mappingrecord |
Name of this hardware record. Defines the mapping of an item in the signal.db file to this specific record. This name used to refer to this hardware in the signal.db file. |
boardid |
Character string describing the board type the data item is mapped to. For example, CP-FPGA-ENG-NS or CP-MFIO. |
boardnum |
Instance number of the specific board specified by boarded. The first board of any type is always number 1. |
type |
Defines the record as either input (IN) or output (OUT). |
Depending on the board, there can be hardware specifications that the software saves in board-specific files placed in the relevat RTDB folder. The file name format for such files is board_name.board_instance_number. For example, CP-FPGA-ENG-NS.1, where "CP-FPGA-ENG-NS" is the board name and 1 is the board instance number.