From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

time stamp, data type for dll

Hi,

 

I'm making a dll from a vi and attemtping to read it from CVI.

The parameter input of a time stamp appear in the h file as follow:  

 

void __cdecl ValidateManufacturingDate(HWAVEFORM ManufacturingDate,
    LVBoolean *PassFail);

 

1.  what is the HWAVEFORM type?

2.  I eneter the value  07/03/2010

3,  The dll is in the system32, the project contains the lib,h,c files

4.  Compilation and linking is OK

5.  During runtime I get the following error:

 FATAL RUN-TIME ERROR:   "main.c", line 15, col 6, thread id 0x00008610:   The program has caused a 'General Protection' fault at 001B:30095383.

 

Any idea?

 

Thanks

Rafi

0 Kudos
Message 1 of 4
(2,856 Views)

Rafi2003 wrote:

Hi,

 

I'm making a dll from a vi and attemtping to read it from CVI.

The parameter input of a time stamp appear in the h file as follow:  

 

void __cdecl ValidateManufacturingDate(HWAVEFORM ManufacturingDate,
    LVBoolean *PassFail);

 

1.  what is the HWAVEFORM type?

2.  I eneter the value  07/03/2010

3,  The dll is in the system32, the project contains the lib,h,c files

4.  Compilation and linking is OK

5.  During runtime I get the following error:

 FATAL RUN-TIME ERROR:   "main.c", line 15, col 6, thread id 0x00008610:   The program has caused a 'General Protection' fault at 001B:30095383.

 

Any idea?

 

Thanks

Rafi


I don't know what HWAVEFORM is. I do know that internally the timestamp uses the same typecode as the various waveforms and is defined as a cluster containing 4 32 bit integers. More realistically it is a structure with 2 * 64bit integers, the first being the seconds since Jan 1, 1904 UTC and the second the fraction of seconds. If I need to pass timestamps through a DLL interface I usually change it on the LabVIEW side to a double however. That makes the whole business a lot easier.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 4
(2,832 Views)

Hi Rafi,

 

 Is  void __cdecl ValidateManufacturingDate(HWAVEFORM ManufacturingDate, LVBoolean *PassFail); at line 15, col 6 in main.c?  If not what is? is main.c your program name?  

 

What version of CVI and OS are you using?  There are some old KnowledgeBases that speak of bugs such as this one.

 

Kristen H.

 

 

 

0 Kudos
Message 3 of 4
(2,805 Views)

I agree with Rolf,

 

It is easier to pass a double from LabVIEW (dll) to CVI.  So try doing your conversion within LabVIEW.

 

Do you have DAQmx code in your LabVIEW application?

Message Edited by Ray.R on 03-09-2010 12:57 PM
0 Kudos
Message 4 of 4
(2,802 Views)