<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Typhoon HIL Forum - Recent questions and answers in Knowledge Base</title>
<link>https://typhoon-hil.com/forum/?qa=qa/knowledge-base</link>
<description>Powered by Question2Answer</description>
<item>
<title>Answered: Why are the currents on my interleaved converter not balanced?</title>
<link>https://typhoon-hil.com/forum/?qa=452/why-are-the-currents-on-interleaved-converter-not-balanced&amp;show=453#a453</link>
<description>&lt;p&gt;Let&#039;s consider an interleaved buck converter, consisting of two legs A and B. We want to understand the origin and estimate the value of a current imbalance that can occur.&lt;/p&gt;&lt;p&gt;In order to analyze the circuit, we can assume a continuous conduction mode. In such operation, the average output voltages at the switch node are given with va = Da*Vin, vb = Db*Vin. &lt;strong&gt;Current unbalance will occur if there is some difference in duty cycles.&lt;/strong&gt; If we express this difference in terms of duration, we can derive a generalized equation to calculate the current, as shown in the image.&lt;/p&gt;&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;https://typhoon-hil.com/forum/?qa=blob&amp;amp;qa_blobid=15344107337055268765&quot; style=&quot;height:220px; width:600px&quot;&gt;&lt;/p&gt;&lt;p&gt;In a real-world system, even if PWM modulator is programmed perfectly, the uncertainty will always exist with regards to signal propagation in the system due to the multiple reasons. Imperfection of passive components that are incorporated into the digital output/digital input circuit design will inevitably change the time constants of input/output impedances. There is also always uncertainty with regards to IO voltage levels - We specify that the minimum voltage value at which logic-high is detected is 2V, while maximum logic-low level is 0.8V, but we cannot be certain when exactly will the logic level change be detected. This will reflect into uncertainty of pulse duration as well.&lt;/p&gt;&lt;p&gt;In order to estimate the impact of the pulse length difference, let&#039;s assume that all the uncertainties add up to a single sample of a difference in pulse lengths of two legs - 3.5ns. If input voltage is 650V, fsw is 200kHz and RL is 10mOhm, the formula yields 45.5A of current unbalance between two legs! This means that &lt;strong&gt;even a very small difference in pulse length will cause a significant current unbalance&lt;/strong&gt;. Therefore, &lt;strong&gt;we shall not expect the current to be perfectly balanced when using HIL IO loopback, or the external controller in open-loop.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Interestingly, HIL will be able to capture even 1ns of pulse length difference if the external controller is used, even though the DI sampling rate is 3.5ns. Since the controller isn&#039;t synchronized with HIL in any way, duty cycle that&#039;s measured will not be constant between multiple switching periods. The average value of detected duty cycle will reflect the 1ns difference, which will be reflected in the simulation results, yielding 13A of current unbalance. This can be confirmed by using &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.typhoon-hil.com/documentation/typhoon-hil-software-manual/References/pwm_analyzer.html&quot;&gt;PWM Analyzer&lt;/a&gt; to measure the average duty cycle over long time span.&lt;/p&gt;&lt;p&gt;Finally, when running on the actual power hardware, uncertainties will be increased due to the fact that turn on/turn off delays on real power MOSFETs have ranges that are often 10s of nanoseconds. For this reason, one should always make sure to actively balance the currents.&lt;/p&gt;</description>
<category>Knowledge Base</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=452/why-are-the-currents-on-interleaved-converter-not-balanced&amp;show=453#a453</guid>
<pubDate>Mon, 25 Aug 2025 07:50:06 +0000</pubDate>
</item>
<item>
<title>Does Typhoon HIL support XCP protocol?</title>
<link>https://typhoon-hil.com/forum/?qa=438/does-typhoon-hil-support-xcp-protocol</link>
<description>&lt;p&gt;&lt;span style=&quot;font-size:14px&quot;&gt;Yes. Typhoon HIL supports XCP over&amp;nbsp;CAN and ETH.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;font-size:14px&quot;&gt;Note:&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-size:14px&quot;&gt;XCP over ETH and CAN is supported from version THCC 2025.4.&amp;nbsp;While on previous THCC versions only&amp;nbsp;&lt;a rel=&quot;nofollow&quot; href=&quot;https://ticket.typhoon-hil.com/kb/faq.php?id=352&quot;&gt;XCP over CAN&lt;/a&gt;&amp;nbsp;is supported.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;XCP in the Typhoon HIL toolchain&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;XCP master is supported in the Typhoon HIL toolchain in HIL SCADA, via the Python library &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/christoph2/pyxcp&quot;&gt;pyxcp&lt;/a&gt;, while the parsing and importing of the a2l file is supported via the Python library &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/christoph2/pyA2L&quot;&gt;pya2l&lt;/a&gt;. XCP slave is not supported in the Typhoon HIL toolchain.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;Attached below is an example HIL SCADA panel file, where you can open the widget properties and write the Python code you want to execute.&amp;nbsp;For creating properly configurations, you should use xcp-profile utility to convert a legacy .json/.toml file:&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;nbsp;xcp-profile convert -c &amp;lt;YOUR_FILE_NAME&amp;gt;.json -o pyxcp_conf.py&amp;nbsp;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;Then you can import the libraries and modules for XCP communication and other libraries.&lt;/p&gt;&lt;pre&gt;import sys 
from time import sleep 
from pyxcp.cmdline import ArgumentParser 
from pyxcp.daq_stim import DaqToCsv, DaqList, DaqRecorder&lt;/pre&gt;&lt;p&gt;To access additional Python scripts in your simulation, you will need to append the path for the script to the system path.&lt;/p&gt;&lt;pre&gt;sys.path.append(“d:/path/to/python/file”)
from xcp_script import XCPclass, open_db_session, create_measurement_list, parse_csv&lt;/pre&gt;&lt;p&gt;In order to parse the a2l file to retrieve the necessary information, the a2l file must be imported into an opened database. That database need to be open just once and you can do that by calling open_db_session() function before initializing anything:&amp;nbsp;&lt;/p&gt;&lt;pre&gt;db, session = open_db_session(a2l_file_path)&lt;/pre&gt;&lt;p&gt;The general idea is to acquire data from a device (ECU or simulator), process the data (either online or offline), and then store it or handle it in different formats. A DAQ list is a collection of measurements and data points to be recorded during the DAQ process. The allocation and optimization of ODTs is done automatically by pyXCP. For demonstration, we initialize DAQ list as follows:&amp;nbsp;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-family:Source Code Pro,Monaco,Consolas,monospace,serif&quot;&gt;&lt;span style=&quot;font-size:14px&quot;&gt;daq_list = [DaqList(
    name=&quot;test&quot;,
    event_num=2,
    stim=False,
    enable_timestamps=False,
    measurements=daq_measurements,
    priority=0,
    prescaler=1
)]&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:&amp;quot;Source Code Pro&amp;quot;,Monaco,Consolas,monospace,serif; font-size:14px&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;The data acquired can be stored in different formats:&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;CSV: For simple tabular data XMRAW:&amp;nbsp;&lt;/li&gt;&lt;li&gt;A proprietary format for pyXCP to record raw DAQ data&amp;nbsp;&lt;/li&gt;&lt;li&gt;Parquet, MDF, SQLite: Other formats available for processing and storing data&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The measurement parameter should contain a list of the desired measurements for your DAQ process. To construct this list, you can simply create a list of measurement name and then call the &lt;em&gt;create_measurement_list &lt;/em&gt;function. This function will automatically generate the compatible list of measurements that can be used in the measurements parameter.&amp;nbsp;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-family:Source Code Pro,Monaco,Consolas,monospace,serif&quot;&gt;&lt;span style=&quot;font-size:14px&quot;&gt;measurement_names = [&quot;channel_d&quot;, &quot;TestDWord_501&quot;, &quot;TestDWord_502&quot;, &quot;TestWord_992&quot;, &quot;TestWord_991&quot;, &quot;TestWord_989&quot;]
daq_measurements = create_measurement_list(measurement_names, session)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:&amp;quot;Source Code Pro&amp;quot;,Monaco,Consolas,monospace,serif; font-size:14px&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;The flexible callback mechanism in pyXCP allows users to interact with the DAQ process in a more modular and customizable way using policies. This flexibility makes it easier for users to integrate DAQ functionality into their workflow according to their specific needs. Before initializing the master, first we need to initialize policy that we will use:&amp;nbsp;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-family:Source Code Pro,Monaco,Consolas,monospace,serif&quot;&gt;&lt;span style=&quot;font-size:14px&quot;&gt;daq_parser = DaqToCsv(daq_list)&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;Then, we need to make an instance of ArgumentParser class which is used to set up the environment for running the DAQ process. Crete a master as follows:&amp;nbsp;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-family:Source Code Pro,Monaco,Consolas,monospace,serif&quot;&gt;&lt;span style=&quot;font-size:14px&quot;&gt;ap = ArgumentParser()
with ap.run(policy=daq_parser) as xm:
    xcp = XCPclass(master=xm)&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;After that, you can use the functions defined in the pyxcp library &lt;em&gt;(connect, disconnect, upload, download)&lt;/em&gt; to connect and get additional info about the slave device. For unlocking a slave resource, you can implement your own function&amp;nbsp;as it is done in the XCP script attached below if you know the algorithm. Another option is to provide the DLL file for unlocking after calling the &lt;em&gt;get_seed_and_unlock &lt;/em&gt;function.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Important note&lt;/strong&gt;: If you wish to use the DLL method for unlocking the resource, you will need to modify the pyxcp_conf.py file, where you need to uncomment and set the &lt;em&gt;custom_dll_loader &lt;/em&gt;parameter.&lt;/p&gt;&lt;p&gt;This part of code is an example of how to use the functions defined in pyxcp and implement the xcp_script. The function &lt;em&gt;get_seed_and_unlock &lt;/em&gt;gets the XCP seed key and unlocks the specified resource.&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-family:Source Code Pro,Monaco,Consolas,monospace,serif&quot;&gt;&lt;span style=&quot;font-size:14px&quot;&gt;xcp = XCPclass(master=xm)
