Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Enable software color processing. Activated by the Auto

[Reset]

Reset the sensor to its power-on state. Activated by the Reset button the DevWare toolbar.

[Demo Initialization]

The recommended register settings for the sensor in the demo environment. Activated by the Init button on the DevWare toolbar.

[DevWare Initialization]

Settings to initialize DevWare and the sensor for the demo environment. If this preset doesn't exist, Demo Initialization is used.

[SensorDemo Initialization]

Settings to initialize SensorDemo (DevWare /DEMO) and the sensor. If this preset doesn't exist, SensorDemo will fall back to DevWare Initialization or Demo Initialization.

[Monochrome Initialization]

Recommended register settings to use for the monochrome version of the sensor.

[Startup Wizard]DevWare will run that instead of the Startup Wizard dialog. Doing that is unconditional, though. There is no way to run Startup Wizard from ini script.

[Viewfinder ON]

Switch into Preview mode. Activated by the Preview button on the DevWare toolbar.

[Viewfinder OFF]

Switch out of Preview mode. Activated by the Preview button on the DevWare toolbar.

[Video Capture ON]

Switch into Video Capture mode. Activated by the Record button on the DevWare toolbar unless Screen capture only (no register changes) is selected on Sensor Control, Video Capture dialog.

[Video Capture OFF]

Switch out of Video Capture mode. Activated when video capture ends, unless Screen capture only (no register changes) is selected on Sensor Control, Video Capture dialog.

[Color Processing ON]

Initialize]

Create a file called prescan.ini and put it in the apps_data directory of the installation directory. In the file have a preset called [Initialize].
[Initialize] will be executed prior to other board initialization and prior to accesses to the sensor board. This works for Demo 2, 2X, 3 and 3X.

Note: There aren't separate initialize preset names per base board type, but it's possible to distinguish between, for example, Demo3 and 3X, with an IF_SERIAL command in the [Initialize] preset.

[Startup Wizard]DevWare will run that instead of the Startup Wizard dialog. Doing that is unconditional, though. There is no way to run Startup Wizard from ini script.

[Viewfinder ON]

Switch into Preview mode. Activated by the Preview button on the DevWare toolbar.

[Viewfinder OFF]

Switch out of Preview mode. Activated by the Preview button on the DevWare toolbar.

[Color Processing OFF]Disable software color processingVideo Capture ON]

Switch into Video Capture mode. Activated by the Auto Record button on the DevWare toolbar .

[Camera 1]

Select primary sensor on a two-sensor system.

[Camera 2]

Select secondary sensor on a two-sensor system.

[Pre Still Capture]

Activated before a still image capture, unless Current Image unless Screen capture only (no register changes) is selected on Sensor Control, Still Video Capture dialog.

[Post Still Video Capture OFF]

Activated after a still image capture, unless Current Image Switch out of Video Capture mode. Activated when video capture ends, unless Screen capture only (no register changes) is selected on Sensor Control, Still Video Capture dialog.

[Data Types]

Define data types for sensor registers and bitfields. Activated at DevWare startup. Deprecated since the .xsdat files contain this information now.

[Register Tabs]Define the tabs, groups, and controls for the optional "Scripts" version of the Register Dialog.
[Python:]Python code that will be executed automatically when the file is opened in a Presets dialog in DevWare. This is a good place to put import statements, function def statements and any other definitions that may be used by other presets in the file.
[Python: Unload]Python code that will be executed automatically when the Presets dialog is closed (including when DevWare exits).

User-Defined DevWare Presets

You may create your own presets using a text editor, or various tools in DevWare.
The preset name may consist of any combination of ASCII characters (alphanumeric, symbolic, space, etc.) except "[", "]", "," or the sequence "//".
To execute the preset select it in the DevWare Presets dialog and click Load.

Special Preset Name Prefixes

The following preset name prefixes have special meaning.

...

[Toolbar: …]

...

The preset will get a button on the User Toolbar assigned to it. See below.

...

[Toolbar2: …]

...

