LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Labview 8 with MS Visual Studio .net 2003 to create .lsb file

Hi everyone,

I am using Labview 8 with MS Visual Studio .net 2003 to generate a .lsb file for my frame grabber card. I am using Labview to automate my frame grabber card (from Matrix Vision, which comes with its own Labview SDK)

I followed the step by step instructions in http://zone.ni.com/devzone/conceptd.nsf/webmain/E4EC7623343805F686256EDD00784341, which was actually meant for Labview 7.1 with MS Visual Studio .net 2003.

When I try to load the .lsb file into my vi, an error message reads "Could not get resource named MV-Open from MV-Open.lsb".

Can I seek advice on this matter?

Thanks.
0 Kudos
Message 1 of 33
(6,212 Views)

Hi,

  I was just wondering the reason for going with CIN's?
DLL's are easier to build, more understood, and allow your "driver" to be called from different languages too in the future.

Could you try building a straight DLL and calling it?

If you follow the instructions in that link you posted and generate exactly the same code, does that work?

I'll give it a try here (with CINs), but it may take me a little while to prove it works, and then if it doesn't work, I'll try to find the workaround.

Thanks

Sacha Emery
National Instruments (UK)

// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 2 of 33
(6,198 Views)

Hi,

  I've run through those instructions and made one that works ok in both debug and release modes (in release mode I had to set the C/C++>>CodeGeneration>>Basic Runtime Checks to Default instead of Both (/RTC1, equiv. to /RTCsu) because it conflicted with the 02 option that's used when creating the release mode version.

Did you do the extern "C" around your code? If not, then you'll get name mangling on the exports to the .lsb "dll" that's created.

Can you follow those instructions on the link through again explicitely and check that you can build the example code first?

Thanks

Sacha Emery
National Instruments (UK)

Message Edited by SachaE on 07-20-2006 02:49 PM

// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 3 of 33
(6,185 Views)
Hi SachaE, To answer some of your questions,

I am using CIN because my frame grabber card from Matrix Vision comes with its LabView SDK, which is making use of CINs. Hence, I have to use CIN.  (http://www.matrix-vision.com/support/softwareinfo.php?lang=en)

Your suggested method to use MS Visual Studio .Net 2003 to generate .lsb file for the sample code works. Thanks.

Another question,the LabView SDK that comes with my frame grabber is meant for LabView 7.1. I suppose if I am using LabView 8.0, I shouldnt be expecting any problems, right? I am having some problems withe the code now and I wish to eliminate the possible causes for trouble-shooting purposes.

Thanks.
0 Kudos
Message 4 of 33
(6,177 Views)
Hi SachaE,

I have another warning now. I have managed to generate my .lsb file using MS Visual Studio .Net 2003. However, when I load the code resource, i.e. the .lsb file, I see the following warning and the 'Run' icon disappeared.

MV_Open.vi
    - The shared library expected to be at "C:\Program Files\MATRIX VISION\mvLabVIEW SDK\MV_Open\MV_Open.lsb" was loaded from "NULL".

I wonder if you can help me with it? Let me know if you need more information.

Appreciate your help.
0 Kudos
Message 5 of 33
(6,173 Views)

Hi,

  can you post the sdk files and instructions and your cin project back here so I can try to build it?

There's no guarantees that the SDK developed by Matrox for LV 7 will work with LV 8 - you need to take that up with them to verify that they've tried it out since differences in the timing of their functions running in parallel with other parts you may decide to use could be different under LabVIEW 8.0 as it has had speed improvements etc over previous versions.

The SDK they've generated, I'm confused as to what you're trying to acheive now?

Are you saying they've given you the source code for the .lsb files they've provided for version 7 and you're trying to remoake them in LV 8.0?

Usually if someone provides an SDK for a particular piece of hardware they provide the vi's with it too.

If you're re-making them, then I'd recommend making them as DLL's and re-doing the vi's as necessary since that will allow you an easier build process.

Thanks

Sacha Emery
National Instruments (UK)

// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 6 of 33
(6,165 Views)

Hi,

just to avoid confusion, I mis-typed Matrix as Matrox. I know it's Matrix Vision.

Thanks

Sacha Emery
National Instruments (UK)

// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 7 of 33
(6,155 Views)
Dear Sacha,

Matrix Vision has provided me with VIs and source codes to enable me to automate the usage of their card using LabView. Matrix Vision have called the collection of VIs and the source codes as "LabView SDK". In all their VIs, they have used CIN and thus, I am using CIN. I understand from Matrix Vision that their VIs and source codes are built and compiled using LabView 5 and Visual Studio 6 and accordingly to them, the VIs have been ensured to work.

At the moment, all I want to do is to make use of their VIs (without any modifications). With the VIs and the source code, all I want is to compile the source code into a .lsb file so that I can load it into their VI. Previously, I only have MS Visual Studio .Net 2003 and thus I have some problems generating the .lsb file.

However, I have gotten a copy of MS Visual C++ 6.0 and have used it to generate the required .lsb file, following the instructions in the manual (Using external code in Labview, April 2003 edition, pages 3-15 and 3-16).

As I have explained earlier, when I used the .lsb file generated by MS Visual C++ 6.0, I see the warning message (The shared library expected to be at ... was loaded from "NULL".) and I wish to know what I have missed or done wrongly. I therefore need your expertise to help me to get the CIN in the VI to work.

I am attaching the MV_Open.lsb file I have generated following the instructions in the manual. Can you see if you are getting the same warning message as me in LabView 8.0?

I am also attaching the VI and the source code provided by Matrix Vision. Can you check if you are able to generate the .lsb file (using MS Visual C++ 6.0) and load it in LabView 8.0 successfully? In order to make the VI to carry out its function, you need the frame grabber card and additional steps. But I just wish to load the .lsb file before I move on to making the VI works.

I hope I have been clear to clarify some of your doubts/questions and ... thanks for helping.

Let me know if you need more clarifications/details.

0 Kudos
Message 8 of 33
(6,153 Views)
Dear Sacha,

I just thought you might need additional header/ library files from MV to compile and build the source code. I have included them here.

Thanks.

0 Kudos
Message 9 of 33
(6,143 Views)

Hi,

  you said : "At the moment, all I want to do is to make use of their VIs (without any modifications). "

Have you tried just opening the vi's as they were when you installed the sdk and using them?

I can open them in 8.0 fine (comes up with a "grabber.dll missing, but that's just because I don't have the main driver installed), so I don't have to make a .lsb for them, it's already done and included and loads fine direct from the install.

Thanks

Sacha Emery
National Instruments (UK)

 

// it takes almost no time to rate an answer Smiley Wink
Download All
0 Kudos
Message 10 of 33
(6,134 Views)