timestamp_enable = False
conn = xm.connect()
mode_info = xm.getCommModeInfo()
gid = xm.getId(0x1)
status = xm.getStatus()
xm.synch()

xcp.get_seed_and_unlock(xm, 0x04, dll_path)
DAQ_proc_info = xm.getDaqProcessorInfo()
DAQ_res_info = xm.getDaqResolutionInfo()
DAQ_info = xm.getDaqInfo()
for i in range(0, len(DAQ_info[&quot;channels&quot;])):
    DAQ_event_info = xm.getDaqEventInfo(i)
    upload_rcv = xm.upload(DAQ_event_info.eventChannelNameLength)

xcp.get_seed_and_unlock(xm, 0x01, dll_path)
scp = xm.setCalPage(0x83, 0, 0)

xcp.build_checksum_for_slave(xm, session)
xcp.set_mta_and_build_checksum(xm, session)
for i in range(0, DAQ_proc_info.maxEventChannel - 1):
    DAQ_event_info = xm.getDaqEventInfo(i)
    upload_rcv = xm.upload(DAQ_event_info.eventChannelNameLength)
pwm = xcp.get_measurement(xm, &quot;PWM&quot;, session)
print(pwm)
pwm_filter = xcp.get_measurement(xm, &quot;PWMFiltered&quot;, session)
print(pwm_filter)

