NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Using NI-CAN in TestStand

Hi,

I have a requirment for writing TestScript to test NICAN in TESTSTAND.

I tried with the .lib file in NICAN driver but am getting "parameters not recagonized" error.and i need to add the varibles manually.

NI can has many complex structures,which is bit weird to create them in TestStand.

Please let me know how can i use the CAN driver in TESTSTAND.

 

Thanks

IVI

0 Kudos
Message 1 of 5
(3,350 Views)

Hi IVI,

 

It is not recommended to call the driver library directly from TestStand - instead, consider creating a dll to implement your CAN testing steps which calls the CAN driver.  This way, you will have access to all of the necessary types in your C development environment, and won't need to access them directly through TestStand.  For more information on code module best practices, I'd recommend looking through the following article in the TestStand Advanced Architecture series:

 

Best Practices for Code Module Development

 

Hope this helps!

Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 2 of 5
(3,280 Views)

Did you mean that NI-CAN has so many structure parameters or particular nuances in its structure usage that it is particulary problematic to call directly? If so, that makes sense.

 

However, If by referring the best practices document you are implying it is never reasonable to call a driver directly from TestStand, then I'd disagree and I would like to be pointed to anything in the best practices document that supports that assertion so I can review it.

 

 

0 Kudos
Message 3 of 5
(3,265 Views)

James,

 

Thanks for your input!  I linked the document more as a reference for best practices than as proof of my recommendation. The closest reference in this document to this would be the "Functionality to Include in Code Modules", though this does not mention drivers directly. A couple reasons I would personally avoid calling drivers directly:

 

  • As you mentioned,many drivers use complex data as parameters, making them difficult to call
  • Creating a step for each driver call would result in very high granularity, making it more difficult to see what the sequence is doing.
  • This would also require more configuration as far as which steps to include in the database/report logging
  • As a programmer, you would have no control over what results are presented from the code modules, since you are calling driver code developed by NI

However, I definately would agree that there are cases where a direct driver calls would be the best approach, so I was a bit hasty in my blanketing statement.

Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 4 of 5
(3,261 Views)

Thanks for the clarification.

0 Kudos
Message 5 of 5
(3,259 Views)