The preset will get a button on the 2nd User Toolbar assigned to it. See below.

...

[Python: …]

...

The preset contains Python code instead of ini commands. See the DevWare Python Development Guide document.

...

[Hidden: …]

...

The preset will not appear in the DevWare Presets dialog list box. You can leave off the 'Hidden:' part in 83269893= commands. For example 'LOAD=PLL-On' can load [Hidden: PLL-On].

...

[Patch <id>; <color>; <description>]

...

A preset name formatted like this will be recognized as a firmware patch by the Load Patches dialog page of the Sensor Control dialog.
<id> is the patch ID, usually four hex digits.
<color> is one of "critical", "recommended", "feature-recommended", "feature recommended", "customer", "customer-specific", "customer specific".
<description> is a short text description of the patch.

...

If the name of a preset begins with "Toolbar:" or "Toolbar2:" then DevWare will create a button on the corresponding User Toolbar that executes the preset. The remainder of the preset name after "Toolbar:" or "Toolbar2:" will be used as the button label. You can further define the characteristics and behavior of the toolbar button with the 83269893=, 83269893=, 83269893= and SHORTCUT= special commands.
The maximum number of buttons on a User Toolbar is 20.

...

Example: Menu button
[Toolbar: Quick Zoom]
ICON= zoom.ico
TOOLTIP= "Select a Display Zoom setting"
MENUITEM= "1/4", LOAD= Zoom.25X, RADIO= STATE:Display Zoom Percent == 25
MENUITEM= "1:1", LOAD= Zoom1X, RADIO= STATE:Display Zoom Percent == 100
MENUITEM= "4X", LOAD= Zoom4X, RADIO= STATE:Display Zoom Percent == 400
[Zoom.25X]
STATE= Display Zoom Percent, 25
[Zoom1X]
STATE= Display Zoom Percent, 100
[Zoom4X]
STATE= Display Zoom Percent, 400

List of INI Commands

...

Command

...

Definition

...

83269893

...

Write a value to a bitfield of a register.

...

83269893

...

Define the data type and optional valid range of a named register or bitfield.

...

83269893

...

Delay a certain amount of time (in milliseconds) before continuing.

...

83269893

...

Output an error message and stop execution if a condition is met.

...

83269893

...

Write a value to a sensor register on the first attached camera.

...

83269893

...

Write a value to a sensor register on the second attached camera.

...

83269893

...

Write to a register or bitfield by name. Command works for any kind of register, variable or SFR.

...

83269893

...

Define the icon for a User Toolbar button.

...

83269893

...

Similar to LOAD, but conditioned on the value of a register.

...

83269893

...

Similar to LOAD, but conditioned on the value of a register.

...

83269893

...

Similar to IF_REG, but can access any device on the SHiP bus.

...

83269893

...

Set software to expect the given image size and type. Command does not change sensor mode.

...

83269893

...

Load a preset from an ini file.

...

83269893

...

Load a preset from an EEPROM.

...

83269893

...

Add a text string to the Log window.

...

83269893

...

Write a value to an SOC RAM location.

...

83269893

...

Write a value to an 8-bit SOC RAM location.

...

83269893

...

Write a value to a 32-bit SOC RAM location.

...

83269893

...

Define sub-menu items for a User Toolbar button.

...

83269893

...

Set a DevWare Option variable.

...

83269893

...

Poll a register. Similar to DELAY, but conditioned on the value of a register.

...

83269893

...

Poll a register. Similar to DELAY, but conditioned on the value of a register.

...

83269893

...

Poll a variable. Similar to DELAY, but conditioned on the value of a variable.

...

83269893

...

Give the user a multiple-choice dialog, or show a message.

...

83269893

...

Write a value to a register.

...

83269893

...

Write a sequence of register values in one bus transaction.

...

83269893

...

Write image data to files.

...

83269893

...

Write register values to a file.

...

83269893

...

Set or detect the sensor SHiP base address.

...

83269893

...

Low-level write to Two-Wire Serial Interface register.

