LabVIEW:MoveBlock

I use the function LabVIEW:MoveBlock of the library call to move data for a call to the DLL that returns a pointer to the data. When I use a smaller size (480K) to the input parameter of 'size', LabVIEW:MoveBlock CLF works fine but when I use the original size (17.5 M), the FCM returns an error code 1097. What is the largest amount of bytes that the CLF LabVIEW:MoveBlock can move?

Darin - Thanks for the article. However, he made the same mistake I did. When the size of the array will be determined by programming, it is possible that LabVIEW does not enough space. What I was doing was creating programmatically a subset of the larger painting when I wanted just a small section of the table to analyze. It worked well if the table was small enough however when I wanted a complete set of data, it's when LabVIEW gave me the error 1097. What I did to solve the problem was to define the greatest possible diversity and take the subset after the MoveBlock.

Jeff Merci for your help as well

Tags: NI Software

Similar Questions

  • LabVIEW MoveBlock and obtaining of a string from a DLL (assigned by the DLL)

    Hello classmates addicted LabVIEW,.

    I have a small question about the LabVIEW MoveBlock function.

    For a project I need to use an external DLL that must be called by my LabVIEW program.

    Essentially, the DLL returns a void * to a buffer and the size of the buffer (size_t). This stamp is just the string being returned by the DLL data. The DLL allocates these data and later in the program that I need to pass this pointer to a second function of the DLL to explicitly inform the DLL that I made using the data, so it can release these data.

    Here is the documentation for the function I want to use:

    Since you say the works of XNode, then you're dealing with a pointer and not a handle (pointer to a pointer), so you should be to pass the address of MoveBlock by value and not as a pointer to a value.

  • How to determine the length of the string when the string using LabVIEW MoveBlock pointer dereference

    Hello!

    Calling a DLL that returns a pointer to a structure consisting of a pointer to a string, a 32-bit integer and a pointer to another string.

    I managed to MoveBlock to return a consolidation of these three things, and which works very well.

    But now I need to read the two strings I have pointers to which are not fixed length. MoveBlock has a size of entry, but how to know how long channels are?

    Try this:

    ...\vi.lib\Utility\importsl\GetValueByPointer\GetValueByPointer.XNode

    Wire just a constant string to the Type of entry.  If I remember correctly, the draw of endpoint (assuming that the C strings) will be included.

    Sometimes I have just MoveBlock a byte at a time until I get to a null value or has specified maximum size.

  • [C] moveblock problem?

    I have a LabVIEW and DLL C of the code.

    The C DLL takes a wide range of UINT16 values and it decodes a form of sense.  Data that results are stored in a static table inside the DLL structure.  The Structure consists of integers, floats, strings, and arrays.

    The DLL also has a function to return the elements of the structure.  Each structural element is returned as a separate parameter entry.  Some of them are arrays, for example:

    void GetMyData (..., unsigned char * myArray [],...);

    I know how great 'myArray' is.

    In LabVIEW, I have a "call library function Node" for the above function.  For the berries, I used "Pointer digital, full 32-bit signed value".  The "address" that is returned by this call I switch to 'LabVIEW:MoveBlock' call as defined in the examples on this forum.  pre-allocating table that is the correct size and then copying the bytes inside the 'address '.

    If I just run my LabVIEW VI crashes.  If I walk through it however (spanning the node library DLL function calls) and then I get the data from the DLL as expected.  However if I then close LabVIEW it crashes.

    MoveBlock is safe to use?  Is there another way to get data from a DLL tables?

    Thank you.

    Looks like you have the library node call correctly put in place, but you initialize the table you're passing in there?  You need to initialize an array of sufficient size or set the minimum table size in the library node call so LabVIEW can do for you.  If you pass an array too short you will probably get an accident since your DLL will attempt to write to this memory location and overwrite something else.

    You should also initialize the string that you pass to your DLL if you wait the DLL to fill.

    It may also be useful for defining the level of error control dial the node of the library to the maximum for debugging purposes; This can help catch some memory problems.

  • List of pointers Moveblock

    Hello

    I have a list of memory addresses and use Moveblock to get the values (which is a 640 x 480 arrray 2D in my case). That's just fine until calling Moveblock multiple times (for example using different memory addresses) for all my paintings 2D (120 tables). The problem is that it takes a few tens of ms FRO Labview to generate this 120 X 640 X 480 (when you use a loop that calls Moveblock 120 times). Is it possible to directly call a list of pointers and directly retrieve the corresponding 3D table.
    Best

    Well and where your array of pointers come from? The C code gets just a LabVIEW 3D Board, which is not an array of pointers, but simple a memory table with [column * lines * pages] elements. This is the table that you get after you have copied your array of pointers, which is nowhere to be seen in this code C, with MoveBlock() in a LabVIEW 3D Board. In order to do the same thing you do in LabVIEW with MoveBlock() you must have two parameters, the first being the pointer array (more dimensions 3, C pointers have inherent fixed size information) and the second being the table 3D of LabVIEW, then you must first use LabVIEW memory, from Manager to resize this 3D array handle before starting to copy the data into it using memcpy() or MoveBlock() would be too of work and is only slightly slowever as the best implementations of memcpy().

    Most likely, you won't be able to squezze a lot even if you implement that in memory of C. Copying takes time, if you do enforcement by calling a C function as MoveBlock() of LabVIEW or function as memcpy() in C code. There is a good chance that you can win a little because the LabVIEW diagram code made a few test validation, you can omit in your C code, but it will probably not like some exponential improvement. LabVIEW is implemented in C (++) and generally optimizations where a C programmer will need to spend a little time to get the same level. Of course your particular case of calling external code as MoveBlock() limits the possibility for LabVIEW make a lot of optimization, because he does not know what the code called behind the library node call made (even if you call a function of Manager of LabVIEW here) so it can't do things as the loop place , rescheduling of code and many other things without risking that some unknown to LabVIEW, side effect of the called function would be influenced.

    You think that your LabVIEW code is nothing more than a loop, but it you call in the function MoveBlock and the way you do that which might be important detail that now need us to understand what could be improved. Given that it is such a simple VI I don't understand the reluctance to simply post, but are rather some pseudo-code that you want to do us to complete for you the same thing you did in the LabVIEW code, we don't see.

  • Application Builder «Browse to LabVIEW.exe» error

    LabVIEW gurus...

    I'm currently building a standalone version of my project.  When I run the application (which is built successfully), LabVIEW makes me search the LabVIEW.exe file.  However, I want this application to run on a computer that will not have installed LabVIEW, and looking up if this file is not an option.

    I know that the reason for this problem is that I use 2 named StrLen and MoveBlock within the library LabVIEW.exe call library functions (to access data from a pointer to a pointer).

    LabVIEW.exe presents itself as one of the dependencies in my project, but I can't understand how to add it to my specifications of generation.  I tried to build a Setup program and include the LabVIEW runtime environment, but this does not work either.

    Any suggestions would be greatly appreciated!

    I'm using LabVIEW 8.6.

    Thank you

    Jason

    In the call to the dll just type LabVIEW without any path. This should work (I used it on 7.1) to automagicallylink it.

    The functions are also in the lvrt.dll which is the main part of the runtime engine.

    Felix

  • use a C++ DLL in LabVIEW

    I have a DLL that has been written in C++, and the typedef in C++ code is defined as:
    CY_BUFFER
    Definition
    typedef struct
    {
    int size;
    char * data;
    } CY_BUFFER;

    There is a function that should return the number of version as shown below:

    C function
    Version CY_INT (CY_BUFFER * buffer);

    A sample of code C to write to call the DLL is listed here:
    Example in C
    #include "cy_runtime.h".
    const int CUDA_DEVICE = 0;
    If (Initialize (CUDA_DEVICE)! = CY_SUCCESS)
    Returns - 1;
    Buffer CY_BUFFER;
    If (init_buffer(&buffer)! = CY_SUCCESS)
    Returns - 1;
    If (version (& buffer)! = CY_SUCCESS)
    Returns - 1;
    If (free_buffer(&buffer)! = CY_SUCCESS)
    Returns - 1;

    I have built wrapper LabVIEW using the DLL import wizard, but may not know what I have to do. I read the pointers to C/C++ dll dereferenciant in LabVIEW, but I do not understand how to use. Y at - it someone who can point me in the right direction here.  I can't edit the C++ DLL, but I don't know in theory, only the types of data, I just may not know what the wizard trying to do when he created the GetValueByPointer VI code it generates automatically.  If its C++, do I need to not use the wizard at all and create from scratch?  Any help would be appreciated gratefully.

    In addition to what Nathan said, you probably have an alignment problem. C compilers tend to align the elements in a struct to their inherent normal size. This means that the char pointer will be aligned to 4 bytes when you use LabVIEW 32 bits and bytes 8 when you use LabVIEW 64 bit. Now since the DLL also provides the init both the free function, this makes things a little easier. You can simply create an array of 4 integers from 32-bit bytes, pass it as a pointer to array to the function init() and version() free() and the only thing you need to do before release called an additional function of MoveBlock() where you adjust the offset in this table for the number of bits of LabVIEW.

    This involves a number of things:

    (1) your struct is indeed using 8-byte alignment, which causes the pointer to the byte offset 4 in for 32-bit LabVIEW and structure at byte offset 8 for 64-bit LabVIEW. Are you of any changes by using 64-bit LabVIEW, now that you have these 4 additional elements of the cluster between the size and the pointer?

    (2) in fact, the size in the struct element specifies how much data is in the buffer tank.

    And for the functions of the DLL error handling was completely omitted. To match the C code, you have shown that you should always check the function returns the value too before continuing.

  • LabVIEW 2016 NI_ReportGenerationToolkit error

    I upgraded to Labview 2015-2016, but when you open one having previously worked for the project I now see an error in the NI_ReportGenerationToolkit.lvlib:Excel_Save_Workbook.vi.

    He tells me that the invoke node contains terminal unwired or bad.  However, it's a NOR provided VI and has not been changed between updates. Please let me know if it is a solvable issue.

    Take a look at this thread.

    Ben64

  • Please convert LabVIEW 2013 urgent please

    Please convert LabVIEW 2013 urgent please

    You can go there.

  • Please convert LabVIEW 13 10

    Can someone can convert LabVIEW 13 LV 10. These files come from the community

    Much thanks

    Here you are

  • DAQ Assistant is not in LabView

    Hi all

    I use NEITHER cDAQ-9174 and NI 9203.  I have already installed the driver for the NI 9174 cDAQ, which is NEITHER-DAQmx 9.8.0.  I can see the device when I opened NI MAX. However, when I open LabView 2015, I can't find DAQ Assistant in the function Palette. I noticed on the chassis, 'ACTIVE' light is not on while two other "POWER" and "READY" light is on.  I look in the forums OR but I can not find the solution.

    Any suggestion, please help!

    Thank you!

    DAQmx 9.8 is not compatible with LabVIEW 2015.  You must use at least DAQmx 15.0.  See here for more details: NOR-DAQmx and LabVIEW compatibility

  • LabVIEW FPGA SPI accident - SPI OR IP address for example - R series OR

    Hello

    I am trying to run the series R - sample project NI SPI FPGA Simulation.lvproj that comes with the SPI IP OR on a real FlexRIO FPGA SMU-7976R target with an attached digital adaptation NI 6581 B Module. The example is for a PCIe-7841R but I wore during my target FPGA, follow these steps and made additional changes to try to make it work with my set-up. I learned that FlexRIO FAMs CLIPs do not work with nodes in office had so I know I can't simulate the project originally planned so I will try to use FPGA to e/s node host side (open FPGA vi reference) to implement the actual hardware.

    My first question concerns my configuration of the adapter module e/s and selection. I added the IO Module (NI 6581 B: NI 6581 B channel) for my project and selected the channels as shown in the table below. I have a real physical hardware connection as described below using two NI SHC68-C68-D4 cables and a break-out Board.

    I changed the names as well:

    I selected these DIO channels because I wanted the DDCA connector to be the master and the DDCB connector to be the slave. In addition, in this CLIP every eight channels of i/o has a write enable signal. I have not used the Port configuration because I needed 4 available DIO channels and I saw DIO0-3. Is my logic of selection of channel vs correct Port here?

    Following the same strategy that examples FlexRIO/NI6581B, I changed the FPGA.vi to include initialization outside of timed loops:

    And in the Host.vi I have a node reference FPGA and wired loops of feedback accordingly:

    When I compile the FPGA and try to run Host.vi LabVIEW inevitably crashes with Crash Reporter below and must restart:

    Does anyone know what I'm doing wrong here? My guess is that it has something to do with the CLIP/IOModule. Any help is appreciated.

    Thank you

    Scott

    Hi Scott,.

    I suspect that the problem might be related to the fact that your node open FPGA VI reference is in the while loop and trying to open a new FPGA reference at each iteration.
    If you move outside of the while loop, it does not solve the crash?

    On channel vs port question, your logic seems reasonable to me, but I recommend to try it since this feature could depend on device.

  • LabVIEW 2014 does support CDAQ 9136

    I use LV 2014 SP1, I wanted to buy CDAQ 9136 Windows controller for one of my projects. I'd like to figure out if I can use the SP1 of 2014 LV with DAQmx15.1 in the program for this controller? User manual CDAQ 9136 does not say anything on the support of LV, just said that DAQmx 15.1 is supported.

    When I tried to add a target CDAQ in SP1 LV2014 with DAQmx15.1, it does not show the CDAQ 9136. I won't use the real time of the CDAQ 9136 version, but I'm confused. Any help would be greatly appreciated.

    Nanda,

    I would like to clarify the compatibility for the NOR-9136. It is compatible with DAQmx, starting with DAQmx 15.1. In other words, it can be used as a normal cDAQ chassis in any version of LabVIEW with DAQmx 15.1 or later installed (within reasonable limits). However, compatibility in real-time with the cDAQ-9136 has not introduced before LabVIEW time real 2015 module, which is only compatible with LabVIEW 2015. Thus, to use the cDAQ-9136 as a real-time controller, you will need 2015-LabVIEW and the module time real LabVIEW 2015 or later. This note can be found in DAQmx 15.1 notes for supported devices.

  • does anyone have a good recommendation for a voltmeter of PoE that can be integrated into Labview/TestStand?

    I started looking for a voltmeter of PoE, but so far all the ones I've found are for use of the mobile hand held.   I'm looking for a version that can be integrated in an automated production environment.

    Can someone point me to a voltmeter of PoE who has control USB or ethernet.   Ideally with Labview drivers. But if I do these myself I'll be okay with that.

    Unfortunately, I've not seen anything quite like that around. The closest I could find was the PoE3N-reach technology RT, which looks like it might have connectivity RS-232.

    Another option might be to type the tensions of the ESP and read those who use a more general tool as a DMM device or data acquisition. Something like the POET systems-FM-1. Maybe something like this work?

    There may be someone on the forum who is more familiar with POE that I am, but that's what I was able to dig up.

    William R.

    National Instruments

  • Use of LabView for exploitation of Bosch Rexroth HCS01

    Hello people,

    I am a student assistant and my current project is to complete what was launched in a work of degree more than a year ago: to build an experimental platform to test the effect of superconductivity on maglev technology. Part of this experimental platform is a precision three-rail network operated by compact inverters HCS01 (IndraDrive Cs) by Bosch Rexroth.

    My question is: is it possible to use LabView to operate the three axes of a central VI?

    I have already connected all three compact inverters to a computer and I am able to operate using most Ds-startup-easy mode, but I can only operate separately and not of a single window.

    Thanks in advance, any help would be appreciated!

    Greetings,

    Paul Masuch

    Hello world

    I just found this forum article on control components Rexroth with LabView and as a representative of Rexroth, I disagree that West no way is easier to control than using Ethernet/IP.

    We have an official partnership with National Instruments, and offers a complete Package of VI for all our components (IndrDrives and IndraControl automata) to access all the features of a PLC or lead of Bosch Rexroth. This is possible thanks to our Open Core of Bosch Rexroth and our open approach we take with our automation components. For controllers the VI contains more than 850 screws to communicate directly from your LabView execution to the controller. These packages are completely free for you and you can download the packages from our Web site

    http://www.boschrexroth.com/OCE

    (access after registration in our network in engineering).

    In addition it s also possible to control our readers a cRIO OR using the Council of Europe.

    Here's a sneak peek of our open main Interface feature. There are SDKS for several languages of programming and several technologies including National Instruments Soft - and hardware.

    So you see, West don't need to learn PLC programming, when you want to connect LabView to Automation from Rexroth.

    If you have any trouble Don t hasitate to contact me!

    Best regards

    Tammo Schwindt

    Application engineer

    Bosch Rexroth AG

    [email protected]

Maybe you are looking for

  • Satellite L10-205: need of product recovery CD

    DEAR R2D2 Will you help me by sending a recovery CD product for this system of L10 - 205. I'll be very grateful to you if you are Basel for this Asim

  • Pavilion dv7t-6100-cto-quad: I can't get the new drivers on the hp support site

    I have restored my ssd from disks that I made the computer when I bought it and I did everything I know to do and can not get the hp support site to give me a list of drivers for that computer. I know there must be some updated drivers for the comput

  • 110 - 000z: turn on pop ups

    When I turn on my PC. I get a black pop up window that says: "c:\WINDOWS\system32\cmd.exe". Then a big blue line turns on and says: "this application can run on your PC - to find a version for your PC, check with the software publisher." I don't know

  • Ultiboard

    I would like to create a pcb using the Ultiboard layout. I want to do something similar to the one in the photo, but I really don't know how. It looks like a real pcb or as a manually done pcb layout. Could someone teach me how they did it?

  • Error of comparison while trying to round like Excel

    I have two different but related issues. First: my LabVIEW application is not passing validation of my client because the results in LabVIEW are not exactly the same as those that my customer buy when using MS Excel. The problem is with rounding: Lab