03-10-2017 10:45 AM
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!
Solved! Go to Solution.
03-13-2017 03:47 PM
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
03-13-2017 03:50 PM
My mistake for explicitly calling out TestStand in the TestStand forum. I was addressing the question from a VeriStand perspective. Hope that helped!
03-14-2017 07:39 AM
Thank you for the response! That's what I was looking for!
03-16-2017 01:46 AM
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
03-16-2017 07:40 AM
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.
03-16-2017 09:05 AM
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