Please enable JavaScript to view this site.

Waijung 2 User Guide

Introduction

This tutorial demonstrate how to use Waijung2 ESP32 block set to conduct  testing with External Mode.

External mode testing is a type of software testing used to monitor and tune a running Simulink model in real-time on the actual hardware. It enables you to modify the parameters and inputs of the Simulink model while it is running on the hardware and see the output of the model in real-time.

 

Here are the pros and cons of External mode testing:

 

Pros of External mode testing:

External mode testing allows you to monitor and tune the Simulink model in real-time on the actual hardware, which can be helpful for debugging and optimization.

It enables you to validate the behavior and performance of the Simulink model on the actual hardware, which is crucial for the actual deployment of the code.

It can be used with different hardware and software combinations, making it more flexible and adaptable to different environments and requirements.

You can modify the parameters and inputs of the Simulink model and collect the output of the model using a simple and intuitive interface.

 

Cons of External mode testing:

External mode testing can be more complex and time-consuming to set up and execute than other Simulink testing methods, such as MIL and PIL testing.

It may not provide the same level of automation and integration as Simulink Test, which can make it harder to manage and maintain the testing process.

It may require additional hardware and software to set up the testing environment, which can increase the cost and complexity of the testing process.

Prerequisites

ESP32 development board

USB cable

Waijung2 ESP32 blockset installed in MATLAB/Simulink

Basic knowledge of MATLAB/Simulink

Setting Up Hardware

Required to connect following GPIO's pairs , to achieve the state of short-circuit.  

GPIO12 - GPIO18

GPIO13 - GPIO19

GPIO14 - GPIO21

Block in use

Waijung2 Target Setup block

Waijung2 Digital Input block

Waijung2 Digital Output block

Rotary Switch

Display

Constant

Pulse Generator

Switch Case

Switch Case Action Subsystem

Use Case Scenario

How to conduct real time testing using external mode

 

Test Cases

TC001: Send & Receive the Digital Input/Output signals in real-time

TC002: Configure on-board LED status real-time

Expected Outcome

Display values in the display blocks according to the rotary switch positions.

On-board LED should light up according to the selected configuration.

Setting Up Test Cases

Step 01: Create Test Model

External Mode Testing Model File : external_mode.slx

EXT_001

Step 02: Connect Rotary Switch to the constant block value

EXT_002EXT_003

Step 03: Build the model to the ESP32 board

EXT_004

Step 04: Connect to ESP32 through external Mode

EXT_006
EXT_005

Step 04: Monitor results change in real-time in the display blocks and ESP32 on-board LED with a change to rotary switches

EXT_007

 

Copyright 2024 Aimagin Co.,Ltd. Rev.1454