Creating .lsb problem

Hi, I've been trying to learn how to use CINs in Labview and I'm working through the multiplication tutorial. I've read the manual on using CINs and read through various pages on this forum regarding the issue. I have tried multiple things: the CIN Custom Step.vi from this website, typing commands into cmd, editing the custom build in Visual C++, and creating a .mak file. yet none of these work, no matter what I try the dll is created successfully, the .lsb is created successfully, but when I try to load the code resource and run the VI it says that I have not loaded the code resource. Are there any other ways to do this, or might I have done something else wrong?

abriggs8 wrote:
Well I am trying to control a camera that is connected to the computer. It comes with software but we need LabVIEW (controlling other measurements) to control the camera itself. The camera software came with an SDK and requires a class structure (CCameraControl) class to do this. I attempted to use the Call library function node however the way the camera works is you create a class of this type, connect, and initialize it, then you set up the parameters you need to change from defaults (for example shutter speed, frame rate, etc.) and then you begin recording and save the images. However, all of this requires that you keep the control object you've created, it is what controls the camera. From what I understand, LabVIEW does not support class structure thus I could not call individual functions from the camera's DLL files to control the camera (tried to use clusters but it got messy, the Camera control class has 600 parameters). The code is actually quite simple with the SDK, but after failing with the DLL I decided to attempt to use a CIN. Perhaps I am looking at the problem in the wrong way, but I'd like to see if I could get it working with the CIN. By the way, this is actually the first project I've worked either with Visual C++ or LabVIEW, so while I've been studying vigorously on it I still do not know much. Thank you for you help and very fast response.
There is really nothing CINs will be able to help you here which you couldn't solve with a DLL. And a DLL is a lot easier in many aspects as it can export any number of API calls where as if you want to separate your interface into more than one CIN you end up with multiple C code fragments you need to maintain, compile and load into the according VI time after time again. Or you end up with a single CIN with zillion parameters and a function selector to give you access to the different functions this CIN implements.
What you want to do is creating a thin wrapper around your C++ interface, where you treat the object pointer itself as an extra pointer to be passed to the wrapper function.
Something like this for an idea of what I mean:
/* Declare the functions in a header file to be standard C so that C++ does not decorate them */
#if __cplusplus
extern { "C"
#endif
int MyObject_Create(MyObject ** object);
int MyObject_DoSomething1(MyObject *object, int param1, int param2);
int MyObject_DoSomethingElse(MyObject *object, int param1, int param2);
int MyObject_Destroy(MyObject * object);
#if __cplusplus
#endif
Your implementation will then look something like this:
#include <.....>
#include "myobject.h"
#include "myobject1.h" /* Above declarations */
int MyObject_Create(MyObject ** object)
*object = new MyObject;
if (!*object)
return memFullError;
return noError;
int MyObject_DoSomething1(MyObject *object, int param1, int param2)
if (!*object)
return ArgumentError;
return object->DoSomething1(param1, param2);
int MyObject_DoSomethingElse(MyObject *object, int param1, int param2)
if (!*object)
return ArgumentError;
return object->DoSomethingElse(param1, param2);
int MyObject_Destroy(MyObject * object)
if (!*object)
return ArgumentError;
delete object;
return noError;
Of course you can create more complex wrapper functions combining together several object methods if that seems to make sense for an application like LabVIEW to call them always in the same order.
Configure in the Call Library Nodes the pointer for the first function to be an uInt32 passed as pointer and for all other functions just as an uInt32 passed by value.
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • Create lsb file

    i have a problem in creating lsb file using MSVC++ version 6.my labview version is 6i.
    pls let me know where i can find the resources.
    xxxx

    Here are a couple of resources that you might find useful:
    How Do I Generate CIN Code in Microsoft Visual C++ 6?
    How to build a CIN code resource (.lsb file)
    - Elton

  • Would trying to manually load NSS Internal PKSS #11 Module create a problem or would nothing happen without a filename in the load window under Security Devices?

    Would clicking the load button while NSS Internal PKSS #11 Module is selected and accepting the pop-up window without filling in any more information create a problem for the Firefox 8 program?

    Quote from: lcwhitlock on 04-April-14, 13:44:09
    Hello darkhawk,
    Thank you for the recommendation.  I somewhat understand what a MS DOS disk is, but I'm not sure how to go about creating one. I've seen where you can use a program, like Rufus, to create a usb one  - but I'm leery about using 3rd-party programs (especially ones I'm not familiar with). I've come across a couple of 'how-to' tuts, but they didn't clarify what files (if any) I would need to include on the disk (for my particular situation). Right now I don't have any blank cds, nor any extra flash/thumb drives - wish I did, but hadn't needed these for years. There has only been one other time where I needed to re-install Windows, but that was over 15 years ago - I did it through BIOS, reformatting my drives, and then reinstalled via the Windows XP disk. Windows 8 is an entirely different breed, which has left me feeling a bit stumped, at times. If there was a way I could perform it (successfully), similar to the first time I did it years ago, I'd give it a try - but at the same time, I'm a bit reluctant, because if it doesn't work, then I'm stuck without any internet access to get further help.
    Ask and ye shall receive. This should be doable in Windows 7 and Windows 8 on another PC. I recommend using a USB Flash drive like in this tutorial, but I'm sure you could use something else.
    If you want, you could also use Hiren's BootCD to make a bootable CD with many options and programs on it (I keep one, just for certain situations) that will allow you to do the same things.
    http://www.hiren.info/pages/bootcd
    Also very useful for sorting out virus's as long as it's downloaded and made on another PC that is virus free......

  • I would like to upgrade to the next step, but because I have many problems with the version 10.4.11, I'm worried that upgrading would create more problems.

    Due to a misunderstanding with [email protected] in September of 2010, many of my applications and important files were put into the trash during a cleaning.  The trash hadn't been deleted, so a CleanApp rep told me to drag my important files to a folder on my desktop.  They were unable to help me with anymore advice with the exception that if I followed the pathway of the application, I could manually restore it to its proper location. 
    This was asking a lot of me because I didn't have the experience or knowledge of undertaking such a massive restoration.  However, I did the best I could.  What had been put in the trash was not just a few files -- there were hundreds of files or apps that I discovered in the trash.  As I said, this was a misunderstanding.  I was left feeling devastated at what had happened. 
    Since then, my iMac Intel Core Duo has been running on its last legs.  I'm surprised I can even get to my email.  As far as using the software that I bought with my iMac, I can't.  I just do the basics.
    What I have been wanting to do is to upgrade to the next level.  However, I worry that if I upgrade a crippled OS X 10.4.11 Tiger, I would be creating more problems than what I already have.  Do you agree that an upgrade would make matters worse? 

    It won't necessarily make it worse, but may not make it better.  I am not familiar with the utility you usedm though anything that cleans or maintains your Mac should be avoided unless you know what you are doing and what it does.  Probably re-installing software from the official sources (download or CDs) is the best way to ensure missing parts are all replaced.
    If this is a core duo and not a core 2 duo then the highest you can go is Snow Leopard 10.6 Get more information about your computer. Go to the Apple in the upper left corner of any window, then "About This Mac", then "More Info..."  Copy and paste the information here, but omit the serial number and Hardware UUID (if present).

  • Does it create a problem if I only connect the backup external drive every few days for use with Time Machine?  Should I have purchased Time Capsule instead?

    After a near miss with my 4-year old MacBook, I finally wised up and purchased a WD My Passport for Mac to back up my hard drive. I connected the Passport today and have performed the first full backup.  However, I do not wish to keep it permanently connected to the laptop.  Does this create a problem if I only connect the drive every few days?  Should I have purchased Time Capsule instead?

    Hello,
    I don't think it'll cause a problem, but I'd disable/turn off Time Machine before disconnecting, then turn it back on after you connect it again.

  • If I change the nation setting of my iTunes in order to buy a song from the American iTunes store, then change my setting back to the Korean store (where you cannot buy music) will that create any problems with my downloaded content?

    If I change the nation setting of my iTunes in order to buy a song from the American iTunes store, then change my setting back to the Korean store (where you cannot buy music) will that create any problems with my downloaded content? I want to buy an album that I cannot get hold of in Korea, but it is available in the US iTunes store. However since most of my apps are downloaded from the Korean store I'll need to switch back in order to update them. Does anyone know if there are any issues in doing this. I'd rather find out before I spend money, change my store setting back to Korea, and then get told I can't listen to the music because I bought it from the US store and my iTunes is set to the Korean store.
    Cheers.

    You canot easily change your country settings.  The iTunes Store in a country is intended only for use by that country's residents, and only while they are in the country. To use the iTunes Store in a country you need a credit card (or other card type if acceptable in a country) issued in that country, billed to an address in that country, and also be physically present in that country when using the store.  You are also restricted to waiting 90 days between country changes.
    E.g., "The iTunes Service is available to you only in the United States, its territories, and possessions. You agree not to use or attempt to use the iTunes Service from outside these locations. Apple may use technologies to verify your compliance." - http://www.apple.com/legal/itunes/us/terms.html#SERVICE

  • Fetching materials on basis of Division creating perfomance problem

    Hi Experts,
    i am fetching Data from three table like
    select a~matnr a~extwg
    b~charg b~werks b~clabs b~cspem b~cinsm
    c~vfdat
    from mara as a join mchb as b
    on a~matnr = b~matnr join mch1 as c on b~matnr = c~matnr  and b~charg = c~charg
    into table  itab_main
    where  a~spart = p_spart and b~werks = p_werks
    and b~lgort = 'FG01' .
    it is creating perfomance problem
    so my questin is 'is there any index table for mara ?(like vrpma for vbak)'
    so we can get all the material on base of division fast.
    Regards,
    Alpesh
    Edited by: Alpesh on Jun 2, 2009 3:56 PM

    Hi Alpesh,
    How about throwing MARC into the mix. I notice that you are searching with plant, storage location and division. Table MARC has an index on plant named WRK.
    If you join MARA and MARC to first determine all the materials that qualify for the given plant and division combination, you can access table MCHB with material (MARA-MATNR), plant (MARC-WERKS) and storage location (FG01) i.e. the first 4 fields in the primary key of table MCHB.
    I could not test this theory out because in our system we do not have any data in table MCHB. Your select executes quickly on my system.
    Please let me know how this panned out.

  • Every time an email comes in it's preceded by two telephone rings. I don't know what I did to create the problem so I don't know how to resolve it. HELP PLEASE!!!

    Every time an email comes in it's preceded by two telephone rings. I don't know what I did to create the problem so I don't know how to resolve it. HELP PLEASE!!!

    settings >>>>notifications>>>>Mail >>>>allow notifications >>>off  (your choice )
    settings>>>sounds>>>new mail>>>>none  ( will kill rings )

  • My Photoshop CS6 is creating some problem.

    My Photoshop CS6 is creating some problem.....whenever I am opening it, the software is crashing, showing " Adobe Photoshop CS6 stopped working ".....What should I do ?

    Look in your Windows Application Event Log and see what the Faulting Module is that causes the failure.  That may give additional hints as to what's wrong.
    Crashes can occur because of outdated display drivers, bad 3rd party plug-ins, or even corrupted preferences.  A look at the Faulting Module path/name is a good first step.
    -Noel

  • Do index rebuild in bussiness hours creates any problem?

    hi friends
    two node rac
    version 10.2.0.4
    windows-o/s
    do index rebuild in bussiness hours creates any problem.i had still half an hour time for business hours.
    out of 10 indexes still 2 indexes are left.please let me know your suggestions thanks.
    thanks in advance
    cheers :-)

    Respond to what, exactly?
    Oracle indexes do not need to be rebuilt as a general rule. There are some exceedingly rare cases where an occasional index may need to be rebuilt. But to have 10 indexes in a database that all need to be rebuilt would be exceptional. And your description doesn't seem to indicate any logical reason that any of your indexes need to be rebuilt. That leads me to strongly suspect that you are pointlessly rebuilding the indexes in the first place.
    If you are going to pointlessly rebuild indexes (which I don't recommend), you should do it during system downtime windows when no one else is using the system. It would be better not to do them in the first place, but if you're going to waste cycles, at least waste nonproductive cycles.
    Justin

  • I removed Microsoft Office 2008 but still get Microsoft Autoupdate for it.  I can't complete the upgrade because the application is gone.  Is there a trace of Office 2008 somewhere creating this problem?

    I removed Microsoft Office 2008 but still get Microsoft Autoupdate for it.  I can't complete the upgrade because the application is removed, but cannot make the auto update prompt go away either.  Is there a trace of Office 2008 somewhere creating this problem and how do I get rid of it?

    Thanks for the tip.  Went through the process on Microsoft's site and the files that were causing the issue were the com.microsoft files in Library-Preferences.  Removed all of those, then opened an Office 2011 application; had to go through some basic setup questions the first time, but I no longer get prompted upgrade 2008.

  • HT4623 International Missed calls on 4s do not show 00s before the number, which creates the problem of call back. Is it a Tecnical fault or a Setting problem?

    International Missed Calls on my i phone 4s do not reflect 00s which creates a problem of a Call Back. Is it a Tecnical inadequacy or a Setting problem?

    It has righted itself. I am not sure how. But I turned off the Powerbook. And on the MacBook Air, I made sure to change the MAC number to the MacBook Air one.
    I restarted the MacBook Air. Now, the internet radio is working well, no rebuffering the stream every ten seconds.
    And when I turned on the Powerbook and tried the internet this time, I could not get connected.
    I think the bad internet connection on the MacBook Air was due to the fact that the internet was being shared by two computers. Funnily enough, the internet was OK on the Powerbook but was not good on the MacBook Air when I did that.
    So, it didn't turn out to be a MacBook Air problem but an internet provider problem.
    I will keep my fingers crossed that the MacBook Air internet connection keeps working fine.
    I think it's possible to use the internet on both computers simultaneously but the quality of the connection is poor on the MacBook Air when I do that. And when I turn off one of the computers, it is not possible to share an internet connection when I turn that computer back on again. I have to set up the MAC number of that computer again on the nespot site for it to access the internet. But if I do that, the internet quality on the MBA suffers.

  • Consolidating itunes media library-how to shorten file names or how to find the file that is creating the problem?

    Hi I've switched to Mac for six months now, so is still new to mac and I am using my old 1TB windows PC side by side for my music collection. Now I have seen the posts already in apple community about consolidating itunes music library but could not get the proper way of doing it. My system and itunes is also saying 'file name is too long' and it stops but the questin is how do I know which file is creating the problem and how do I shorten it?
    If anybody can answer I'll be obliged to him/her, because its my 6/7 years of music collection stuck in an old pc. Thanks in advance.
    - Javed

    By 'it stops' I meant the consolidation process in itunes stops.

  • I have update my i5c verson 7.06 to 7.1 . then create a problem

    i have update my phone software 7.06 to 7.1
    there was a create a problem
    my phone was to activate sim carrer 
    help me please ?

    Please describe your problem with a little more detail.

  • Hi sir i have revoked the distribution certificate , and in one of my iPhone app i had used the same certificate if i will upload the next version of same app then will it create any problem or with the new certificate i can upload my next version of myap

    hi sir i have revoked the distribution certificate , and in one of my iPhone app i had used the same certificate if i will upload the next version of same app then will it create any problem or with the new certificate i can upload my next version of myapp or not plz tell me as soon as possible

    Sounds like you need to ask your question in the developers forums.

Maybe you are looking for

  • BOE XI 3.1 jdk version

    <h4> Hi, Is JDK1.6 supported for BOE XI 3.1 application server? According to platform requirements for linux  (page 7)  it seems that  Tomcat 5.5 , jdk 1.5.0_xx is supported. Of course in the same document there's also written: </h4> Application Serv

  • Having issues with MacBook after PRAM reset.

    Hello All, I have a late 2009 MacBook, and have been having some minor performance issues and some problems with the trackpad. Changing system preferences failed to solve the problems I was experiencing so I decided to to a PRAM and NVRAM reset. Ever

  • Look up InfoObject's attributes in update rule

    Hello Gurus!!! I have an update rule that looks up for an InfoObject's attributes to update some fields of an InfoCube. Is there another way to do this look up than load all InfoObject attributes into an internal table from the start routine? I tried

  • Standby Log corruption -- in Recover phase

    Hi All, I am trying to set up RAC to RAC dataguard between 2 databases in different data centers. I am able to ship archivelogs from primary to DR. The logs are not getting applied. In the standby alert log -- I see the following errors (several of t

  • PDF image sequence only shows first frame

    Does anyone else have a problem with this? I am trying to make a simple looping two-frame vector animation. Without converting to video or pixels (I need this to stay flexible), what are my options? I've tried making the layers turn on and off with a