10-27-2011 05:24 AM
Dear Mateusz,
I wrote an email to one of ThruVision engineer and this is the reply:
"Unfortunately we do not have a TS4 driver for LabView. The THz camera is not using the GigE Vision protocol.
If ThruViewer is running and using the TSL Emit filter, data will be emitted from ThruViewer in the TCP/IP format described in the ThruViewer SDK – TSL Data Format.pdf. This document formed part of the SDK.
Alternatively, you will need to write some software that calls the functions described in the ThruViewer SDK – API Documentation.pdf document. "
according to his reply we have a traditional TCP/IP protocol. I don't see any other option than using .NET assemblies.
11-01-2011 11:27 AM
Hi again,
I made a little step forward, I already have a communication DLL written in C++ and a header file. Unfortunately most of functions cannot be recognized because of the preprocessor definitions error (according to errors given by LabView). I hope there is a solution for this problem. I attached header file and .dll file. Can anyone please look at this files and suggest some solution(s)?
regards,
Marcin
11-02-2011 11:27 AM
Dear Marcin,
how are you using it in LabVIEW?
Have you tried Tools>>Import>>Shared Library (.dll)?
Best regards,
11-02-2011 11:36 AM
Dear Mateusz,
Yes, I have tried to import dll file as a shared library but the result is not fully satisfactory. The problem is that only 28 functions of 65 declared can be parsed. I had a problem with header files previously but I've already solved it. At the moment the only problem is how to add proper preprocessor declarations. I used following declarations:
WIN32; NIAPI=_stdcall;
Most of functions declared in header file are WINAPI functions - I am not really sure if WIN32 declaration works with WINAPI functions. Can you help me with that?
regards
Marcin
11-02-2011 01:30 PM
Although there are 65 functions exported in the dll, as labview claims, only about 35 are actually declared in the header and are the functions you need access to. So, you don't need to worry about the other 30 functions that labview cannot import.
Now, out of the 35 functions declared in the header, labview only imports 28 immediately, to get it to import the other 7 you have to add the following in the preprocessor "LPCSTR= const char *;LPSTR= char *", without the quotes.
This appears to be very old code (late 90s), so I don't know if it will work.
Also, please post in one thread only for the same issues (http://forums.ni.com/t5/LabWindows-CVI/Missing-header-file-during-dll-import/td-p/1760678)
11-02-2011 05:02 PM
myle00,
thank you for your sugestions, tomorrow I will check this. Well, if the code is very old it seems to be weird - this dll works with a new camera, available only one year on the market.
Sorry for double threads.
regards,
Marcin
11-02-2011 05:10 PM - edited 11-02-2011 05:16 PM
I don't know if the dll itself is old, but the code it relies on is old. In the header file it includes vfw.h, that has been superseded by other things as far as I know (http://en.wikipedia.org/wiki/Video_for_Windows). But, I guess it'd still work because of Windows backward compatibility.
11-03-2011 02:19 AM
OK. Finally, it works, I have 35 functions.