Run the Demonstration - ArrowElectronics/Reconfigurable-Industrial-Robotics-Platform GitHub Wiki
This section details the basic use of the Windows executable for the Motor Control GUI applications. It describes the steps taken to connect to a board over the serial port, starting the motor, and the options available to the user.
There are two (2) methods of running the demo GUI:
- Using an executable "MotorControlGUI.exe" on Windows (preferred / simpler method)
- Using a Python script/GUI (more customizable / advanced method)
Regardless of the above method used, the first step is to download the repository folder by following the steps below. This downloads an archive containing the necessary application software.
- Click the link ArrowCMR
- Click the green Code button and select Download ZIP as shown below.
- Unzip the downloaded ArrowCMR-main.zip to your preferred location.
- Prior to running the demo, the micro-SD Card needs to be plugged in, the board needs to be powered up and a Micro-USB cable connected between the PC and the board's USB DEBUG (J3) connector.
If using the Python GUI instead of the Windows EXE GUI, refer to the Further Python Setup instructions before continuing with the "Using the ADI Motor Control GUI" instructions on this page.
- Use the provided Windows MotorControlGUI.exe to launch the Demo GUI.
- Open a Windows Explorer window
- go to the unzipped repository folder ArrowCMR-main/MotorControlGUI/Executable
- double-click MotorControlGUI.exe (May take a few seconds to open)
Regardless if you are using the Windows EXE GUI or the Python GUI, the following instructions explain the process of connecting to the platform.
The ADI Motor Control GUI is shown below:
Note: In some cases the board may not be recognized as a COM port and the FTDI device driver may need to be installed. To install the driver, visit FTDI. Then locate, download, and install the CDM21236_Setup.zip file.
Once the application launches, the first step is to connect to the board. In the Serial Connection frame, there is a dropdown, which contains a list of all available Serial Ports on the computer, and a connect button. Select the port (may take a few seconds to populate) of the board (which can be found on a Windows machine in Device Manager) and click connect. If a connection is correctly established, the connect button turns green and now displays the text Disconnect. You can disconnect from the board either by clicking this button or simply by closing the window.
Note: The RPM must be set to 0 when the Start button is pressed.
Click Start to begin motor operation with the default configuration (Mode 1). To change the speed, simply move the slider, or enter a specific value in the motor text field. If the motor does not rotate, ensure that you have correctly connected, and that the motor and carrier board are being powered correctly.
When you have finished using the motor, ensure that the motor is stopped before closing the program.
A number of modes of motor operation are available within this application. These are predefined configuration which are sent to the motor to demonstrate the effect of a correctly tuned SINC filter. The description of these modes is as follows:
- Mode 1: Closed loop FOC with optimum settings of flushing SINC filter
- Mode 2: Open loop control with optimum settings of flushing SINC filter
- Mode 3: Open loop control with optimum settings of continuously operating SINC filter
- Mode 4: Open loop control with non-optimum settings of continuously operating SINC filter
These descriptions are also available within the application by simply moving the cursor over each of the mode buttons for a short time.
The Enable Plot option interacts with the plot to toggle the plotting of SINC filter current data. Selecting this option sends a message to the motor to continuously send frames of SINC filter data to the application, which by default is plotted in scaled float format. As this option starts communication to the motor, commands to start, stop and change motor speed are disabled while this option is selected.
Log Data can be enabled while data is being plotted and continuously logs the last frame of data from the motor. Data are stored in the text file logfile.log residing in the same folder as the Executable file.
FFT is an option which plots the Fast Fourier Transform of the motor current data. This replaces the Current-against-time data and instead plots Current-against-frequency.
The Hold Frame option is used alongside the FFT plot, by saving a freeze-frame of the current FFT data. This allows the user to compare data from one mode to another. As the motor cannot update its mode while it is running the process for displaying one mode against another is as follows:
- Select initial desired mode (e.g. Mode 2)
- Start the motor
- Set the motor’s speed to some value (e.g. 250 RPM)
- Enable the motor plot
- Press the Hold Frame button to freeze-frame the current data.
- Stop the motor plot, and then stop the motor
- Select a new mode (e.g. Mode 4)
- Start the motor and set its speed to the same value (e.g. 250 RPM)
- Select Enable Plot
- The new mode is displayed and can be compared to the freeze-frame of the previous mode
- The Hold Frame command can be used to compare any number of modes
- Use the Clear Frame command to clear all frozen frames of data
An example of the FFT with Hold Frame is shown in the figure below. This plot was obtained by first running the motor in Mode 2 at 250 RPM (Frame 1 Mode 2: U, V) and second by running the motor in Mode 4 at 250 RPM (Phase U, Phase V). Notice how Mode 4 shows significant more noise ~3200Hz due to incorrect alignment of the SINC filter impulse response.
The Down Sample option consists of an entry box and a submission button. The entry box takes an integer argument and updates the motor down sampling factor by this amount. This increases the sampling time for individual data points. Essentially, this multiplies the base timescale of the data (0.02 seconds) by the down sampling factor, to show data over a longer period of time. The number of data samples remains the same (200).
Return to Build the Example Design
| Information on this site was obtained from |
|