- Trap when linking a LabView DLL

From: [at]} <Rainer>
Date: Sat, 28 Jul 2007 13:52:16 +0200

Hi all,
I'm relatively new to BlackBox and this is the first time I'm asking for help, so I would like to say "hello" to the whole community :-)

My intention is to use hardware for automatic test equipment from National Instruments. It comes with a graphical data flow language called LabView which offers a lot of subroutines (called VI's: virtual instruments) to interface with their hardware. My idea is to group these subroutines, build DLL's and to import the DLL's in BlackBox to get rid of the very time consuming graphical programming and the data flow concept.

Meanwhile I have a couple of LabView DLL's being called from BlackBox and everything works fine so far. Recently I tried to link a small BlackBox application to an .exe file which works as well. But when I include a call to a LabView DLL in my BlackBox code the linker traps.

Is anybody experienced in calling LabView code from BlackBox ?
Does anybody have an idea what I did wrong in linking the application ?

The BlackBox code looks like this:

MODULE ZgwDummytest;
IMPORT Dialog, LabviewTime, StdLog;

StdLog.String ("ZgwDummytest: Executing ..."); StdLog.Ln;
StdLog.String (Dialog.commandLinePars); StdLog.Ln;
LabviewTime.DelayInms (1000); (* This call executes DLL-Code *)
StdLog.String ("Terminating."); StdLog.Ln
END Execute;
END ZgwDummytest.


DevLinker.Link ZgwDummytest.exe :=
Kernel$ + Files HostFiles StdLoader Math Strings Dates Meta Dialog Services
Fonts Ports Stores Converters Sequencers Models Printers Log Views
Controllers Properties Printing Mechanisms Containers
Documents Windows StdCFrames Controls StdDialog StdApi StdCmds StdInterpreter
HostRegistry HostFonts HostPorts OleData HostMechanisms HostWindows
HostPrinters HostClipboard HostCFrames HostDialog HostCmds
HostMenus HostPictures TextModels TextRulers TextSetters TextViews
TextControllers TextMappers StdLog TextCmds
FormModels FormViews FormControllers FormGen FormCmds
StdFolds StdLinks StdDebug HostTextConv HostMail
StdMenuTool StdClocks StdStamps StdLogos StdCoder StdScrollers
OleStorage OleServer OleClient StdETHConv Init
LabviewTypes LabviewTime ZgwDummytest
1 applogo.Ico 2 doclogo.Ico 3 SFLogo.ico 4 CFLogo.ico 5 DtyLogo.ico
1 Move.cur 2 Copy.cur 3 Link.cur 4 Pick.cur 5 Stop.cur 6 Hand.cur 7 Table.cur ~

When I execute the DevLinker.Link command above the linker traps:

NIL dereference (read)

 DevLinker.WriteCode [00003757H]
.a INTEGER 4878532
.exp DevLinker.Export NIL
.fp INTEGER 24
.m DevLinker.Module [012982E0H]
.mod DevLinker.Module [01061B90H]
.name DevLinker.Name "DelayInms" ...
.opt INTEGER 0
 DevLinker.WriteOut [00004CB0H]
.codepos INTEGER 1024
.conpos INTEGER 2282996
.end INTEGER 0
.exppos INTEGER 1709057541
.imppos INTEGER 17295184
.name Files.Name "ZgwDummytest.exe" ...
.relend INTEGER 1818587694
.relpos INTEGER 2282984
.res INTEGER 66
.rsrcpos INTEGER 66

The Linker tries to read exp.name but unfortunately exp is set to NIL.

When I comment out the call to LabviewTime.DelayInms (which is the call into the DLL) the linking works well and the application is built to an .exe file.

Could anybody please give me a hint how to solve this problem ?
Thanks a lot in advance.

Best regards,

Received on Sat Jul 28 2007 - 13:52:16 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:31:27 UTC