Friday, June 13, 2025

Dspace_HIL - Cluster Functional Simulation

 WorkFlow - Cluster Functional Simulation

Summary:

  • Implementing Cluster Functional Simulation

  • Creation of project in configuration desk 

  • Stimulating the signal parameters in the Control desk panel

  • Visualising the outputs in cluster ECU after physical connection


ConfigurationDesk with External Device:

  • External Device Interface

    • Creation of External Device Topology

    • Configuration of external Device interface

    • Copying and adding device blocks to the signal chain

    • Grouping device pins

  • Implementing I/O Functionality

    • Adding and Configuring function block to the signal chain

    • Assigning hardware resources to the function block

    • Mapping between device blocks and function blocks

    • Provide wiring information for the external cable harness

  • Specify model Interface

    • Add model port blocks to the signal chain

    • Adding behavior model







Configuration Desk:

Creation of new project: File → New





Registration of hardware Platform:


Click on Registered hardware - (You can click register Platform or Add predefined hardware(if already registered)).



After the hardware registration, click on create - New Project will get created as below:

Signal Addition(dbc):

Under the Buses - Add the dbc signals by clicking “Add
 
 Bus Access Assignment:

Once the dbc is added - All the node names configured under the buses (see left side of the image)

Under Bus Access Request - Right Click on “Bus Access Request” → “Automatic Bus Access Assignment”.

 

Once the Bus Access Assignment is done - it will assign as follows

 
  Bus channel Assignment:  

Once the Bus Access Request is created, do the Channel Assignment by right clicking on the DBC.










Application Process creation:

Under Tasks,

  Application process needs to be created by right clicking on it,


Bus Configuration ports - Enable Access:


Enable access needs to be given under Bus Configuration ports by the as following be selecting all:




External Device Interface:   

 

  • To create the external device topology:


Creating multiple ports dialog opens 








Rest Bus Simulation:

Build - sdf generation:

Under Build, 

Click on the “Start” button to start the building process to get the sdf file. The build results will be generated in the path shown





Control desk:

Project creation:

Once the sdf file is generated from the Configuration desk, create the new project in the control desk


Defining the experiment:

Give the name of the experiment as follows:


Platform Addition:

Select the supported platform (SCALEXIO)




Importing sdf file:

Import the sdf file generated from the configuration desk as follows:



Creation of Experiment:

Once sdf is uploaded, the experiment gets created as follows:


Variable Addition:

Under the Variables section, in the sdf path - Add the signals to the layouts required. Here, a Front speed signal is added to the layout to create the panel.


Panel creation:

Drag the signal to the Layout with the required input format (slider, knob, gauge ..etc)



Simulating online:

Once the Layout is created for the required signal , Go online for the HIL simulation as below.


Dspace HIL and CANoe - [Configuration of CAN High and Low pin from VN1611 hardware to Dspace HIL DS27043]:

Finally , the CAN high and Low of DS27043 is connected with CAN High and Low of VN1611 to establish the rest bus simulation. The pin details of both the hardware is below






OUTPUT:

     Once after the connection is made properly , we can start simulating through control desk where you can see the output log in CANoe trace as follows:

Wednesday, May 28, 2025

How to use Robot framework with CURF library(CAN ISO TP,UDS,CAN RAW Data):

 How to use Robot framework with CURF library(CAN ISO TP,UDS,CAN RAW Data):


Step-1:


Download the CURF from github


Step-2:

Load the CURF(downloaded file) via VB

Step-3:


In this folder create the Virtual environment


Step-4:


Install the Following python modules in virtual environment:


  • pip install robotframework

  • pip install python-can

  • pip install cantools

  • pip install can-isotp






Step-5:


Open can.robot file and start to write test case:




Step-6:


Run the can.robot using following command:

robot -d results test/can.robot




Step-7:

Open result folder—>log,report






Final Report:


Monday, May 27, 2024

Enhancing Test Automation with Excel Integration in Robot Framework

 Enhancing Test Automation with Excel Integration in Robot Framework:


Robot Framework offers excellent support for data-driven testing. In this post, we will see the steps to integrate Excel with Robot Framework, which will allow you to ease your test automation by leveraging organized data set.

Prerequisites for Excel Integration

Before we dive into integrating Excel with Robot Framework, ensure you have the following prerequisites in place:

  1. Robot Framework Installed: Install Robot Framework on your system.
  2. Python Libraries: Install the necessary Python libraries for working with Excel files, such as 'openpyxl' for reading and 'xlsxwriter' for writing to Excel files.
  3. Excel Spreadsheet: Prepare an Excel spreadsheet with your test data. Ensure that the spreadsheet is well-structured, with clear column headers and data.

Excel - test_data.xls

Integrating Excel with Robot Framework

Follow these steps to integrate Excel spreadsheets with Robot Framework:

Step 1: Import Python Libraries

Step 2: Define the Excel File Path

 *** Variables ***

${EXCEL_FILE} D:\\test_data.xls

Note: Replace "D:\\test_data.xls" with the actual path to your Excel spreadsheet.

Step 3: Read Data from Excel



*** Test Cases ***
Read Data from Excel
    # Open the Excel file
    Open Excel  ${EXCEL_FILE}

    # Read data from Excel - Provide sheet name and Cell name
    ${value1}    Read Cell Data By Name      TestingSheet       B2

    # Read data from Excel - Provide sheet name along with column & row.
    # In excel row and column number starts with 0
    ${value2}    Read Cell Data By Coordinates    TestingSheet     0     3

    # Use data in your test case
    Log  Read data from Excel: ${value1}
    Log  Read data from Excel: ${value2}

This test case reads data from cell B2 and A4 respectively from the Excel spreadsheet. Pass the cell reference and other details as per your requirements.

Step 4: Running and Reporting Tests

To execute your tests, use the Robot Framework command-line interface:


robot ExcelIntegration.robot

Robot Framework will execute the test and provide detailed report

Robot Framework - log.html

Benefits of Excel Integration with Robot Framework

  1. Separating test data from test cases enhances reusability and simplifies maintenance.
  2. Excel acts as a central repository for test data reducing redundancy.
  3. Updating and managing test data in Excel is a straightforward process familiar to many users.

In conclusion, integrating Excel spreadsheets with Robot Framework empowers you to leverage structured data for your test automation.


Creating a Project in vTESTstudio - Step by Step

  Contents 1    Overview 2    Create a Project 3    Configure the Project Environment 4    Create a Test Unit 5    Create a Test Table 6    ...