DDC Reference Sample Code : bcdemo.py   Download 

This sample demonstrates using DDC's AceXtreme SDK in a Python script.

1. Overview

DDC's AceXtreme SDK is designed for use in C or C++ applications. However, Python scripting is commonly used for test automation, including creating test cases and unit tests. This necessitates the ability to invoke the AceXtreme SDK APIs from Python. This sample demonstrates the process by implementing a simple Bus Controller (BC) using a Python script.

  1. The sample creates three messages (BC to RT, RT to BC and RT to RT) and schedules them in one minor frame. It reads the message results and prints them to the console.
  2. It installs a Interrupt Service Routine InterruptHandler to handle interrupts generated by the 1553 hardware.
  3. It sets up the BC to generate an interrupt at the end of the BC to RT message (EOM interrupt).
  4. In the Interrupt Service Routine, it increments the contents of some of the data words of the BC to RT message. This will result in the BC to RT message being transmitted with incrementing data in every frame.

2. Build and Test Details

The sample was tested using IDLE - Python's Integrated Development and Learning Environment with Python 3.13.0 and BU-69092S0-110 v4.9.5 with BU-67113U hardware. The project has been set up considering the AceXtreme SDK install path as C:\DDC\aceXtremeSDKv4.9.5.

If your installation of the SDK is at a different path or if you have a different version of the AceXtreme SDK, please update the path in the bcdemo.py file at the location containing the comment line "# Specify path to the AceXtreme SDK API dll file."