Interpolate 1D Array function in labwindows cvi

Does anyone know of a labwindow corresponding function to the labview Interpolate 2d array ?
I am working on converting labview programs to labwindow/cvi and could use the help with this one.
Pete

Hello Pete,
LabWindows/CVI does not have a built in function to do interpolation. In order to do the interpolation in CVI you would need to create your own code. I believe I found some code from another post that should work out for you (http://forums.ni.com/ni/board/message?board.id=180&requireLogin=False&thread.id=24187).  Let me know if this is what you are looking to do.
Best Regards,
Adam
Applications Engineer
National Instruments
http://www.ni.com/support  
National Instruments
Applications Engineer

Similar Messages

  • How to calc array length in Labwindows CVI ?

    How to calc array length in Labwindows CVI ? In labwiew,I can find function to calc array length,but in CVI ,I can not ,...

    Hello 让一切随风 
    char  *name ;                              
    int length = 0;
    int i = 0;
     name = malloc(256) ; 
    strcpy(name   , "National Instruments");
    while( name[i] ! = "\0")
      length ++;
    i++
    free(name);

  • Using the SVDEx function in LabWindows​CVI

    Hello,
    I am writing an application in LabWindows CVI to display and analize data that we obtain in an optical experiment.  The data is a matrix where the subsequent rows represent spectra collected a different times. There are about 200 columns and 100 rows in each matrix. I want to use singular value decomposition using the  SVDEx function. I get an error every time i try to execute the code in debugguing mode:
    FATAL RUN-TIME ERROR:    The program has caused a 'General Protection' fault at 0x0342BC16.
    I believe that I am passing the incorrect arrays to SVDEx. I  was wondering if there is any example code available, so I can learn how tro do do this.
    Here is a fragment of the code where I call the function SVDEx:
    //declare the arrays to hold S U V
    double *U,*S,*V;
    int isizeS=Y_DATA_POINTS;
    int i;
    int AnalisisError=0;
    if (X_DATA_POINTS<Y_DATA_POINTS) {isizeS=X_DATA_POINTS;}
    //Allocate arrays
    U=malloc(Y_DATA_POINTS*X_DATA_POINTS*sizeof(double​));
    S=malloc(2*isizeS*sizeof(double));
    V=malloc(Y_DATA_POINTS*X_DATA_POINTS*sizeof(double​));
    AnalisisError = SVDEx (adAbsMap, Y_DATA_POINTS, X_DATA_POINTS, FULL_SIZE, U, S+isizeS, V);
    FATAL RUN-TIME ERROR:   "Visualize_12.c", line 2451, col 17, thread id 0x00000E18:   The program has caused a 'General Protection' fault at 0x0342BC16.
    Any help will be very much appreciated.
    J. Hodak

    Hi,
    Thanks for trying to find an answer. I just realized now where the probem was. My mistake was when i allocated the arrays for holding the matrices. Because i was assking SVDEx to carry out FUL SIZE decomposition I must declare the arrays U and V to be , Y_DATA_POINTS*, Y_DATA_POINTS doubles and X_DATA_POINTS*, X_DATA_POINTS doubles respectively. My code was wrong, I was declaring the sizes to be smaller than necessary and  "Visualize_12.c", line 2451, was the call to SVDEx, and col 17 was pointing t that mistake. It took me a while to realize this because the error message did not exlicitly specify that the size or the array passed was too small. Now it is working well. But I believe that it will help to have an example to get started with this.
    Thanks again,
    Fundadero.

  • LabVIEW PDA Interpolate 1D Array

    Hello,
    I have a set of 128 datapoints (with x and y coordinates) which I want to interpolate to 400 datapoints. For this I use the "Interpolate 1D Array" function. If I run this VI on a Win2000, everything is fine. But when I try to run the VI on a PDA with PocketPC2003, I get only pointless values. Someone an idea what I made wrong?
    Thanks, Martin
    Attachments:
    Interpolate.vi ‏30 KB

    Hello Matthew,
    I think I've found the problem. The "Interpolate 1D Array" function expects an array of double precision numbers, but I've connected an array of single precision. On PC's it seems to be converted by the function. On a PDA I have to convert the array to double precision by using a number conversion function before connecting the array to the interpolate function. Then it works also with array controls which are not displayed on PDA's but I can use as connectors in SubVI's.
    Nevertheless thanks for your effort to solve the problem.
    Martin

  • Can not find imaqView3D function panel in labwindows/cvi!

    followed what the on-line support told me (add the imaqView3D function declaration into my source code), it does not still work! So seek help from you! thanks so much!

    David,
    You will probably have a better chance of having your question answered if you posted your question to the Vision or LabWindows/CVI Developers Exchanges.
    Regards,
    Erin

  • Sequence hangs after LabWindows/CVI DLL execution

    Hi there, I've written a DLL in LabWindows/CVI that I loaded and executed it successfully in TestStand, with the LabWindows/CVI adapter.
    The weird thing is that, when the adapter is configured to debug DLL code with an external instance of LabWindows/CVI, the sequence just hangs after the DLL finishs executing its code.
    If I turn off external LabWindows/CVI debugging, in the adapter configuration, it doesn't hang but other strange errors occur, even crashing TestStand!
    I reviewed my DLL source code and I didn't find anything problematic. Is it possible that the DLL is overwriting a reserved memory region, thus breaking TestStand functionality?  Have you ever seen that?
    Thank you very much.

    Yes it's possible that the call is corrupting memory. The most likely way for that to happen is if the prototype specified in TestStand does not match what actually exists in the dll, or if you write more bytes to an array passed in from teststand than the step is specified to be passing from TestStand. Double-check that your prototypes match and that you aren't writing past the end of any buffers or accessing any pointers incorrectly.
    Hope this helps,
    -Doug

  • How to set a DMA transfer type for PXIe-6536 in LabWindows/CVI?

    I have a PXI chassis PXIe-1078 with a controller PXIe-8115 running under Windows 7. The digital output board is PXIe-6536.
    I use a function DAQmxSetChanAttribute to set a property DAQmx_DO_DataXferMech to a value DAQmx_Val_DMA, since I want to use a direct memory access data transfer. This wokred well with a PCI-6534 board using the same LabWindows/CVI code before migrating it to the PXIe system.
    Unfortunately, running this code on the PXIe system reports a DAQmx error -200452: "Specified property is not supported by the device or is not applicable to the task".
    The task is created in the following simple way (the board name in MAX is 'Dev1'):
       DAQmxCreateTask ("digTask", &digitalTask);
       DAQmxCreateDOChan (digitalTask, "Dev1/port0:3", "DIG_CHANNELS", DAQmx_Val_ChanForAllLines);
       DAQmxSetChanAttribute (digitalTask, "", DAQmx_DO_DataXferMech, DAQmx_Val_DMA, 15);
    How can I solve this problem? How is it possible to choose between different transfer types?
    Thank you in advance for any hint!

    Hi CavityQED,
    The PCI-6534 is a "Digital I/O" board while the PXIe-6536 is a "High Speed Digital I/O" board, that's why they don't have the same properties.
    By the way you can use DMA transfer with this method :
    http://zone.ni.com/reference/en-XX/help/370520J-01/hsdio/direct_dma/
    Let me know if it helps you.
    Regards.
    Mathieu_T
    Certified LabVIEW Developer
    Certified TestStand Developer
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    LabVIEW Tour
    Journées Techniques dans 10 villes en France, du 4 au 20 novembre 2014

  • How to access the result list in teststand after execution using labwindows​/cvi

    I am developing a user interface in labwindows/cvi that runs multiple teststand sequence files and would like to combine their reports (generated in teststand) into a single file at the end of a UUT. What is the best way to do this? At the moment, I'm trying to access the result list local variable after the execution has ended using API calls from labwindows/cvi and an end-of-execution callback event but those run-time variables do not exist anymore. How do I get a hold of the result list array at the end of an execution? I would like to grab this variable and pass it along from sequence to sequence using labwindows/cvi and not teststand itself. Is this possible? Any help would be great.
    Thanks in advance,
    Luis

    Hey Luis,
    Check out the response to this thread at the NI TestStand board here!

  • How to Change Brightness, Contrast and Saturation of an image in LabWindows/CVI (Urgent) ?

    Hi All
    I want to change brightness, contrast and saturation of an image, plz help me how it will possibe in labwindows/cvi
    Thanks

    CVI does not include native functions to operate such changements on an image.
    It may be possible that these functions are included in IMAQ library, but I never used ot so I'm not sure. In any case, this is an additional tool to install and it is not free.
    Alternatively, you may need to search for a third party library that offers such functions.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • LabWindows​/CVI 5.5 for GPIB communicat​ion?

    Hello!
    I'm a GPIB rookie and can't get my GPIB devices to talk with LabWindos/CVI:
    For the GPIB devices I am using (FWBell 7030 Gaussmeter, Keithley 6514 Electrometer) are no instrument modules available (at least I can't find any).
    How can I talk with these devices, using the IEEE488(.2) functions in LabWindows 5.5?
    If I use these functions (i.e. Send / Receive), I allway get error messages and the devices don't redspond and sometimes they show error messages.
    How do I address a device on the GPIB Bus?
    Every idea is welcome, I need all the help I can get.
    Thank you!"

    Unfortunately I was unable to find a driver for this instrument either. This leaves you with one of a couple options. First, I would like you to submit a request for this driver at:
    http://zone.ni.com/idnet/other.htm
    We develop drivers based on demand and popularity so the more requests we have for it, the greater the possibility that we will develop one.
    If you would like to try developing your own instrument driver (or modify the existing one), we have documentation, model instrument drivers, and driver templates to help at :
    http://zone.ni.com/idnet/development.htm
    There may be a similar driver on ni.com/idnet that can be used as a model.
    We also have a syndicate of third party vendors that specialize in National Instruments'
    products and services. Some of the vendors specialize in driver development. I would suggest contacting one of the Alliance members at:
    http://www.ni.com/alliance

  • LabWindows/CVI 5.5 for GPIB communication

    Hello!
    I'm a GPIB rookie and can't get my GPIB devices to talk with LabWindos/CVI:
    For the GPIB devices I am using (FWBell 7030 Gaussmeter, Keithley 6514 Electrometer) are no instrument modules available (at least I can't find any).
    How can I talk with these devices, using the IEEE488(.2) functions in LabWindows 5.5?
    If I use these functions (i.e. Send / Receive), I allway get error messages and the devices don't redspond and sometimes they show error messages.
    How do I address a device on the GPIB Bus?
    Every idea is welcome, I need all the help I can get.
    Thank you!"

    Unfortunately I was unable to find a driver for this instrument either. This leaves you with one of a couple options. First, I would like you to submit a request for this driver at:
    http://zone.ni.com/idnet/other.htm
    We develop drivers based on demand and popularity so the more requests we have for it, the greater the possibility that we will develop one.
    If you would like to try developing your own instrument driver (or modify the existing one), we have documentation, model instrument drivers, and driver templates to help at :
    http://zone.ni.com/idnet/development.htm
    There may be a similar driver on ni.com/idnet that can be used as a model.
    We also have a syndicate of third party vendors that specialize in National Instruments'
    products and services. Some of the vendors specialize in driver development. I would suggest contacting one of the Alliance members at:
    http://www.ni.com/alliance

  • Status Bar in LabWindows/CVI

             Hello,
             I'm new in LabWindows/CVI. Is it possible to compose a status bar, like in C#, in LabWindows/CVI? Moreover, how can I place the buttons, that I composed before, onto the tabs or decoration tools?
             Good days...

    If you are intending a ribbon at the panel footer where to show informations and optionally add buttons, at present CVI does not have such a control.
    It has a toolbar control, instead, so if you can reverse your design so that a toolbar can be used, you can find the control into <cvidir>\toolslib\custctrl\toolbar.fp
    There is also a demo project that you can look at: you can find it with the example finder (Help >> Find examples... menu function).
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • I want to call DLLs generated in LAbWindows CVI in Borland C++ (BCB 6)

    Hi,
    I want to call DLLs generated in LabWindows CVI in Borland C++, I am using BCB 6 and LabWindows CVI 8.
    I am able to call these functions in VC++, But getting following error in BCB
    ":[Linker Error] 'D:\GAJANAN\CVIDLL.LIB' contains invalid OMF record, type 0x21 (possibly COFF)"
    Please somebody suggest me how to solve this problem.
    Thanks and Regards
    Gajanan

    Duplicate post.

  • Is there a way to do multithreading in LabWindows CVI 5.0(Windows95)?

    Because I would like to do several functions in the same .c file, in the same time. This morning, I asked this question:
    Is there a way to do multithreading in LabWindows CVI 5.0(Windows95)?
    Because I would like to do several functions in the same .c file, in the same time.
    You answer me, and you give me some files, some documents. In this documents, there are these routes:
    cvi\samples\utility\threading
    cvi\apps\dagmthread
    but I have not these files with the 5.0 version.
    How can I do?
    A French guy.

    Hey my French friend. I'd say something cute in French but I don't know any so I'll kindly refrain.
    I just wanted to echo what Chris said. There are some sweet functions in 5.5 that really make it easy. I tried running my thread app that I made under 5.5 on 5.0 and got all kinds of problems. Mostly because none of the helper functions I wanted to use are in 5.0. Makes sense right? Anyway, 5.5 is a worthy upgrade. I wanted to make sure you didn't think Mr. Matthews was just making a sales pitch.
    Let me know if you want some example code for threading under 5.5. ([email protected])
    Grant
    Grant M. Johnson
    Project Engineer
    LECO Corporation

  • Labwindows CVI 2010 and GetProcessAddress()

    I am using Labwindows CVI 2010 v10.0.1 after upgrading from version CVI 2010 v10.0.0. After the upgrade, I have a compile error from a statement that compiles just fine in the previous version. The error is:
    "Operands of = have illegal types 'pointer to __stdcall int function(int,pointer to char,pointer to char,pointer to char,int,pointer to char,pointer to char)' and 'FARPROC'."
    What causes this error is the following statement in the code:
    my_FP = GetProcAddress(dll_handle, "DLL_FUNCT");
    and the definition of my_FP is:
    int __stdcall (*my_FP)(int x, char y[], char z[], char *m, int g, char A[], char B[]);
    (function names and parameters have been changed for simplicity)
    As I said, this line compiles just fine in 10.0.0, but not in 10.0.1. Is there a specific update to the compiler that will cause this error? What can be done to fix this?
    Thank you very much for your time and help.
    Solved!
    Go to Solution.

    You're correct. This was caused by a change in CVI Windows SDK headers that took place in version 2010 SP1. The change was associated with bug fix #275934. Unfortunately, this bug fix introduced this undesirable side effect of requiring a cast for any function that returns a FARPROC function poinrter (such as GetProcAddress). Upon further reflection, this side effect is unacceptable, and needs to be corrected in the next release. This is being tracked internally with bug ID #336341.
    I'm really sorry for this inconvenience. Until the problem is resolved, using the typedef & cast solution that you already implemented is a valid workaround.
    An alternative workaround, in case you're worried about other projects, or other functions, where this error might also pop up, is to edit CVI2010\sdk\include\windef.h and replace the following FARPROC definitions (in lines 226 and 230, respectively):
    typedef INT_PTR (FAR WINAPI *FARPROC)(void);
    typedef int (FAR WINAPI *FARPROC)(void);
    with:
    typedef INT_PTR (FAR WINAPI *FARPROC)();
    typedef int (FAR WINAPI *FARPROC)();
    Doing this will avoid the problem throughout a given installation of CVI.
    Luis
    NI

Maybe you are looking for