NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

ASAM XIL API - C# or Python?

Solved!
Go to solution

This also applies to NI VeriStand but figured I'd start the topic here.  I did see some other posts related to the XIL API but everything on the NI website and discussion forums pertain to C#.

 

I'm starting (basically from scratch) a HIL team here.  And though our first system is a dSPACE, I want to use the XIL API so that in the future when, inevitably, there is something other than just a dSPACE (i.e., NI) all of the tests can be easily used on both.  That being said, I'm wondering if there is an overwhelming reason to choose C# or Python since the API supports both.  dSPACE has recommended Python and as I stated before, I've only seen referencing to C# here.

 

What are you thoughts?

 

Thanks in advance!

0 Kudos
Message 1 of 7
(6,796 Views)
Solution
Accepted by topic author joedowdle

Both C# and Python (including variations) are valid options for calling the ASAM XIL .NEt API. At this point, your choice for development should come down to programmer's preference.

 

We do have some sample code publicly available for C#.

 

C# Walkthrough: Capturing and Logging Channel Values

http://zone.ni.com/reference/en-XX/help/372846K-01/veristand/asam_capturing_example/

 

As for Python, Iron Python and PythonNet seem to be reasonable options for calling .NET code.

 

Github: pythonnet

https://github.com/pythonnet/pythonnet

 

However, if you are looking to develop a full test executive for your HIL testing, you may want to consider a COTS solution, such as TestStand, which can directly call the ASAM XIL API.

 

Cheers!

 

Q. Smith

Applications Engineer

National Instruments

 

 

 

 

 

0 Kudos
Message 2 of 7
(6,748 Views)

My mistake for explicitly calling out TestStand in the TestStand forum. I was addressing the question from a VeriStand perspective. Hope that helped!

0 Kudos
Message 3 of 7
(6,745 Views)

Thank you for the response!  That's what I was looking for!

0 Kudos
Message 4 of 7
(6,732 Views)

Hi Joedowdle,

 

just one thing to know: asam xil api standard comes with c# source code library.

if you or your company are a member of asam you can download the standard and the hole source code. There are also Visual Studio Solutions and Projects that shows how to create your own framework or testbench Interface.

 

of course you can rewrite the hole stuff in Python. I assume dspace is using pthyon as testautomation language and is consuming the .net XIL API's. there.

 

If you want to know how to use XIL API in TestStand come to NIWeek 2017 

https://event.crowdcompass.com/niweek-2017-sessions/activity/NvBrKrYyZn

 

Regards

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 5 of 7
(6,708 Views)

That's not entirely accurate.  The ASAM XIL API does come with examples in only C# but also provides the source code in both C# and Python (at least as of the 2.0.2 version).

 

In either case, I would assume one would want to use the compiled assemblies as opposed to the source code for actual development/deployment along with the configuration files specific to your vendor.  At least this is how I understand it but I am very new to this API still.

0 Kudos
Message 6 of 7
(6,700 Views)

Hi,

 

thanks for clarifing!

When looking at main page of Standard

https://wiki.asam.net/display/STANDARDS/ASAM+XIL 

latest Version is 2.0.1 - (here i was looking for updates all the years!)

under downloads there is  a release of 2.0.2 ! since 2015!!!!!!

 

So sorry - I am still using 2.0.1 and my notes were referencing to this release.

-- time to figure out what's new.

 

Regards

Juergen  

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 7 of 7
(6,693 Views)