...

83269893

...

Write a value to a special function register, on certain sensors.

...

83269893

...

Write a value to an 8-bit special function register, on certain sensors.

...

83269893

...

Define a keyboard shortcut for a User Toolbar button.

...

83269893

...

Set a variable within the software, not on the sensor.

...

83269893

...

Define a tooltip for a User Toolbar button.

...

83269893

...

Write a value to a firmware variable.

...

83269893

...

Write a value to a 32-bit firmware variable.

...

83269893

...

Write a value to an 8-bit firmware variable.

...

83269893

...

Set the XMCLK (sensor external clock) frequency.

Command Syntax

...

BITFIELD = [<page>,] <address>, <mask>, <value> //<comment>
Write a value to a bitfield of a register.
Example: for register 0xC3 on page 2, set bit 5 to 1
BITFIELD= 2, 0xC3, 0x0020, 1DATATYPE = <register name>, [<bitfield name>,] <type> [, RANGE= <min>:<max>] //<comment>
Defines a data type and optional valid range for a register or bitfield. The data type is used by DevWare when displaying the value in decimal format in the Registers window and Watch window. The range is used for the slider control on the Registers window.
Possible values for <type> are: unsigned, signed (2's complement), signmag (sign-magnitude), fixed1fixed32 (2's complement fixed-point), ufixed1ufixed32, float16, float (IEEE single precision).
Example: RED_GAIN register has five fractional bits.
DATATYPE = RED_GAIN, ufixed5
Example: CAM_HUE_ANGLE is signed and ranges from -22 to 22.
DATATYPE= CAM_HUE_ANGLE, signed, RANGE= -22:22DELAY = <milliseconds> //<comment>
Valid value range is 1 to 5000.
Delay a certain amount of time (in milliseconds) before continuing.
Example: Delay 1000 milliseconds.
DELAY = 1000 //delay 1000 millisecondsERROR_IF = <register name>, [<bitfield name>,] <condition>, "<message>" //<comment>
Only <, <=, ==, !=, >, >= are supported for <condition>.
If the condition is true, show the message in an error dialog. The user may choose to continue executing the preset or stop. (The midlib2 mi_LoadINIPreset() call will output a message to the log file if logging is on, and stop executing the preset.)
Example: Read register SEQ_STATE, if it is not equal to 3 show the message "Not in preview mode".
ERROR_IF= SEQ_STATE, !=3, "Not in preview mode."FAR1 = <page>, <address>, [<mask>,] <value> //<comment>
Write to a register on the first attached camera. The <page> parameter is required. If the sensor doesn't use paged register addressing use 0 for the page number.
The optional mask parameter lets you set a bitfield, like the BITFIELD command.
Example: Set bit 5 in register 0x3044 on the attached camera
FAR1= 0, 0x3044, 0x0020, 1FAR2 = <page>, <address>, [<mask>,] <value> //<comment>
Write to a register on the second attached camera. The <page> parameter is required. If the sensor doesn't use paged register addressing use 0 for the page number.
The optional mask parameter lets you set a bitfield, like the BITFIELD command.
Example: Set bit 5 in register 0x3044 on the attached camera
FAR2= 0, 0x3044, 0x0020, 1FIELD_WR = <register name>, [<bitfield name>,] <value> //<comment>
Write to a register or bitfield by name. Command works for any kind of register, variable or SFR.
Example: Set "SEQ_CAP_MODE" variable to 0.
FIELD_WR = SEQ_CAP_MODE, 0 //capture parameters, VIDEO OffICON = <icon name> [,CHECKED|RADIO= <register name>[:<bitfield name>]|STATE:<STATE variable> <condition>] [,ENABLED= <register name>[:<bitfield name>|:<mask>]|STATE:<STATE variable> <condition>]  //<comment>

Color Processing ON]

Anchor
BITFIELDBITFIELD
Anchor
DATATYPEDATATYPE
Anchor
DELAYDELAY
Anchor
ERROR_IFERROR_IF
Anchor
FAR1FAR1
Anchor
FAR2FAR2
Anchor
FIELD_WRFIELD_WR
Anchor
ICONICON