value = 5
PWM_Level = xcp.get_characteristic_value(xm, &quot;PWM_Level&quot;, session)
print(PWM_Level)

xcp.set_characteristic_value(xm, value, &quot;PWM_Level&quot;, session)

PWM_Level = xcp.get_characteristic_value(xm, &quot;PWM_Level&quot;, session)
print(PWM_Level)

daq_parser.setup()
daq_parser.start()
sleep(1)
daq_parser.stop()
session.close()
xm.disconnect()&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;em&gt;get_measurement &lt;/em&gt;uploads the specified measurement value from slave to master. &lt;em&gt;set_characteristic_value &lt;/em&gt;downloads the specified characteristic value from master to slave. &lt;em&gt;get_characteristic_value &lt;/em&gt;uploads the specified characteristic value from slave to master.&lt;/p&gt;&lt;p&gt;Once the DAQ sequence is started, the results are stored in the .csv file in our example. You can parse that file using our custom function as follows:&amp;nbsp;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-family:Source Code Pro,Monaco,Consolas,monospace,serif&quot;&gt;&lt;span style=&quot;font-size:14px&quot;&gt;data_dict = parse_csv(&quot;test.csv&quot;)
for i in range(len(data_dict)):
    print(data_dict[measurement_names[i]])&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;Example XCP scripts are attached. Feel free to adapt the scripts provided to your needs.&amp;nbsp;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://typhoon-hil.com/forum/?qa=blob&amp;amp;qa_blobid=13536451398907822172&quot;&gt;XCP_on_CAN_script&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://typhoon-hil.com/forum/?qa=blob&amp;amp;qa_blobid=16624735235799792504&quot;&gt;XCP_on_ETH_script&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Example HIL SCADA panel file:&amp;nbsp;&lt;a rel=&quot;nofollow&quot; href=&quot;https://typhoon-hil.com/forum/?qa=blob&amp;amp;qa_blobid=14989128700179562455&quot;&gt;SCADA_example&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Example of config file:&amp;nbsp;&lt;a rel=&quot;nofollow&quot; href=&quot;https://typhoon-hil.com/forum/?qa=blob&amp;amp;qa_blobid=2149648188116924395&quot;&gt;config_file_with_dll&lt;/a&gt;&lt;/p&gt;</description>
