SFX files

General description

You can use CannyLab IDE to create standalone executable EXE files. These files contain controller firmware and (optionally) a function diagram. They are used for quick and easy-to-follow controller configuration when deploying your programs, as well as for uploading software to the controller. We will refer to these files as software and function diagram upload utilities or SFX files (self-flashing files).

Creating SFX files

Call the SFX file creation wizard by selecting the Tools -> Create SFX item in the menu bar.

SFX creation wizard.

Specify the full path to the .ccx firmware file for your controller in the appropriate field.

Note: SFX files will always use the currently open diagram file. The controller type doesn’t need to be specified separately, as it is defined by the firmware file.

The “Comment” tab is used to enter and edit a text message that’s displayed when running the resulting SFX file. This may be information about the files included in it, their versions and names, brief instructions on the use of the firmware update utility, information about the purpose of user-defined parameters if any are used, a brief description of the functions implemented by the software.

The “Settings” tab is used for specifying the names, types and, where applicable, available values, of the parameters that the user will be able to configure when running the SFX file.

Settings tab.

The maximum number of parameters available for user configuration is 16. When creating an SFX file, you need to specify the display name and type for each parameter. The two available types are “Number” and “List.” To enable a parameter, click it in the column on the left and then tick the checkbox in the right panel.

When launching an SFX file, the end user will be able to configure a “number” type parameter by specifying a numeric value. A “list” type parameter will be configured by choosing an item from a drop-down list. Available list items are configured when creating the SFX file.

The newly created SFX file can be transferred to any storage medium, emailed or published on the Internet, and finally downloaded and used by the end user for flashing and setting up controller parameters without the use of any additional software.

Attention! Despite their absolute harmlessness, SFX files created by CannyLab have a structure that’s atypical for Windows, which might be found suspicious by some antivirus software. Antivirus software may throw a warning or even delete or quarantine the SFX file when attempting to create or access it. If run into this problem, exclude the SFX file from your antivirus scanning operations or mark it as an exception. The exact process depends on your antivirus software.

After setting up the SFX file parameters, click ** Create ** to save the resulting executable file to your disk drive.

Attention! The system software (.ccx) and diagram (.cfd) files designed for a specific type of controller are incompatible with other types of controllers and can not be used with them. If the controller type as defined by the firmware doesn’t match the controller type of the function diagram, no function diagram will be created and an error message will be displayed.

SFX file creation error.

If the name of the newly created file matches an existing file in the directory you are saving to, you will see the following confirmation prompt:

Overwrite confirmation.

When the SFX file is created, the following window is displayed:

SFX file created successfully.

The Export button saves both the comment and the SFX parameters to a text file. This file can later be used to import all the set options when creating an SFX file in the future, to avoid re-entering data.

Using SFX files

After launching the executable SFX file you will see that the comment is displayed on the left side of the window, while the status bar and configurable parameters are displayed on the right.

Uploader window.

The comment field contains the comment written during creation of the SFX file.

The parameter area is used for configuring parameter values. Number-type parameters are typed in, list-type parameters are selected from a drop-down list. If no parameters were specified for use during the creation of the SFX file created, this area will be empty.

User-defined parameter values will be available to the functional diagram in registers named User Preprogrammed Parameter XX after the controller is flashed, where XX is the number of the parameter.

Note: A large enough comment or a large number of parameters can not fit into the corresponding window panel in their entirety. Use the appropriate scroll bar for navigation.

To upload the configured parameter values and software contained in the SFX file into the controller, unplug the controller from its external power supply and connect it to the PC via a standard miniUSB cable, the controller’s green LED will light up. If it’s the first time the controller has been connected, Windows will report the discovery of a new standard device and automatically install the driver for it.

Prior to establishing communication with the controller the message The device is not connected will be displayed in the status bar and the button Write will not be available.

After the connection is established successfully, the controller Green LED will start blinking, the status bar will display Ready to record: ID:XXXXXXXX-xxxx’’ and the button Write will become active. XXXXXXXX is the unique ID number of your CANNY controller and xxxx is the vendor ID.

Write status window (Ready to write).

Note: In order to avoid issues and errors while working with the utility, do not run multiple SFX files or connect more than one controller to the PC at a time

To begin uploading software to the controller, click Write. The status bar will display the progress of the upload process.

Upon successful completion of the software upload, the status bar will display Write complete.

Write status window (Write complete).

If the software recording process is interrupted by user or an error occurs, the status bar will show the message There was a write error. In this case, the uploading process needs to be repeated.