Enable software color processing. Activated by the Auto button on the DevWare toolbar.

[Color Processing OFF]

Disable software color processing. Activated by the Auto button on the DevWare toolbar.

[Camera 1]

Select primary sensor on a two-sensor system.

[Camera 2]

Select secondary sensor on a two-sensor system.

[Pre Still Capture]

Activated before a still image capture, unless Current Image is selected on Sensor Control, Still Capture dialog.

[Post Still Capture]

Activated after a still image capture, unless Current Image is selected on Sensor Control, Still Capture dialog.

[Data Types]

Define data types for sensor registers and bitfields. Activated at DevWare startup. Deprecated since the .xsdat files contain this information now.

[Register Tabs]Define the tabs, groups, and controls for the optional "Scripts" version of the Register Dialog.
[Python:]Python code that will be executed automatically when the file is opened in a Presets dialog in DevWare. This is a good place to put import statements, function def statements and any other definitions that may be used by other presets in the file.
[Python: Unload]Python code that will be executed automatically when the Presets dialog is closed (including when DevWare exits).


User-Defined DevWare Presets

You may create your own presets using a text editor, or various tools in DevWareX.
The preset name may consist of any combination of ASCII characters (alphanumeric, symbolic, space, etc.) except "[", "]", "," or the sequence "//".
To execute the preset select it in the DevWare Presets dialog and click Load.

Special Preset Name Prefixes

The following preset name prefixes have special meaning.

[Toolbar: …]

The preset will get a button on the User Toolbar assigned to it. See below.

[Toolbar2: …]

The preset will get a button on the 2nd User Toolbar assigned to it. See below.

[Python: …]

The preset contains Python code instead of ini commands. See the DevWare Python Development Guide document.

[Hidden: …]

The preset will not appear in the DevWare Presets dialog list box. You can leave off the 'Hidden:' part in 83269893= commands. For example 'LOAD=PLL-On' can load [Hidden: PLL-On].

[Patch <id>; <color>; <description>]

A preset name formatted like this will be recognized as a firmware patch by the Load Patches dialog page of the Sensor Control dialog.
<id> is the patch ID, usually four hex digits.
<color> is one of "critical", "recommended", "feature-recommended", "feature recommended", "customer", "customer-specific", "customer specific".
<description> is a short text description of the patch.


Anchor
User-Defined DevWare Toolbar Buttons
User-Defined DevWare Toolbar Buttons
User-Defined DevWare Toolbar Buttons

If the name of a preset begins with "Toolbar:" or "Toolbar2:" then DevWare will create a button on the corresponding User Toolbar that executes the preset. The remainder of the preset name after "Toolbar:" or "Toolbar2:" will be used as the button label. You can further define the characteristics and behavior of the toolbar button with the 83269893=, 83269893=, 83269893= and SHORTCUT= special commands.
The maximum number of buttons on a User Toolbar is 20.


Example: Simple button
[Toolbar: Zoom 1X]
ICON= zoom.ico
TOOLTIP= "Restore the display zoom to 1X"
SHORTCUT= Ctrl+1
STATE= Display Zoom Percent, 100

Example: Menu button
[Toolbar: Quick Zoom]
ICON= zoom.ico
TOOLTIP= "Select a Display Zoom setting"
MENUITEM= "1/4", LOAD= Zoom.25X, RADIO= STATE:Display Zoom Percent == 25
MENUITEM= "1:1", LOAD= Zoom1X, RADIO= STATE:Display Zoom Percent == 100
MENUITEM= "4X", LOAD= Zoom4X, RADIO= STATE:Display Zoom Percent == 400
[Zoom.25X]
STATE= Display Zoom Percent, 25
[Zoom1X]
STATE= Display Zoom Percent, 100
[Zoom4X]
STATE= Display Zoom Percent, 400

List of INI Commands


Command

Definition