<category>Knowledge Base</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=438/does-typhoon-hil-support-xcp-protocol</guid>
<pubDate>Tue, 05 Aug 2025 13:50:02 +0000</pubDate>
</item>
<item>
<title>Does Typhoon HIL support UDS on CAN protocol?</title>
<link>https://typhoon-hil.com/forum/?qa=436/does-typhoon-hil-support-uds-on-can-protocol</link>
<description>&lt;p&gt;Yes&lt;strong&gt;,&amp;nbsp;&lt;/strong&gt;Typhoon HIL supports UDS on CAN protocol.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;1. Introduction&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The Unified Diagnostic Services (UDS) communication protocol is a standardized diagnostic protocol used in the automotive industry for communicating with and diagnosing electronic control units (ECUs) in vehicles. It can operate over Controller Area Network (CAN) bus, a widely-used communication network in modern vehicles.&lt;/p&gt;&lt;p&gt;Unified Diagnostic Services (UDS) is a client-server protocol commonly used in the automotive industry for diagnostic communication between a client (usually a diagnostic tool or tester) and a server (an electronic control unit or ECU within a vehicle). In this context:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Client: The client, typically a diagnostic tool or software application, initiates communication with the ECU by sending diagnostic requests and commands.&lt;/li&gt;&lt;li&gt;Server: The server, which is the ECU within the vehicle, responds to the client&#039;s requests, providing diagnostic information, performing actions requested by the client, and managing the internal functions of the ECU.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;2. UDS in Typhoon HIL toolchain&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;UDS Client is supported in the Typhoon HIL toolchain in HIL SCADA, via the Python library&amp;nbsp;&lt;a rel=&quot;nofollow&quot; href=&quot;http://github.com/pylessard/python-udsoncan&quot;&gt;udsoncan&lt;/a&gt;.&amp;nbsp;Parsing and importing of CDD files is done with the Python library&amp;nbsp;&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://github.com/cantools/cantools&quot;&gt;cantools&lt;/a&gt;. UDS Server is not supported in the Typhoon HIL toolchain.&lt;/p&gt;&lt;p&gt;Attached below is an example HIL SCADA panel file, where you can open the widget properties and write the Python code you want to execute.&lt;/p&gt;&lt;p&gt;First, import the libraries and modules for UDS communication and other libraries.&lt;/p&gt;&lt;pre&gt;import isotp
import cantools
from udsoncan.connections import *
from udsoncan.client import Client
from udsoncan import DataIdentifier, IOValues
from udsoncan.configs import default_client_config
import os.path, os&lt;/pre&gt;&lt;p&gt;To access additional Python scripts in your simulation, you will need to append the path for the script to the system path.&lt;/p&gt;&lt;p&gt;sys.path.append(&quot;d:/path/to/python/file&quot;)&lt;br&gt;from uds_script import UDSclass, create_config_dict&lt;/p&gt;&lt;p&gt;The CDD file plays a crucial role in defining the communication parameters and structure for diagnostic communication between a diagnostic tool (such as a scan tool or diagnostic tester) and the electronic control unit (ECU) within a vehicle. To load this file, we use the&amp;nbsp;&lt;em&gt;cantools&amp;nbsp;&lt;/em&gt;library and the&amp;nbsp;&lt;em&gt;create_config_dict&amp;nbsp;&lt;/em&gt;function:&lt;/p&gt;&lt;pre&gt;database_uds_example = cantools.db.load_file(uds_example_path)
config = dict(default_client_config)
config = create_config_dict(database=database_uds_example, config=config)&lt;/pre&gt;&lt;p&gt;To initialize the UDS Client we need to define the link layer, network layer, transport layer, and the interface between the application and transport layer:&lt;/p&gt;&lt;pre&gt;bus = VectorBus(channel=0, bitrate=500000, app_name=&quot;UDSsim&quot;) - Link Layer (CAN protocol)
tp_addr = isotp.Address(isotp.AddressingMode.Normal_11bits, txid=0x700, rxid=0x600)- Network layer
stack = isotp.CanStack(bus=bus, address=tp_addr, params=isotp_params) - Network/Transport layer (IsoTP protocol)
conn = PythonIsoTpConnection(stack) - interface between Application and Transport layer&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;After we have created the connection layers and config parameters, we can create the UDS Client:&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;pre&gt;with Client(conn=conn, request_timeout=3, config=config) as client:&lt;/pre&gt;&lt;p&gt;After that, we can use the functions defined in the udsoncan library&amp;nbsp;&lt;em&gt;(open, close, tester_present)&amp;nbsp;&lt;/em&gt;to communicate with the server and get additional information.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here is an example how to communcate with the server:&lt;/p&gt;&lt;pre&gt;# Read and write data example for did = &quot;Windows&quot;
 uds.read_data(client=client, database=database_uds_example, did_ident=0x81)

 uds.write_data(client, database_uds_example, name=&quot;Windows&quot;, value=(0x04, 0x03, 0x02, 0x01))

 uds.read_data(client, database_uds_example, did_ident=0x81)

 uds.io_control_write(client, database_uds_example, name=&quot;Windows&quot;, values=(0x08, 0x07, 0x06, 0x05))&lt;/pre&gt;&lt;p&gt;The&amp;nbsp;&lt;em&gt;read_data&lt;/em&gt;&amp;nbsp;function reads the data from a specific ECU data identifier, while the&amp;nbsp;&lt;em&gt;write_data&lt;/em&gt;&amp;nbsp;function writes data to a specific ECU data identifier.&lt;/p&gt;&lt;p&gt;An example UDS script is attached. Feel free to adapt the scripts provided to your needs.&lt;a rel=&quot;nofollow&quot; href=&quot;https://typhoon-hil.com/forum/?qa=blob&amp;amp;qa_blobid=12487893191047436312&quot;&gt;uds_script&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://typhoon-hil.com/forum/?qa=blob&amp;amp;qa_blobid=1010900618394658647&quot;&gt;uds_example&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
