NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI localtime to get the Day of the Year

I have a vendor supplied driver that needs the day of the year (0-365), minutes, hours, seconds for their board so that it updates itself to the correct time. I am looking at the LabWindows/CVI functions time and localtime to get this information. Those calls are documented in   ...\CVI2010\include\ansi\time.h   with the code contained within  C:\windows\system32\cvirte.dll

 

when I set up the module within TestStand, I get a message that states:

 

This function either does not have parameter information in the DLL or user types not recognized by TestStand.

 

Not a problem. I used the information within time.h to setup the parameters for the function time. That function works fine. The function localtime returns a structure with the individual time elements. I created a Custom Data Type to define the structure. I cannot seem to determine how to define the module for this action so that it will work.

 

I am including the sequence file, .h file, and the dll to help you understand what I am attempting to acomplish. Perhaps I am not using the correct dll or there is a better option. Any help would be appreciated.

 

NOTE: I could not attach a DLL so I renamed the extension to LLB. You will need to rename it back to DLL.

Download All
0 Kudos
Message 1 of 2
(4,244 Views)

Hey Bill,

 

I think what might be causing issues is that you are calling directly into the CVI Run-Time Engine, which we do not publish an API for and generally do not intend to be called directly from another application. I would recommend creating a simple DLL in CVI to call the functions you want, such as localtime(). This will allow you to use the CVI function panels and other Help resources to correctly configure your function call. You can simply create a wrapper function which calls localtime and returns the value you are interested in. If you build this wrapper code into a DLL, you should be able to call it from TestStand.

 

I hope this helps, and let me know if you have any more questions about it!

0 Kudos
Message 2 of 2
(4,233 Views)