suamikim
2006-02-02 08:40:37 UTC
Hi,
i've just startet to work with LabView and am trying to solve a (actually simple) problem:
I want to read the 8 analog input-channels and the 4 relay-channels of
a connected FieldPoint (FP-1601, FP-RLY-422, FP-AI-100). This
functionality should be used as a dll in a c++-program.
By now i'm able to read the channels in the vi but the usage of the dll in my c++-program behaves a little strange:
Calling the LVDLLStatus-function of the dll in my program allways results in error 1003 (kLVE_VIBad, The VI is not executable -> according to LabView-help) and the error-msg is the name of the vi.
Do i have to take care of something special making a dll with
FieldPoint-assistance? For testing i also made some simple dll's
without FieldPoint-assistance which worked fine (i.e. to add up
figures).
Independent of the "FieldPoint-problem" there is another problem i'm struggling with:
At the first call of a dll-function the program hangs up with the following error-message:
"FieldPointTest.exe has triggered a breakpoint"
At this point i can continue the execution by pressing the
"continue"-button whereupon execution of the program proceeds nomally
(also when i call another dll-function).
After the hang-up there is a new message in the program-output which says:
"DLL 'C:\Program Files\National Instruments\Shared\LabVIEW
Run-Time\7.1\DNCompInfo.dll' is attempting managed execution inside OS
Loader lock. Do not attempt to run managed code inside a DllMain or
image initialization function since doing so can cause the application
to hang."
This problem also appears at dll's without FieldPoint but only when
i start the execution out of the designer (Visual Studio 2005). If i
start the compiled exe the program executes normally without any
error-messages.
I hope there is somebody who can help me any further cause i've
allready searched a lot in the internet and can't find anything help anymore.
Especially regarding FieldPoint in alliance with LabView and dll's i
can't find anything helpful!
thanks, best regards
mike
i've just startet to work with LabView and am trying to solve a (actually simple) problem:
I want to read the 8 analog input-channels and the 4 relay-channels of
a connected FieldPoint (FP-1601, FP-RLY-422, FP-AI-100). This
functionality should be used as a dll in a c++-program.
By now i'm able to read the channels in the vi but the usage of the dll in my c++-program behaves a little strange:
Calling the LVDLLStatus-function of the dll in my program allways results in error 1003 (kLVE_VIBad, The VI is not executable -> according to LabView-help) and the error-msg is the name of the vi.
Do i have to take care of something special making a dll with
FieldPoint-assistance? For testing i also made some simple dll's
without FieldPoint-assistance which worked fine (i.e. to add up
figures).
Independent of the "FieldPoint-problem" there is another problem i'm struggling with:
At the first call of a dll-function the program hangs up with the following error-message:
"FieldPointTest.exe has triggered a breakpoint"
At this point i can continue the execution by pressing the
"continue"-button whereupon execution of the program proceeds nomally
(also when i call another dll-function).
After the hang-up there is a new message in the program-output which says:
"DLL 'C:\Program Files\National Instruments\Shared\LabVIEW
Run-Time\7.1\DNCompInfo.dll' is attempting managed execution inside OS
Loader lock. Do not attempt to run managed code inside a DllMain or
image initialization function since doing so can cause the application
to hang."
This problem also appears at dll's without FieldPoint but only when
i start the execution out of the designer (Visual Studio 2005). If i
start the compiled exe the program executes normally without any
error-messages.
I hope there is somebody who can help me any further cause i've
allready searched a lot in the internet and can't find anything help anymore.
Especially regarding FieldPoint in alliance with LabView and dll's i
can't find anything helpful!
thanks, best regards
mike