<category>Knowledge Base</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=436/does-typhoon-hil-support-uds-on-can-protocol</guid>
<pubDate>Tue, 05 Aug 2025 06:47:52 +0000</pubDate>
</item>
<item>
<title>Answered: Merging of &quot;Advanced C function&quot; with &quot;C function&quot;</title>
<link>https://typhoon-hil.com/forum/?qa=401/merging-of-advanced-c-function-with-c-function&amp;show=402#a402</link>
<description>&lt;p&gt;Hi Ognjen,&lt;/p&gt;&lt;p data-start=&quot;80&quot; data-end=&quot;276&quot;&gt;Yes, the Advanced C Function has been merged into the C Function component. This means that all functionalities previously available in the Advanced C Function are now available in the C Function.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p data-start=&quot;278&quot; data-end=&quot;514&quot;&gt;For information about the exact software version in which this (and other) change was introduced, I suggest checking the &lt;a rel=&quot;nofollow&quot; href=&quot;https://subscription.typhoon-hil.com/download/get/docs/release_notes.html&quot;&gt;Typhoon HIL Control Center release notes&lt;/a&gt;. You’ll see that this merge was introduced in the 2023.4 software version.&lt;/p&gt;&lt;p&gt;Best regards,&lt;br&gt;Dusan&lt;/p&gt;</description>
<category>Knowledge Base</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=401/merging-of-advanced-c-function-with-c-function&amp;show=402#a402</guid>
<pubDate>Thu, 22 May 2025 08:08:55 +0000</pubDate>
</item>
<item>
<title>Answered: Importing Functional Mock-up Interface (FMU) in Typhoon that doesn&#039;t contain source code?</title>
<link>https://typhoon-hil.com/forum/?qa=303/importing-functional-interface-typhoon-doesnt-contain-source&amp;show=304#a304</link>
<description>&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://uploads.dailydot.com/146/6e/6d78ec0c8c8eaf31.png?q=65&amp;amp;auto=format&amp;amp;w=1200&amp;amp;ar=2:1&amp;amp;fit=crop&quot;&gt;Greetings,&lt;/a&gt;&lt;/p&gt;&lt;p&gt;There is an option to precompile the FMU, which would make a new precompiled FMU zip file. Source files are compiled and linked into a static library while all source and header files from the original FMU zip are deleted.&lt;/p&gt;&lt;p&gt;You can do this by using our Schematic API function:&lt;/p&gt;&lt;pre&gt;&lt;strong&gt;precompile_fmu&lt;/strong&gt;&lt;span style=&quot;color:#000000; font-family:Consolas,Menlo,&amp;quot;DejaVu Sans Mono&amp;quot;,&amp;quot;Bitstream Vera Sans Mono&amp;quot;,monospace; font-size:larger&quot;&gt;() - &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.typhoon-hil.com/documentation/typhoon-hil-api-documentation/schematic_api.html#typhoon.api.schematic_editor.SchematicAPI.precompile_fmu&quot;&gt;link&lt;/a&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;Example of usage of this function is in the attachment. Make sure to put the FMU and script in the same folder, and to adjust the path variable in the script (&lt;a rel=&quot;nofollow&quot; href=&quot;https://typhoon-hil.com/forum/?qa=blob&amp;amp;qa_blobid=1105513501398584930&quot;&gt;link to download the script&lt;/a&gt;).&lt;/p&gt;&lt;p&gt;When running the script, use the command:&lt;/p&gt;&lt;pre&gt;&lt;strong&gt;&lt;span style=&quot;color:#000000; font-family:Consolas,Menlo,&amp;quot;DejaVu Sans Mono&amp;quot;,&amp;quot;Bitstream Vera Sans Mono&amp;quot;,monospace; font-size:larger&quot;&gt;typhoon-python script.py&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;p&gt;When you execute it, another FMU should appear with _precompiled appended. This FMU won&#039;t contain source code.&lt;/p&gt;&lt;p&gt;When you import it into the Typhoon FMU component, the&amp;nbsp;Platforms parameter should list &quot;typhoon&quot;, as it is presented in the figure below:&lt;/p&gt;&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;https://typhoon-hil.com/forum/?qa=blob&amp;amp;qa_blobid=15775305018320051927&quot; style=&quot;height:507px; width:600px&quot;&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Hope this helps!&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Best regards,&lt;/p&gt;</description>
<category>Knowledge Base</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=303/importing-functional-interface-typhoon-doesnt-contain-source&amp;show=304#a304</guid>
<pubDate>Fri, 10 Jan 2025 13:39:58 +0000</pubDate>
</item>
<item>
<title>Answered: How to quickly check if my license includes technical support?</title>
<link>https://typhoon-hil.com/forum/?qa=214/how-to-quickly-check-if-license-includes-technical-support&amp;show=215#a215</link>
<description>&lt;p&gt;1. Log into &lt;a rel=&quot;nofollow&quot; href=&quot;https://subscription.typhoon-hil.com/&quot;&gt;&lt;span style=&quot;color:#2980b9&quot;&gt;MyTyphoon&lt;/span&gt;&lt;/a&gt;&amp;nbsp;subscription&amp;nbsp;portal.&lt;/p&gt;&lt;p&gt;2. Check if your company/university&amp;nbsp;name is listed under&amp;nbsp;&quot;Customer Site&quot;.&lt;/p&gt;&lt;p&gt;If the customer site field states any of the following: &lt;em&gt;Virtual HIL demo, Virtual Microgrid Testbed, TyphoonSim Beta&amp;nbsp;&lt;/em&gt;then you are not entitled to subscription-based technical support and should seek community help here on the forum.&lt;/p&gt;&lt;p&gt;You can gain access to support service by obtaining the&amp;nbsp;proper &lt;a rel=&quot;nofollow&quot; href=&quot;https://ticket.typhoon-hil.com/kb/faq.php?id=206&quot;&gt;&lt;span style=&quot;color:#2980b9&quot;&gt;activation key&lt;/span&gt;&lt;/a&gt;&amp;nbsp;supplied with the purchase of your HIL testbed.&lt;/p&gt;</description>
<category>Knowledge Base</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=214/how-to-quickly-check-if-license-includes-technical-support&amp;show=215#a215</guid>
<pubDate>Wed, 06 Nov 2024 10:20:04 +0000</pubDate>
</item>
<item>
<title>Answered: Can I simulate the parasitic properties of my MOSFETs?</title>
<link>https://typhoon-hil.com/forum/?qa=174/can-i-simulate-the-parasitic-properties-of-my-mosfets&amp;show=175#a175</link>
<description>Unfortunately, simulating parasitics is not practically feasible to be determined on real-time simulation platforms simply because the simulation needs to be very fast to simulate such dynamics, which will not be currently possible with existing FPGA&amp;#039;s. However, simulating losses can be efficiently done in Typhoon HIL.</description>
<category>Knowledge Base</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=174/can-i-simulate-the-parasitic-properties-of-my-mosfets&amp;show=175#a175</guid>
<pubDate>Wed, 23 Oct 2024 12:11:10 +0000</pubDate>
</item>
<item>
<title>Answered: Error message &quot;Serial link is down&quot;</title>
<link>https://typhoon-hil.com/forum/?qa=172/error-message-serial-link-is-down&amp;show=173#a173</link>
<description>&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;This error message indicates that HIL devices parallelization is not established in a proper way. &lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;To fix this issue, you should check&amp;nbsp; documentation about HIL device paralleling process &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.typhoon-hil.com/documentation/typhoon-hil-hardware-manual/hil_paralleling_guide/References/hardware_setup.html&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color:windowtext&quot;&gt;here&lt;/span&gt;&lt;/a&gt;, while this&amp;nbsp;&lt;a rel=&quot;nofollow&quot; href=&quot;https://youtu.be/7x1887dfuZs?si=O8klxd3DPAtZ_NvB&amp;amp;t=152&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color:windowtext&quot;&gt;video&lt;/span&gt;&lt;/a&gt;&amp;nbsp;presents the process itself.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
<category>Knowledge Base</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=172/error-message-serial-link-is-down&amp;show=173#a173</guid>
<pubDate>Tue, 22 Oct 2024 14:56:20 +0000</pubDate>
</item>
<item>
<title>Answered: I need to measure Short/Long-Term Flicker Severity for the 50 Hz grid, how can I do it?</title>
<link>https://typhoon-hil.com/forum/?qa=170/need-measure-short-long-term-flicker-severity-for-the-grid-how&amp;show=171#a171</link>
<description>&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;Measuring flicker severity and other related parameters is possible using&amp;nbsp;&lt;em&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.typhoon-hil.com/documentation/typhoon-hil-typhoontest-library/api/typhoon.test.IEC61000.flickermeter.html&quot;&gt;&lt;span style=&quot;color:windowtext&quot;&gt;typhoon.test.IEC61000.flickermeter&lt;/span&gt;&lt;/a&gt;&lt;/em&gt;&amp;nbsp;API function from the &lt;em&gt;TyphoonTest&lt;/em&gt; Library.&lt;span style=&quot;mso-spacerun:yes&quot;&gt;&amp;nbsp; &lt;/span&gt;This function should be implemented on the provided(captured) voltage samples from the simulation.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
<category>Knowledge Base</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=170/need-measure-short-long-term-flicker-severity-for-the-grid-how&amp;show=171#a171</guid>
<pubDate>Tue, 22 Oct 2024 13:08:39 +0000</pubDate>
</item>
<item>
<title>Answered: How can I import C code that I previously exported from Typhoon HIL Schematic Editor?</title>
<link>https://typhoon-hil.com/forum/?qa=165/import-code-previously-exported-typhoon-schematic-editor&amp;show=166#a166</link>
<description>&lt;p&gt;Greetings,&lt;/p&gt;&lt;p&gt;Importing C function code, which was previously exported from Typhoon HIL Schematic editor, requires calling functions defined in the header file exported from Typhoon. Functions for initialization and execution of the code take structures as arguments, therefore it is also necessary to prepare these structures and initialize the structure members.&amp;nbsp;&lt;/p&gt;&lt;p&gt;First, let’s look at the practical example, by exporting the code from the Typhoon HIL Boost converter example model, where the control part consists of the PID regulator, logical and mathematical blocks.&lt;/p&gt;&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;https://typhoon-hil.com/forum/?qa=blob&amp;amp;qa_blobid=8924269570611977238&quot; style=&quot;height:313px; width:600px&quot;&gt;&lt;/p&gt;&lt;p&gt;The part of the model we want to export, we will put inside a subsystem and rename all input and output ports. Afterward, C code export will be executed. If you want to learn more about C code export from Typhoon, please take a look &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.typhoon-hil.com/documentation/typhoon-hil-software-manual/concepts/c_code_export.html&quot;&gt;at this link&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;https://typhoon-hil.com/forum/?qa=blob&amp;amp;qa_blobid=8500583839087390831&quot; style=&quot;height:242px; width:432px&quot;&gt;&lt;/p&gt;&lt;p&gt;Now, when the C code is exported, let’s replace this subsystem with a new C code function block. In the General tab, all inputs and outputs should be defined.&lt;/p&gt;&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;https://typhoon-hil.com/forum/?qa=blob&amp;amp;qa_blobid=15693539788776345764&quot; style=&quot;height:273px; width:600px&quot;&gt;&lt;/p&gt;&lt;p&gt;In the additional sources tab, all exported files should be included (&lt;em&gt;except backup files&lt;/em&gt;).&lt;/p&gt;&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;https://typhoon-hil.com/forum/?qa=blob&amp;amp;qa_blobid=15677856659485259398&quot; style=&quot;height:484px; width:530px&quot;&gt;&lt;/p&gt;&lt;p&gt;Now, let’s open the header file (&lt;em&gt;boostcontrol.h&lt;/em&gt;) that we exported. There you can find declarations of model data structure that consist of inputs, outputs, sinks, and states. It is necessary to define these structures in the Typhoon Arbitrary variables section, so that Typhoon can access the ones provided in additional sources. Below you can see the structure declaration that we need to copy in the Arbitrary variable section:&lt;/p&gt;&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;https://typhoon-hil.com/forum/?qa=blob&amp;amp;qa_blobid=14195013089215767853&quot; style=&quot;height:266px; width:600px&quot;&gt;&lt;/p&gt;&lt;p&gt;When we are copying these declarations to the Arbitrary variable, it is necessary to delete the “extern” keyword.&lt;/p&gt;&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;https://typhoon-hil.com/forum/?qa=blob&amp;amp;qa_blobid=1971137081747195870&quot; style=&quot;height:547px; width:600px&quot;&gt;&lt;/p&gt;&lt;p&gt;Now, let’s focus on the&amp;nbsp;&lt;em&gt;init_fnc &lt;/em&gt;section. Back in the header file (&lt;em&gt;boostcontrol.h&lt;/em&gt;), there is also an initialization function that needs to be run in the init_func of Functions tab:&lt;/p&gt;&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;https://typhoon-hil.com/forum/?qa=blob&amp;amp;qa_blobid=7258340933312045746&quot; style=&quot;height:69px; width:600px&quot;&gt;&lt;/p&gt;&lt;p&gt;However, before we call the &lt;em&gt;init &lt;/em&gt;function, we have to assign the addresses of variables we defined in Variables arbitrary definitions to ModelData structure member pointers. When we finish, our &lt;em&gt;init_fnc &lt;/em&gt;tab should look like this:&lt;/p&gt;&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;https://typhoon-hil.com/forum/?qa=blob&amp;amp;qa_blobid=8753152985806775726&quot; style=&quot;height:547px; width:600px&quot;&gt;&lt;/p&gt;&lt;p&gt;Lastly, we can focus on the&amp;nbsp;&lt;em&gt;output_fnc &lt;/em&gt;tab. At the beginning of each execution rate, we first have to assign inputs of the C function block to Model Data input structure members (&lt;em&gt;boostcontrol_ExtIn&lt;/em&gt;). Afterward, we call the step function while passing the address of the Model Data structure, and in the end we feed our output variables from Model Data output structure members (&lt;em&gt;boostcontrol_ExtOut&lt;/em&gt;).&lt;/p&gt;&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;https://typhoon-hil.com/forum/?qa=blob&amp;amp;qa_blobid=14438728441274784729&quot; style=&quot;height:547px; width:600px&quot;&gt;&lt;/p&gt;&lt;p&gt;After this step, you can finally compile the model and load the model to HIL device or run it in TyphoonSim.&lt;/p&gt;&lt;p&gt;Additionally, if you want to import dll file instead of a C code, please take a look at this Application note – &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.typhoon-hil.com/documentation/typhoon-hil-application-notes/References/how_to_import_DLL_files_in_typhoon_hIl_model.html&quot;&gt;How to import DLL file for C function&lt;/a&gt;, or this section of a C function block documentation – &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.typhoon-hil.com/documentation/typhoon-hil-software-manual/References/c_function.html#reference_dnw_fft_qz__section_asc_yhm_jbb&quot;&gt;Library import tab&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;If you have any additional questions, feel free to post them here.&lt;/p&gt;&lt;p&gt;Hope this helps!&lt;/p&gt;</description>
<category>Knowledge Base</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=165/import-code-previously-exported-typhoon-schematic-editor&amp;show=166#a166</guid>
<pubDate>Wed, 16 Oct 2024 14:21:32 +0000</pubDate>
</item>
<item>
<title>Answered: Can I simulate Three Phase A-NPC RB-IGBT in Typhoon HIL?</title>
<link>https://typhoon-hil.com/forum/?qa=135/can-i-simulate-three-phase-a-npc-rb-igbt-in-typhoon-hil&amp;show=136#a136</link>
<description>&lt;p&gt;Greetings,&lt;/p&gt;&lt;p&gt;Although there is no corresponding converter with exact topology as in the figure you attached available in Typhoon HIL, you can use a &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.typhoon-hil.com/documentation/typhoon-hil-software-manual/References/three-phase_three-level_t-type_inverter_rectifier.html&quot;&gt;Three Phase T-Type converter&lt;/a&gt; instead. If controlled in the proposed manner, this converter should operate in the same way.&lt;/p&gt;&lt;p&gt;To operate the&amp;nbsp;Three Phase T-Type converter in the same manner as NPC with RB-IGBT, gate drive signals would have to be assigned to the following switches:&lt;/p&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; style=&quot;width:500px; border-spacing: 1px;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-family:&amp;quot;Helvetica Neue&amp;quot;,Helvetica,Arial,sans-serif; font-size:14px; letter-spacing:0.15px&quot;&gt;NPC T-Type converter&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-family:&amp;quot;Helvetica Neue&amp;quot;,Helvetica,Arial,sans-serif; font-size:14px; letter-spacing:0.15px&quot;&gt;NPC with RB-IGBT&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;img alt=&quot;&quot; src=&quot;https://typhoon-hil.com/forum/?qa=blob&amp;amp;qa_blobid=16019735493224689738&quot; style=&quot;height:575px; width:600px&quot;&gt;&lt;/td&gt;&lt;td&gt;&lt;img alt=&quot;&quot; src=&quot;https://typhoon-hil.com/forum/?qa=blob&amp;amp;qa_blobid=16659127811553073379&quot; style=&quot;height:660px; width:600px&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;ul&gt;&lt;li&gt;GDS for NPC RB-IGBT T1 should be assigned to NPC T-Type S_1&lt;/li&gt;&lt;li&gt;GDS for NPC RB-IGBT&amp;nbsp;T2 should be assigned to NPC T-Type S_4&lt;/li&gt;&lt;li&gt;GDS for NPC RB-IGBT&amp;nbsp;T3 should be assigned to NPC T-Type S_3&lt;/li&gt;&lt;li&gt;GDS for NPC RB-IGBT&amp;nbsp;T4 should be assigned to NPC T-Type S_2&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;Hope this helps!&lt;/div&gt;</description>
<category>Knowledge Base</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=135/can-i-simulate-three-phase-a-npc-rb-igbt-in-typhoon-hil&amp;show=136#a136</guid>
<pubDate>Tue, 24 Sep 2024 11:57:49 +0000</pubDate>
</item>
<item>
<title>Answered: I get the following error: Core Coupling 1.cpl1 sides are connected. Compilation process interrupted. What should I do?</title>
<link>https://typhoon-hil.com/forum/?qa=112/following-coupling-connected-compilation-process-interrupted&amp;show=113#a113</link>
<description>&lt;p&gt;Hello!&lt;/p&gt;&lt;p&gt;When core couplings divide the circuit, there should be no nodes in separate electrical circuits that are connected directly. Even though it seems that there are no nodes connected directly in your circuit, ground components are connected to the same node.&lt;/p&gt;&lt;p&gt;There are two ways to fix this issue, which are thoroughly explained in this FAQ:&amp;nbsp;&lt;a rel=&quot;nofollow&quot; href=&quot;https://ticket.typhoon-hil.com/kb/faq.php?id=127&quot;&gt;How to connect grounds in multi-core models?&lt;/a&gt;&lt;/p&gt;&lt;p&gt;For your particular case, you can either select the checkbox &lt;strong&gt;Set Ground component scope to core&lt;/strong&gt;, in &lt;strong&gt;Circuit Solver settings&lt;/strong&gt; of &lt;strong&gt;Model settings&lt;/strong&gt;, or you can increase the number of phases in core coupling and then connect the ground nodes to an additional port of the core coupling.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;</description>
<category>Knowledge Base</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=112/following-coupling-connected-compilation-process-interrupted&amp;show=113#a113</guid>
<pubDate>Mon, 09 Sep 2024 13:43:08 +0000</pubDate>
</item>
</channel>
</rss>