BITFIELD

Write a value to a bitfield of a register.

DATATYPE

Define the data type and optional valid range of a named register or bitfield.

DELAY

Delay a certain amount of time (in milliseconds) before continuing.

ERROR_IF

Output an error message and stop execution if a condition is met.

FAR1

Write a value to a sensor register on the first attached camera.

FAR2

Write a value to a sensor register on the second attached camera.

FIELD_WR

Write to a register or bitfield by name. Command works for any kind of register, variable or SFR.

ICON

Define the icon for a User Toolbar button.

IF_FIELD

Similar to LOAD, but conditioned on the value of a register.

IF_REG

Similar to LOAD, but conditioned on the value of a register.

IF_SERIAL

Similar to IF_REG, but can access any device on the SHiP bus.

IMAGE

Set software to expect the given image size and type. Command does not change sensor mode.

LOAD

Load a preset from an ini file.

LOAD_PROM

Load a preset from an EEPROM.

LOG

Add a text string to the Log window.

MEM

Write a value to an SOC RAM location.

MEM8

Write a value to an 8-bit SOC RAM location.

MEM32

Write a value to a 32-bit SOC RAM location.

MENUITEM

Define sub-menu items for a User Toolbar button.

OPTION

Set a DevWare Option variable.

POLL_FIELD

Poll a register. Similar to DELAY, but conditioned on the value of a register.

POLL_REG

Poll a register. Similar to DELAY, but conditioned on the value of a register.

POLL_VAR

Poll a variable. Similar to DELAY, but conditioned on the value of a variable.

PROMPT

Give the user a multiple-choice dialog, or show a message.

PYTHONInvoke a one-line Python statement.

REG

Write a value to a register.

REG_BURST

Write a sequence of register values in one bus transaction.

SAVE_IMAGE

Write image data to files.

SAVE_REGS

Write register values to a file.

SENSOR_BASE

Set or detect the sensor SHiP base address.

SERIAL_REG

Low-level write to Two-Wire Serial Interface register.

SFR

Write a value to a special function register, on certain sensors.

SFR8

Write a value to an 8-bit special function register, on certain sensors.

SHORTCUT

Define a keyboard shortcut for a User Toolbar button.

STATE

Set a variable within the software, not on the sensor.

TOOLTIP

Define a tooltip for a User Toolbar button.

VAR

Write a value to a firmware variable.

VAR32

Write a value to a 32-bit firmware variable.

VAR8

Write a value to an 8-bit firmware variable.

XMCLK

Set the XMCLK (sensor external clock) frequency.


Command Syntax


Note: [ ] items are optional.

Anchor
BITFIELD
BITFIELD
BITFIELD = [<page>,] <address>, <mask>, <value> //<comment>

Write a value to a bitfield of a register.

Example: for register 0xC3 on page 2, set bit 5 to 1
BITFIELD= 2, 0xC3, 0x0020, 1


Anchor
DATATYPE
DATATYPE
DATATYPE = <register name>, [<bitfield name>,] <type> [, RANGE= <min>:<max>] //<comment>

Defines a data type and optional valid range for a register or bitfield. The data type is used by DevWare when displaying the value in decimal format in the Registers window and Watch window. The range is used for the slider control on the Registers window.

Possible values for <type> are: unsigned, signed (2's complement), signmag (sign-magnitude), fixed1fixed32 (2's complement fixed-point), ufixed1ufixed32, float16, float (IEEE single precision).

Example: RED_GAIN register has five fractional bits.
DATATYPE = RED_GAIN, ufixed5
Example: CAM_HUE_ANGLE is signed and ranges from -22 to 22.
DATATYPE= CAM_HUE_ANGLE, signed, RANGE= -22:22


Anchor
DELAY
DELAY
DELAY = <milliseconds> //<comment>

Valid value range is 1 to 5000.

Delay a certain amount of time (in milliseconds) before continuing.

Example: Delay 1000 milliseconds.
DELAY = 1000 //delay 1000 milliseconds


