{"id":197002,"date":"2025-08-26T07:40:11","date_gmt":"2025-08-26T07:40:11","guid":{"rendered":"https:\/\/innovationspace.ansys.com\/knowledge\/?post_type=topic&#038;p=197002"},"modified":"2026-03-19T13:50:44","modified_gmt":"2026-03-19T13:50:44","slug":"writing-a-python-user-application-for-the-scade-arinc-661-server","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/writing-a-python-user-application-for-the-scade-arinc-661-server\/","title":{"rendered":"Writing a Python User Application for the SCADE ARINC 661 server"},"content":{"rendered":"<p style=\"text-align: center\">\n    <img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/knowledge\/wp-content\/uploads\/sites\/4\/2025\/08\/scade-049-banner-scaled.jpeg\" style=\"max-height: 700px !important\" \/><br \/>\n    <em><\/em>\n<\/p>\n<p>The ARINC 661 standard specifies a software architecture for modular, upgradeable airplane cockpits. The standard specifies how the Cockpit Display System (CDS) and its User Applications (UA) work and communicate via a dedicated communication protocol. While the CDS renders widgets and handles low-level interaction, the UA manages the logic \u2014 sending commands, reacting to events, and driving the interface dynamically. Ansys has been an active member in the <a href=\"https:\/\/aviation-ia.sae-itc.com\/subcommittees\/cockpit-display-systems\">ARINC 661 standard definition committee<\/a> since its inception, more than two decades ago.<\/p>\n<p><em>Note:<\/em> This article assumes familiarity with the ARINC 661 standard. If you need a refresher, you may want to start with <a href=\"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/arinc-661-the-standard-behind-modern-cockpit-display-systems\/\">this previous article<\/a>.<\/p>\n<p>In this article, we&#8217;ll look at a development use case: creating a <strong>Python-based UA<\/strong> for the SCADE ARINC 661 server.<\/p>\n<p>Production-grade UAs must be certified as flight software under DO-178C and are typically developed with safety-critical tools such as Ansys SCADE Suite. However, while a UA is under development, it can be useful to create a mock-up \/ stub \/ prototype of its behavior. For instance, this can enable early integration testing of the Cockpit Display System. In such a case, using Python is a quick and easy way to create a functional prototype with minimal effort.<\/p>\n<p>To create our Python UA, we will use a component of SCADE called the Test Automation Framework. Initially developed to enable automated testing of ARINC 661 widgets, this component includes a comprehensive <strong>API over<\/strong> <strong>ARINC 661 Widgets<\/strong>. It also contains a <strong>Server Control Proxy API<\/strong> which allows orchestrating the execution of the CDS and its UAs, as well as observing their state at each step.<\/p>\n<p>Our approach today will cover:<\/p>\n<ul>\n<li>Understanding the required API concepts<\/li>\n<li>Creating the DF (Definition File) in SCADE UA Page Creator<\/li>\n<li>Setting up the Python environment with the local SCADE installation<\/li>\n<li>Writing the UA logic in Python<\/li>\n<li>Running and testing it with the SCADE ARINC 661 Server<\/li>\n<\/ul>\n<h3  id=\"KEY-API-CONCEPTS\">Key API concepts<\/h3>\n<p>The SCADE ARINC 661 ecosystem separates <strong>graphical rendering<\/strong> (CDS server) from <strong>logic execution<\/strong> (UA). Communication between both is enabled by the ARINC 661 protocol \u2014 messages about widget states, parameter changes, and user interactions.<\/p>\n<p>The <strong>SCADE ARINC 661 Widgets API<\/strong> abstracts the protocol details into Python classes:<\/p>\n<ul>\n<li>Each widget type (Label, PushButton, Slider, etc.) becomes a Python class.<\/li>\n<li>You create widget objects, set parameters, and send events without manually encoding binary messages.<\/li>\n<li>Incoming notifications from the server are automatically parsed into meaningful Python objects.<\/li>\n<\/ul>\n<p>This API is your bridge between <strong>ARINC 661 binary protocol<\/strong> and <strong>readable Python code <\/strong>\u2014 you focus on &#8220;what to do&#8221; instead of &#8220;how to encode it.&#8221;<\/p>\n<p>The Python API also provides other services, such as classes to interact with UAs, functions to <strong>encode\/decode<\/strong> ARINC 661 messages, as well as the <strong>Server Control Proxy<\/strong>, a service that allows interacting with \/ observing \/ piloting the server using Python calls.<\/p>\n<p>You may find a comprehensive documentation of all these Python classes <a href=\"https:\/\/ansyshelp.ansys.com\/Views\/Secured\/SCADE\/v251\/en\/PDFS\/SCADE%20ARINC%20Help%20Resources\/Guidelines\/Test%20Automation%20Framework\/TestAutomationFramework_ARC-TAF-EPG-25.pdf#G11.1047236\">here in our online docs<\/a>.<\/p>\n<h3  id=\"CREATING-THE-DEFINITION-FILE-DF-IN-SCADE-UA-PAGE-CREATOR\">Creating the Definition File (DF) in SCADE UA Page Creator<\/h3>\n<p>An ARINC 661 DF describes the graphical page corresponding to the UA. It is composed of ARINC 661 widgets and includes, for each one, IDs, types and layout information.<\/p>\n<p>For the sake of simplicity, we will build a small DF: a label displaying the current time, and a button that updates the time value when clicked. Each update triggers a round-trip between the CDS, which detects the click, and the UA, which queries current time and sends it back.<\/p>\n<p>In <strong>SCADE UA Page Creator<\/strong>, we&#8217;ll first create a new UA page and assign it a <strong>UA ID<\/strong> (arbitrarily, 1). Then, we&#8217;ll add the following widgets:<\/p>\n<ul>\n<li><strong>Label<\/strong> (Widget ID 1) &#8211; static text &#8211; LabelString=Current Time<\/li>\n<li><strong>Label<\/strong> (Widget ID 2) &#8211; time display &#8211; LabelString=13:37:00 <\/li>\n<li><strong>PushButton<\/strong> (Widget ID 3) &#8211; trigger to update the time &#8211; LabelString=Update Time<\/li>\n<\/ul>\n<p>Finally, we position our widgets as follows on the design surface:<\/p>\n<p style=\"text-align: center\">\n    <img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/knowledge\/wp-content\/uploads\/sites\/4\/2025\/08\/scade-049-uapc-df.png\" style=\"max-height: 500px !important\" \/><br \/>\n    <em><\/em>\n<\/p>\n<p>We can now save our project and generate the binary DF using the &#8220;DF Generation&#8221; generation configuration.<\/p>\n<h3  id=\"SETTING-UP-THE-PYTHON-ENVIRONMENT\">Setting up the Python environment<\/h3>\n<p>SCADE comes with its own Python distribution and the Test Automation Framework component.<\/p>\n<p>1. <strong>Locate the Python install provided with SCADE<\/strong><\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff;overflow:auto;width:auto;background:none;border:none;padding:.2em .6em\">\n<pre style=\"margin: 0;line-height: 125%\"><span><\/span><span style=\"font-weight: bold\">%<\/span>SCADE_INSTALL<span style=\"font-weight: bold\">%<\/span>\\SCADE\\contrib\\Python312\r\n<\/pre>\n<\/div>\n<p>2. <strong>Create and activate a virtual environment using SCADE&#8217;s Python<\/strong><\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff;overflow:auto;width:auto;background:none;border:none;padding:.2em .6em\">\n<pre style=\"margin: 0;line-height: 125%\"><span><\/span><span style=\"font-weight: bold\">cd<\/span> my_project\r\n<span style=\"color: #B84\">&quot;<\/span><span style=\"color: #008080\">%SCADE_INSTALL%<\/span><span style=\"color: #B84\">\\SCADE\\contrib\\Python312\\python&quot;<\/span> -m venv .venv\r\n.venv\\Scripts\\activate\r\n<\/pre>\n<\/div>\n<p><em>Note: <\/em>A venv is not required here but it is good practice to operate in one for repeatability.<\/p>\n<p>3. <strong>Set the <code>PYTHONPATH<\/code> so your UA can import the SCADE and ARINC 661 Widgets API<\/strong><\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff;overflow:auto;width:auto;background:none;border:none;padding:.2em .6em\">\n<pre style=\"margin: 0;line-height: 125%\"><span><\/span><span style=\"font-weight: bold\">set<\/span> <span style=\"color: #B84\">&quot;PYTHONPATH=<\/span><span style=\"color: #008080\">%SCADE_INSTALL%<\/span><span style=\"color: #B84\">\\SCADE A661\\PythonLib;<\/span><span style=\"color: #008080\">%SCADE_INSTALL%<\/span><span style=\"color: #B84\">\\SCADE\\APIs\\Python\\lib&quot;<\/span>\r\n<\/pre>\n<\/div>\n<h3  id=\"WRITING-THE-PYTHON-UA-LOGIC-PROTOTYPE\">Writing the Python UA logic prototype<\/h3>\n<p>It is now time to write our UA logic prototype. For our simple application, we want our Python script to:<\/p>\n<ul>\n<li>Launch a SCADE CDS server as a background process<\/li>\n<li>Parse the DF and build a Python representation of its contents<\/li>\n<li>Connect to the server as UA 1<\/li>\n<li>Start an infinite polling loop<\/li>\n<\/ul>\n<p>In the polling loop, we want to:<\/p>\n<ul>\n<li>Receive notifications coming from the CDS<\/li>\n<li>Determine whether the &#8220;Update Time&#8221; PushButton has been clicked<\/li>\n<li>If so, read the current time into a string and send it back to be displayed by the target Label<\/li>\n<\/ul>\n<p><em>Note:<\/em> for the sake of convenience, we mix, in the same Python script, the prototype logic of our UA with start-up instructions for the CDS server. This allows us to launch everything from a self-contained piece of code. Alternatively, we could choose to start the CDS and our UA prototype in separate terminals.<\/p>\n<h4  id=\"INITIALIZING-THE-API\">Initializing the API<\/h4>\n<p>We start our script by calling <code>Standard_rev9_v1()<\/code>. It selects the generated ARINC 661 Widgets API that matches the server&#8217;s ARINC 661 supplement and widget library version.<\/p>\n<h4  id=\"STARTING-THE-CDS-SERVER\">Starting the CDS server<\/h4>\n<p>Then, we instantiate a <code>Server<\/code> object and call the <code>run()<\/code> method on it. This ensures we have a CDS to connect to with our prototype UA.<\/p>\n<h4  id=\"PARSING-THE-DF-AND-CONNECTING-AS-A-UA\">Parsing the DF and connecting as a UA<\/h4>\n<p>Then, we call <code>taf.a661libutil.create_df_from_sgfx()<\/code> on the SCADE <code>.sgfx<\/code> file representing our DF. This automatically parses the DF and creates a tree of Python objects matching its contents: ARINC 661 layers, widgets, and their parameters. These classes include typed helpers to build ARINC 661 messages without hand-encoding bytes.<\/p>\n<p>We then proceed to create a <code>UA<\/code> object and call <code>connect()<\/code>, then <code>register_df()<\/code> on it to establish a link with the server.<\/p>\n<p><em>Notes:<\/em><\/p>\n<ul>\n<li>The <code>UA<\/code> class is central to the SCADE ARINC 661 Python library. All communication with the server is done through it: connection and runtime communication via messages and notifications.<\/li>\n<li><code>ua1.connect()<\/code> defaults to <code>localhost:1230<\/code> (TCP) unless you override it; that&#8217;s the default port for UA 1.<\/li>\n<\/ul>\n<h4  id=\"POLLING-LOOP\">Polling loop<\/h4>\n<p>Once connected, we poll notifications with <code>ua1.get_notifications()<\/code>, which returns a list of dictionaries like:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff;overflow:auto;width:auto;background:none;border:none;padding:.2em .6em\">\n<pre style=\"margin: 0;line-height: 125%\"><span><\/span>{\r\n  <span style=\"color: #B84\">&quot;RuntimeCommand&quot;<\/span>: <span style=\"color: #B84\">&quot;A661_NOTIFY_WIDGET_EVENT&quot;<\/span>,\r\n  <span style=\"color: #B84\">&quot;WidgetIdent&quot;<\/span>: <span style=\"color: #099\">3<\/span>,\r\n  <span style=\"color: #B84\">&quot;NotificationIdent&quot;<\/span>: <span style=\"color: #B84\">&quot;A661_NOTE_CONNECTOR_DATA&quot;<\/span>\r\n  <span style=\"color: #998;font-style: italic\"># ...plus AppIdent\/LayerIdent\/ContextNumber<\/span>\r\n}\r\n<\/pre>\n<\/div>\n<p>These keys\/structures are standardized by the framework, so you don&#8217;t parse raw bytes. You filter what you care about (e.g., a &#8220;Selection&#8221; event on a PushButton) and react.<\/p>\n<p>In our script, we want to watch for:<\/p>\n<ul>\n<li><code>RuntimeCommand == 'A661_NOTIFY_WIDGET_EVENT'<\/code><\/li>\n<li><code>WidgetIdent == pushButton.widget_id<\/code><\/li>\n<li><code>NotificationIdent == 'A661_EVT_SELECTION'<\/code><\/li>\n<\/ul>\n<p>When that happens, we <strong>send a block<\/strong> to update our target&#8217;s string: <code>target_label.string(\"...\")<\/code> creates an ARINC 661 <code>SET_PARAMETER<\/code> for the <code>STRING<\/code> parameter; <code>ua1.send_block(...)<\/code> pushes it to the server.<\/p>\n<p><em>Note: <\/em>Helper method names match the ARINC 661 parameter (without the <code>A661_<\/code> prefix, lowercase). So, <code>.string()<\/code> maps to <code>A661_STRING<\/code>.<\/p>\n<h4  id=\"TIMING-LOOP-RATE-AND-NOT-BURNING-CPU\">Timing, loop rate, and not burning CPU<\/h4>\n<p>We set a <code>PERIOD = 0.020<\/code> (20 ms) constant, and <code>sleep(PERIOD)<\/code> at the end of each loop. This is a nice compromise: low latency for UI interactions without busy-waiting. For a chattier system, we&#8217;d add a tiny queue or backoff mechanism, but we don&#8217;t need those in our simple example.<\/p>\n<p><em>Note: <\/em>If you need deterministic coupling of your UA and server steps, you can use the Server Control Proxy component to drive steps from Python. For today&#8217;s example, a simple polling loop is fine.<\/p>\n<h4  id=\"COMMON-PITFALLS-SO-YOU-DONT-TRIP\">Common pitfalls (so you don&#8217;t trip)<\/h4>\n<ul>\n<li><strong>Mismatched rev\/version<\/strong> \u2192 wrong module imported or wrong <code>Standard_revX_vY()<\/code> initializer. Always match the server build.<\/li>\n<li><strong>Forgot to <\/strong><code>register_df(df)<\/code> \u2192 you&#8217;ll still receive events, but decoding lacks widget typing; notification checks may look odd.<\/li>\n<li><code>PYTHONPATH<\/code><strong> not set<\/strong> \u2192 imports like <code>from taf.a661libgen_rev6_v1 import ...<\/code> fail. Ensure your venv sees <code>%SCADE_INSTALL%\\SCADE A661\\PythonLib<\/code> and <code>%SCADE_INSTALL%\\SCADE\\APIs\\Python\\lib<\/code>.<\/li>\n<li><strong>Encoding<\/strong> \u2192 if your DF uses a non-ASCII charset (e.g., UTF-8), initialize the standard with that, e.g. <code>Standard_rev9_v1('utf-8')<\/code> so that string parameters encode correctly.<\/li>\n<\/ul>\n<h4  id=\"PUTTING-IT-ALL-TOGETHER\">Putting it all together<\/h4>\n<p>Below is our complete UA script, a clean, minimal UA. It&#8217;s a kind of &#8220;hello world&#8221; (or rather &#8220;what time is it?&#8221;) example for Python UA prototyping.<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff;overflow:auto;width:auto;background:none;border:none;padding:.2em .6em\">\n<pre style=\"margin: 0;line-height: 125%\"><span><\/span><span style=\"color: #B84\">&quot;&quot;&quot;Minimal script prototyping the logic of an ARINC 661 User Application (UA).&quot;&quot;&quot;<\/span>\r\n\r\n<span style=\"font-weight: bold\">import<\/span><span style=\"color: #BBB\"> <\/span><span style=\"color: #555\">datetime<\/span>\r\n<span style=\"font-weight: bold\">import<\/span><span style=\"color: #BBB\"> <\/span><span style=\"color: #555\">os<\/span>\r\n<span style=\"font-weight: bold\">from<\/span><span style=\"color: #BBB\"> <\/span><span style=\"color: #555\">pathlib<\/span><span style=\"color: #BBB\"> <\/span><span style=\"font-weight: bold\">import<\/span> Path\r\n<span style=\"font-weight: bold\">from<\/span><span style=\"color: #BBB\"> <\/span><span style=\"color: #555\">time<\/span><span style=\"color: #BBB\"> <\/span><span style=\"font-weight: bold\">import<\/span> sleep\r\n\r\n<span style=\"font-weight: bold\">from<\/span><span style=\"color: #BBB\"> <\/span><span style=\"color: #555\">taf.a661libgen_rev9_v1<\/span><span style=\"color: #BBB\"> <\/span><span style=\"font-weight: bold\">import<\/span> UA, Server, Standard_rev9_v1\r\n<span style=\"font-weight: bold\">import<\/span><span style=\"color: #BBB\"> <\/span><span style=\"color: #555\">taf.a661libutil<\/span>\r\n\r\n<span style=\"color: #998;font-style: italic\"># Initialize SCADE ARINC 661 Widget API and constants<\/span>\r\nStandard_rev9_v1()\r\nPERIOD <span style=\"font-weight: bold\">=<\/span> <span style=\"color: #099\">0.020<\/span> \u00a0<span style=\"color: #998;font-style: italic\"># in seconds<\/span>\r\nSCADE_INSTALL <span style=\"font-weight: bold\">=<\/span> os<span style=\"font-weight: bold\">.<\/span>getenv(<span style=\"color: #B84\">&quot;SCADE_INSTALL&quot;<\/span>)\r\n<span style=\"font-weight: bold\">if<\/span> <span style=\"font-weight: bold\">not<\/span> Path(SCADE_INSTALL)<span style=\"font-weight: bold\">.<\/span>exists():\r\n\u00a0 \u00a0 <span style=\"color: #999\">print<\/span>(<span style=\"color: #B84\">f&quot;Invalid SCADE installation path, exiting.\\nPath is: {<\/span>SCADE_INSTALL<span style=\"color: #B84\">}&quot;<\/span>)\r\n\u00a0 \u00a0 exit(code<span style=\"font-weight: bold\">=<\/span><span style=\"color: #099\">1<\/span>)\r\n\r\n<span style=\"color: #998;font-style: italic\"># Start a SCADE CDS server as a background task<\/span>\r\ncds <span style=\"font-weight: bold\">=<\/span> Server(\r\n\u00a0 \u00a0 exe<span style=\"font-weight: bold\">=<\/span><span style=\"color: #B84\">f&quot;{<\/span>SCADE_INSTALL<span style=\"color: #B84\">}\/SCADE A661\/bin\/A661Server.exe&quot;<\/span>,\r\n\u00a0 \u00a0 df_list<span style=\"font-weight: bold\">=<\/span>[<span style=\"color: #B84\">&quot;graphics\/DF\/UA_1.bin&quot;<\/span>],\r\n)\r\ncds<span style=\"font-weight: bold\">.<\/span>run(debug<span style=\"font-weight: bold\">=<\/span><span style=\"color: #B84\">&quot;all&quot;<\/span>)\r\n\r\n<span style=\"color: #998;font-style: italic\"># Parse DF and connect to the server as UA 1<\/span>\r\ndf_from_sgfx <span style=\"font-weight: bold\">=<\/span> taf<span style=\"font-weight: bold\">.<\/span>a661libutil<span style=\"font-weight: bold\">.<\/span>create_df_from_sgfx(\r\n\u00a0 \u00a0 sgfx_path<span style=\"font-weight: bold\">=<\/span><span style=\"color: #B84\">&quot;graphics\/UADF.sgfx&quot;<\/span>,\r\n\u00a0 \u00a0 a661_path<span style=\"font-weight: bold\">=<\/span><span style=\"color: #B84\">f&quot;{<\/span>SCADE_INSTALL<span style=\"color: #B84\">}\/SCADE A661\/server\/a661_description\/a661.xml&quot;<\/span>,\r\n)\r\nua1 <span style=\"font-weight: bold\">=<\/span> UA(ua_id<span style=\"font-weight: bold\">=<\/span><span style=\"color: #099\">1<\/span>)<span style=\"font-weight: bold\">.<\/span>connect()\r\nua1<span style=\"font-weight: bold\">.<\/span>register_df(df_object<span style=\"font-weight: bold\">=<\/span>df_from_sgfx)\r\n\r\n<span style=\"color: #998;font-style: italic\"># Start polling loop<\/span>\r\npushbutton <span style=\"font-weight: bold\">=<\/span> ua1<span style=\"font-weight: bold\">.<\/span>get_widget(layer_id<span style=\"font-weight: bold\">=<\/span><span style=\"color: #099\">1<\/span>, widget_id<span style=\"font-weight: bold\">=<\/span><span style=\"color: #099\">3<\/span>)\r\ntarget_label <span style=\"font-weight: bold\">=<\/span> ua1<span style=\"font-weight: bold\">.<\/span>get_widget(layer_id<span style=\"font-weight: bold\">=<\/span><span style=\"color: #099\">1<\/span>, widget_id<span style=\"font-weight: bold\">=<\/span><span style=\"color: #099\">2<\/span>)\r\n<span style=\"font-weight: bold\">while<\/span> <span style=\"font-weight: bold\">True<\/span>:\r\n\u00a0 \u00a0 notifs <span style=\"font-weight: bold\">=<\/span> ua1<span style=\"font-weight: bold\">.<\/span>get_notifications()\r\n\u00a0 \u00a0 <span style=\"font-weight: bold\">if<\/span> notifs:\r\n\u00a0 \u00a0 \u00a0 \u00a0 <span style=\"font-weight: bold\">for<\/span> notif <span style=\"font-weight: bold\">in<\/span> notifs:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <span style=\"font-weight: bold\">if<\/span> (\r\n  notif[<span style=\"color: #B84\">&quot;RuntimeCommand&quot;<\/span>] <span style=\"font-weight: bold\">==<\/span> <span style=\"color: #B84\">&quot;A661_NOTIFY_WIDGET_EVENT&quot;<\/span>\r\n                <span style=\"font-weight: bold\">and<\/span> notif[<span style=\"color: #B84\">&quot;WidgetIdent&quot;<\/span>] <span style=\"font-weight: bold\">==<\/span> pushbutton<span style=\"font-weight: bold\">.<\/span>widget_id\r\n                <span style=\"font-weight: bold\">and<\/span> notif[<span style=\"color: #B84\">&quot;EventIdent&quot;<\/span>] <span style=\"font-weight: bold\">==<\/span> <span style=\"color: #B84\">&quot;A661_EVT_SELECTION&quot;<\/span>\r\n            ):\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 now <span style=\"font-weight: bold\">=<\/span> datetime<span style=\"font-weight: bold\">.<\/span>datetime<span style=\"font-weight: bold\">.<\/span>now()\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ua1<span style=\"font-weight: bold\">.<\/span>send_block(target_label<span style=\"font-weight: bold\">.<\/span>string(now<span style=\"font-weight: bold\">.<\/span>strftime(<span style=\"color: #B84\">&quot;%H:%M:%S&quot;<\/span>)))\r\n\u00a0 \u00a0 sleep(PERIOD)\r\n<\/pre>\n<\/div>\n<h3  id=\"TESTING-THE-UA\">Testing the UA<\/h3>\n<p>We are finally ready to run everything on our local machine: the SCADE CDS with our DF loaded and our Python UA.<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff;overflow:auto;width:auto;background:none;border:none;padding:.2em .6em\">\n<pre style=\"margin: 0;line-height: 125%\"><span><\/span>.venv\\Scripts\\activate\r\n<span style=\"font-weight: bold\">set<\/span> <span style=\"color: #B84\">&quot;PYTHONPATH=<\/span><span style=\"color: #008080\">%SCADE_INSTALL%<\/span><span style=\"color: #B84\">\\SCADE A661\\PythonLib;<\/span><span style=\"color: #008080\">%SCADE_INSTALL%<\/span><span style=\"color: #B84\">\\SCADE\\APIs\\Python\\lib&quot;<\/span>\r\npython logic\\UA.py\r\n<\/pre>\n<\/div>\n<p>When interacting with the PushButton in the server display window, Label 2 should update with the current time.<\/p>\n<p>Here is a video showcasing our complete example:<\/p>\n<p><p style=\"text-align: center\"><iframe loading=\"lazy\" class=\"vidyard_iframe\" src=\"https:\/\/play.vidyard.com\/zVHgmxeGBZHHmNpzN39iFe\" width=\"740\" height=\"460\" frameborder=\"0\" allowfullscreen referrerpolicy=\"no-referrer-when-downgrade\"><\/iframe><\/p>\n<\/p>\n<h3  id=\"EXPLORE-FURTHER\">Explore further<\/h3>\n<p>In this article, we saw how to quickly build lightweight prototypes of ARINC 661 User Application logic<a href=\"https:\/\/innovationspace.ansys.com\/knowledge\/wp-content\/uploads\/sites\/4\/2025\/08\/scade-049-prototype.gif\">,<\/a> by leveraging the SCADE ARINC 661 Test Automation Framework component and its Python API.<\/p>\n<p>This enables CDS activities, such as integration testing, to proceed while User Applications are not yet fully developed.<\/p>\n<p>If you have a SCADE license and wish to experiment, you may download this article&#8217;s example model <a href=\"https:\/\/github.com\/ansys\/scade-examples\/releases\/latest\/download\/2025-08-25-a661-python-ua.zip\">here<\/a> (or <a href=\"https:\/\/github.com\/ansys\/scade-examples\/tree\/main\/models\/2025-08-25-a661-python-ua\/\">browse its sources<\/a>).<\/p>\n<p>If you&#8217;d like to learn more about Ansys SCADE Solutions for ARINC 661 Compliant Systems, we&#8217;d love to hear from you! Get in touch on our <a href=\"https:\/\/www.ansys.com\/products\/embedded-software\/solutions-for-arinc-661\">product page<\/a>.<\/p>\n<h3  id=\"ABOUT-THE-AUTHOR\">About the author<\/h3>\n<table style=\"max-width: 1000px;border: none !important\">\n<tr>\n<td style=\"padding: 0px 10px;min-width: 150px;border: none !important\">\n<p style=\"text-align: center\">\n    <img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/knowledge\/wp-content\/uploads\/sites\/4\/2025\/08\/scade-049-author-4.png\" style=\"max-height: 150px !important\" \/><br \/>\n                <em><\/em>\n<\/p>\n<\/td>\n<td style=\"padding: 0px 10px;min-width: 150px;border: none !important\">\n<p><strong>Ludovic Oddos<\/strong> (<a href=\"https:\/\/www.linkedin.com\/in\/ludovicoddos\/\">LinkedIn<\/a>) is a Lead Product Specialist at Ansys. He has been supporting SCADE field engagements, in many industries, for more than 15 years. He has deep expertise in embedded software and its integration into various target environments.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n","protected":false},"template":"","class_list":["post-197002","topic","type-topic","status-publish","hentry","topic-tag-arinc-661","topic-tag-cds","topic-tag-df","topic-tag-scade","topic-tag-taf","topic-tag-ua"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_edit_lock":["1773928512:1769"],"_edit_last":["1769"],"_aioseo_title":[null],"_aioseo_description":[null],"_aioseo_keywords":["a:0:{}"],"_aioseo_og_title":[null],"_aioseo_og_description":[null],"_aioseo_og_article_section":[""],"_aioseo_og_article_tags":["a:0:{}"],"_aioseo_twitter_title":[null],"_aioseo_twitter_description":[null],"filter_by_optics_product":["Lumerical"],"_filter_by_optics_product":["field_64fb192ba3121"],"application_name":[""],"_application_name":["field_64a80903c8e15"],"family":[""],"_family":["field_64a809229a857"],"siebel_km_number":[""],"_siebel_km_number":["field_63ecbffce60db"],"salesforce_km_number":[""],"_salesforce_km_number":["field_63ecc018e60dc"],"km_published_date":[""],"_km_published_date":["field_64c77704499dd"],"product_version":[""],"_product_version":["field_64c776cb4fd2e"],"_bbp_forum_id":["27825"],"_bbp_topic_id":["198179"],"_bbp_author_ip":["20.82.84.9"],"_bbp_last_reply_id":["0"],"_bbp_last_active_id":["197003"],"_bbp_last_active_time":["2025-08-26 07:40:11"],"_bbp_reply_count":["0"],"_bbp_reply_count_hidden":["0"],"_bbp_voice_count":["0"],"_btv_view_count":["1249"],"_bbp_likes_count":["5"]},"test":"solution"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/197002","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":8,"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/197002\/revisions"}],"predecessor-version":[{"id":198179,"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/197002\/revisions\/198179"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/media?parent=197002"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}