Managing Connections¶
Once the project has been created, and an appropriate device is selected, the device needs to be configured and connections needs to be established.
Device Configuration¶
In order to configure the device, invoke Configure Device command. This command can be invoked in two different ways. First, it is possible to access it from the Project Explorer, by right clicking on the item representing the device and choosing the appropriate command. Second, it is possible to select Configure All Devices command from the Ribbon Menu of the Main Window.
The difference between the two options is noticeable only when there are more than one selected device. By invoking the command from the project explorer, it is possible to configure one particular device. On the other hand, by invoking the Configure All Devices command from the Ribbon, one attempts to configure all devices at once.
Once the command is invoked, the following Configure Device Dialog is prompted to the user enabling selection of actual device. Once the device is configured, further actions can be performed.

Configure Device dialog, enabling selection of the appropriate device, and configuring connection parameters.¶

The look of the PowerDesk Main Window after configuration has been successfully performed. The panes have been layout carefully so that all major components of PowerDesk are visible.¶
The only notification of successful configuration is a success message in the Diagnostics Pane. It is important to realize that no actual connection to the device is attempted at this point. This will happen once we invoke the Connect command.
Connecting to Device¶
In order to connect to the device, invoke Connect command. This command can be invoked in two different ways. First, it is possible to access it from the Project Explorer, by right clicking on the item representing the device and choosing the appropriate command. Second, it is possible to select Connect To All Devices command from the Ribbon Menu of the Main Window.
The difference between the two options is noticeable only when there are more than one selected device. By invoking the command from the project explorer, it is possible to establish connection to one particular device. On the other hand, by invoking the Configure All Devices command from the Ribbon, one attempts to connect to all devices at once.

The look of the PowerDesk Main Window after connection to the device has been successfully established.¶
Successful connection to a device is followed by a number of success messages displayed in the Diagnostics Pane. Note also that device status has been updated, in the Diagnostic Pane and in the Project Explorer. Also note the green led-like bulb followed by the green No Error
message in both panes.
Note that it is possible that an error message appears instead of the No Error
one (in which case the bulb will be red, not green). These messages do not originate from the control code running on DSP, but from the communication chip, and are related to the LARA-100
hardware. If the invertor is not properly powered, which may be a completely regular situation, a software may signal an error at this point.
Validating the Connection¶
In order to validate the connection with the control code, it is necessary to load a Variable Definition File first. In order to do so, right click on the Variable description file has not been specified
field below the device name in the Project Explorer.
The variable description file (VDF
) contains all variable definitions used by the DSP code. Three different types of files can be used as VDF
s: OUT
and MAP
files generated by the compiler, or XML
files which are generated by the ofg6x
tool. Whatever file type one chooses, variable definitions will be loaded, and it is possible to proceed using the PowerDesk for controlling the system.
As soon as a VDF
is selected, the PowerDesk will regularly query for the value of the variable called Perun_Flags. This variable contains indications of errors which are seen by the DSP software. Evaluation of this variable serves as a kind of a hart-beat of the software, because every read request and every subsequent acknowledge from the LARA-100
DSP will be shown in the Diagnostics Pane.

The look of the PowerDesk Main Window after connection to the device has been successfully established and VDF
file has been selected. Note the interleaved messages saying Message sent to device (green) and Device acknowledge (blue) in the Diagnostics Pane.¶
Flags_Perun and Error Handling¶
Flags_Perun is a 32-bit variable that enables the users to specify different kinds of errors that may emerge during DSP
processing. In the error-free case, all bits are zero. Every non-zero bit indicates a specific error. The meaning of each error bit can be defined by invoking the Specify User-Defined Errors dialog, which can be invoked by right clicking on the device name in the Project Explorer and invoking Configure Errors command.

Specify User-Defined Errors dialog, with only the first error bit specified.¶
For each error bit, one can specify error name, which should be short but clear indication of the error type, and a longer error description.
In case an error occurs, this will be indicated in the Diagnostics Pane. Since the Flags_Perun is being polled approximately twice each second, a new error message will be inserted into the Diagnostic Pane with roughly the same frequency, as long as the error is present.

Main Window when Flags_Perun variable is set to 0x01. Note that the diagnostics pane issuing an error message (red) each-time a new value of Flags_Perun is received.¶
Disconnecting from a Device¶
Once the connection to a device has been established, the Connect to All Devices Command is replaced by Disconnect from All Devices in the Ribbon Menu of the Main Window.
In order to disconnect from the device, invoke Disconnect Command. This command can be invoked in two different ways. First, it is possible to access it from the Project Explorer, by right clicking on the item representing the device and choosing the appropriate command. Second, it is possible to select Disconnect from All Devices command from the Ribbon Menu of the Main Window.
The difference between the two options is noticeable only when there are more than one selected device. By invoking the command from the project explorer, it is possible to disconnect from each particular device. On the other hand, by invoking the Disconnect from All Devices command from the Ribbon Menu, one attempts to disconnect from all devices at the same time.