Anchor
ERROR_IF
ERROR_IF
ERROR_IF = <register name>, [<bitfield name>,] <condition>, "<message>" //<comment>

Only <, <=, ==, !=, >, >= are supported for <condition>.

If the condition is true, show the message in an error dialog. The user may choose to continue executing the preset or stop. (The midlib2 mi_LoadINIPreset() call will output a message to the log file if logging is on, and stop executing the preset.)

Example: Read register SEQ_STATE, if it is not equal to 3 show the message "Not in preview mode".
ERROR_IF= SEQ_STATE, !=3, "Not in preview mode."


Anchor
FAR1
FAR1
FAR1 = <page>, <address>, [<mask>,] <value> //<comment>

Write to a register on the first attached camera. The <page> parameter is required. If the sensor doesn't use paged register addressing use 0 for the page number.

The optional mask parameter lets you set a bitfield, like the BITFIELD command.
Example: Set bit 5 in register 0x3044 on the attached camera
FAR1= 0, 0x3044, 0x0020, 1


Anchor
FAR2
FAR2
FAR2 = <page>, <address>, [<mask>,] <value> //<comment>

Write to a register on the second attached camera. The <page> parameter is required. If the sensor doesn't use paged register addressing use 0 for the page number.

The optional mask parameter lets you set a bitfield, like the BITFIELD command.
Example: Set bit 5 in register 0x3044 on the attached camera
FAR2= 0, 0x3044, 0x0020, 1


Anchor
FIELD_WR
FIELD_WR
FIELD_WR = <register name>, [<bitfield name>,] <value> //<comment>

Write to a register or bitfield by name. Command works for any kind of register, variable or SFR.

Example: Set "SEQ_CAP_MODE" variable to 0.
FIELD_WR = SEQ_CAP_MODE, 0 //capture parameters, VIDEO Off


Anchor
ICON
ICON
ICON = <icon name> [,CHECKED|RADIO= <register name>[:<bitfield name>]|STATE:<STATE variable> <condition>] [,ENABLED= <register name>[:<bitfield name>|:<mask>]|STATE:<STATE variable> <condition>]  //<comment>

Defines the icon image and button state for a User Toolbar button in DevWare. Only takes effect if the preset name begins with “Toolbar:” or “Toolbar2:”.

If the <icon name> contains a dot “.” character, it's interpreted as a filename with a path relative to the ini file. The icon file can be a .ico or a .bmp (24x24 pixels, 32-bpp, R-G-B-alpha) file.

Example: Load icon from file zoom.ico.
ICON = zoom.ico

Otherwise the name specifies a built-in icon image. The built-in images are different colored shapes. Specify the shape and color. The shapes are circle, square, triangle and star. The colors are black, brown, red, orange, yellow, green, blue, violet, gray and white.

Example: Use a built-in icon image.
ICON= green square.

Optionally you can define the 'checked' (pressed-in) and enabled (not grayed out) state for the button, based on the value of a register, bitfield or DevWare STATE variable. The <condition> can be ==, !=, <, >, <=, or >= followed by a numerical constant. Use the RADIO keyword for a group of mutually exclusive buttons. Use the CHECKED keyword for independent buttons.

Example: Load icon from file antishake.bmp, and declare that the button should be pressed-in when SEQ_STATE_CFG_2_AS equals 1 and not pressed otherwise.
ICON= antishake.bmp, CHECKED= SEQ_STATE_CFG_2_AS == 1

Example: Load icon from file Zoom1.bmp, and declare that the button should be pressed-in when the DevWare STATE variable Display Zoom Percent equals 100.
ICON= Zoom1.bmp, CHECKED= STATE:Display Zoom Percent == 100

See also the MENUITEM= and TOOLTIP= commands.

...

Anchor
STATE
STATE
STATE = <state>, <value> //<comment>

Set a variable within the software, not on the sensor. See State STATE Variables for a list of supported states.

Example: Set Auto Exposure Target to 50
STATE= Auto Exposure Target, 50

...