How to transfer data from a DLL Delphi pascal class to a LabView data cluster?

Hi all

I have the following problem:

I use a dll written in Delphi Pascal to transfer data to LabView by using the "Call library function node".

My Delphi dll contains this class:

TFlash = class
Fi: TFileInfo;
constructor Create;
procedure LoadFi (Filedir_and_nametring);
end;

TFileInfo = record
IDX:smallint;
IdxLstSpl:array [0.4] of longint;
Ms: Word;
[0.4] SP:array of the word;
end;

I created the record datastructure of TFileInfo in a cluster of LabView to have the 'same' variable.

My plan was to call a DLL Deplhi function with the "call library function node" and pass the address of the folder TFileInfo, so the data would be transmitted to the cluster of LabView.

When I do a simple delphi dll function as this works because I only spend a small integer to Labview (without reference to the data structure):

...

var data: TFlash;

...

function GetNrOfRows(FilePath:_string):integer; STDCALL;
Start
Data: = tflash. Create;
Data.LoadFi (FilePath); This function returns the number of lines in the selected file.
Result: = Data.Fi.Idx;
end;

When I try to use this procedure instead of the above function, in order to pass the address of the data set structure complex 'Data' (TFileInfo), I am unable to get the information of 'Data' in my Labview cluster:

procedure LoadFileInfo (FilePath: string;) DataPointer: Pointer); STDCALL;
Start
Data: = tflash. Create;
Data.LoadFi (FilePath);
DataPointer:=@Data;
end;

Parameters of call library function node:

-stdcall (WINAPI)

-Run in the UI Thread

-Function prototype: void LoadFileInfo (PStr FilePath, void * DataPointer);

* DataPointer--> Type: "adapt the type" and the format of the data: "pointers to the sleeves.

* FilePath--> Type: 'string', format of the string: "pascal string pointer.

I'm struggeling with this problem for almost a week now and I can't really find a solution on the forum or google.

I also read the following posts:

http://forums.NI.com/NI/board/message?board.ID=170&message.ID=229930&requireLogin=false

http://forums.NI.com/NI/board/message?board.ID=170&message.ID=77947&requireLogin=false

http://forums.NI.com/NI/board/message?board.ID=170&message.ID=51245&requireLogin=false

(or did I miss something in these messages?)

Hope my explanation is clear.

THX

A little further:

Seems like it's not possible to pass data from Delphi to Labview through a DLL when I create a cluster with 2 bays in it in Labview.

This part of Delphi, I've had to make in Labview:

TFileInfo = record
IDX:smallint; {integer; Convert tool}
IdxLstSpl:array [0.4] of longint;
Ms: Word;
[0.4] SP:array of the word;
end;

Instead of using 1 cluster with all the different data in it, I did a unit (1) with my 2 items (smallint and word).

To pass my data in my tables from delphi to labview, I created another group (2) in the unit (1) with 5 elements of longint (because my delphi is going to 0.4) and another group (3) in the unit (1) with 5 Word elements.

Right-click on the unit (1) and the clusterorder in the right order. First the smallint, then the longint table, then the word and the Word table.

When I then use this code in my dll Delphi, IT WORKS! :

procedure LoadFileInfo (FilePath: string;) DataPointer: PtrTFileInfo); STDCALL;
Start
Data: = tflash. Create;
Data.LoadFi (Copy (FilePath, 2, length (FilePath)-1));         --> I need to cut the first part of the pascal string because it's length, and I only need the string itself
DataPointer ^: = Data .fi;       --> pass the record structure to the cluster of Labview
end;

Thanks for the info Ralf!

Tags: NI Software

Similar Questions

  • How to transfer pictures from iphone to PC and keep the date, time and place

    How to transfer pictures from iphone to PC and keep the date, time and place

    Hello Grumpelfuerer,

    Thank you for using communities of Apple Support.

    If I understand your message that you want to import your photos from your iPhone 6 s, as well as for your Windows PC. I would like to save my photos on my computer as well. There are two ways to do this. You can use the iCloud photo library allowing to synchronize photos between your devices or import your photos to your PC using Windows Photo Gallery. This article will provide you with the steps that you can use for both options:

    Import photos and videos from your iPhone, iPad or iPod touch

    Best regards

  • How to transfer data from a mac mini in 2006 for a new?

    How to transfer data from a mac mini in 2006 for a new?

    The following can help:

    Move your content to a new Mac - Apple Support

    OS X: manually the Data Migration from another Mac - Apple Support

  • How to transfer data from my computer to a new phone

    How to transfer data from my computer/Itunes to a new device? I downloaded all my data from an Iphone 4 on my computer and I wonder how to transfer all of these data to an Iphone 5 that I own. I need to my emails and text messages transfer too. Any ideas? Email that I have Setup with my phone is an email from work, so it is important that I do not lose one of them.

    You must put all your media files in iTunes. Synchronize your phone using iTunes.

    iTunes - Apple Support

    iPhone - Apple Support

  • How to transfer data from USB key

    How to transfer data from the reader flash player (C), when you open send it to it does not have this option

    Drag & drop.

  • How to transfer data from the 7 Millennium

    How to transfer data from the 7 Millennium

    You will need to manually back up your files by copying and pasting on a device from external storage such as a USB key or external hard drive.

    Then copy them on Windows 7:

  • How to transfer data from laptop to external hard drive?

    How to transfer data from laptop to external hard drive?

    my model is vgn-cr323.

    Thanks in advance

    Let me provide you with General information on how you can transfer data from your computer to an external drive.

    To transfer the data, plug the USB cable into the correct port. Usually, your computer will know that he has a new disc attached and a pop box up will warn you. It will scan to determine what to do with the new connection and your computer will assign a drive letter (for example, drive G: and so on.) This will allow you to transfer data to the external hard drive just like you would move files on your internal hard drive.

    Once you have the USB cable plugged into your computers port (and the other end plugs into the external drive) you can now start to save files you want on the external hard drive.

    Open the item (s) or folder (s) you want to transfer or save on your external hard drive. There are two ways to save external hard disk 1). If you have only one or two things to save, you can open each item, click on file / record under... and choose the letter/drive (for example, drive G corresponding to that of your external hard drive, click Save.) This he recorded on the external hard drive.

    For more information on your model Asia Pacific computer we recommend contacting Sony's Support Center in your area at http://www.sony-asia.com/section/support.

    If my post answered your question, please mark it as "accept as a Solution.

  • How to transfer data from oracle to the web service using ODI with axis2 tech

    Hi all

    Can someone cause a document or markets about 'How to transfer data from oracle to the web service with the help of ODI with AXIS2 technology'
    If any person with a document or markets, please share it with me

    Thank you
    Phani

    I can give you a few examples of web services in ODI, perhaps that you find them useful?
    Try: -.
    http://John-Goodwin.blogspot.com/2009/04/ODI-series-Web-services.html
    http://John-Goodwin.blogspot.com/2009/05/ODI-series-Web-services-part-3.html
    http://John-Goodwin.blogspot.com/2009/05/ODI-series-Web-services-part-4.html

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • How to transfer data from a single card PXI-2576 to an another Committee of the PXI-2576 on the same chassis.

    I need to transfer a voltage using a PXI-5421 signal before a Council of PXI-2576 and then transfer it to an another Committee of the PXI-2576. For example I had set the signal of the ARB has then put 16 CH MUX 1(1st Switch), the value CH MUX 3 0 (switch 2) then read the MUX 3 voltage using a PXI-4071. I know that I can use the example of DMM Switch Handshaking.vi niSwitch for the rear. I'm just not sure how to transfer data to MUX 1, MUX 3?

    Thank you

    Denise Barajas

    Hi Denise,

    You must connect two switching modules to the outside. Signals may not actually be transferred through the PXI chassis backplane. Bottom of basket can only be used for communication by PCI bus and for the delivery of the trigger. You need to use external threads to physically send the signal of the first PXI-2576 to the second.

    There are two ways to connect signals to the PXI-2576, you can use a block of endings that mounts to the front of the module PXI, or you can use a cable with a block of external connection. You can then connect the signal cables to the connectors to screws on the terminal/connector block. More information about the options of connection to the NI PXI-2576 connectivity products Page.

    Hope this helps!

    Chris G

  • How to transfer data to my Tablet xpod caramel

    How to transfer data from computer to xpod? No establishing connection does not, when connecting xpod with data cable computer show ANORID in (fax and printer) with pilot error. I try to fix it with the update, but it does not work.

    also SD memory card not visible in the file xpod but Manager show the State of memory in STORAGE in settings. and how do I transfer data from xpod sd card.
     

    Hello

    Thanks to community Microsoft can help you with you about Windows!

    I see that you are facing problems with xpod.

    You will need to contact xpod for assistance.

    If you need help on Windows please keep us informed.

    We will be happy to help you!

  • How to transfer photos from my iPhone to my iPad, put them in albums and then remove them from my iPhone

    How to transfer photos from my iPhone to my iPad, put them in albums and then remove them from my iPhone

    There are several methods.

    You could make a start by looking at this article.

  • How to transfer playlists from iTunes on a flash drive

    How to transfer playlists from iTunes on a flash drive

    Select tracks and drag them to the disc.

  • How to transfer music from my Imac to my Iphone5c?

    How to transfer music from my Imac to my Iphone5c? I downloaded a cd on the computer, but I do not see the icon from my iphone to the computer and don't see a way to transfer music to my phone.

    See this-> sync iPhone, iPad or iPod touch with iTunes on your computer via a USB - Apple Support

  • How to transfer music from computer to iphone6

    Can someone tell me how to transfer music from my computer to my iphone

    You use iTunes on your computer to synchronize the contents of the computer and iTunes to your iOS device. See this support document for further assistance. Sync your iPhone, iPad or iPod touch with iTunes on your computer via a USB - Apple Support

  • How to transfer photos FROM Mac TO devices using Photos

    With the help of pictures: how to transfer photos FROM my Mac to my iPhone or iPad?

    Several ways: you want to transfer all the photos from your iPhone and the iPad, or selected albums?

    1. You can stream the new photos continually on your mobile devices using 'My Photo Stream': iCloud: Photo Stream FAQ
    2. You can use iCloud library to transfer all the pictures and keep all synchronized devices.
    3. You can use iTunes to transfer the albums selected to your library of Photos from your iPhone / iPad.

    This support document explains methods 2 and 3: keep your photos safely stored and updated on all your devices - Apple Support

    And if you just want to transfer some photos, post them or put on iCloud drive.

Maybe you are looking for

  • Voiceover speaks of Album names

    Hello guys, I have an iPod Shuffle 4th gen with VoiceOver. He tells me that the titles of the songs and artists, but not the album names. Can you help me get my shuffle to talk about album names?

  • Cannot address fields uncheck the unwanted address book importing

    I am trying to import an address book of .csv. All fields are checked and the fields, I want do not uncheck when I click on them. What causes this problem, please?

  • decimation in fpga

    I am trying to perform a decimation operation into the fpga by capturing a LPF exits at a slower pace than the filter.  My filter running at 80 MHz and I am trying to capture the data filter to 40 MHz (downsampling by 2) to complete the extermination

  • Error 623 - system could not find the directory entry for this connection

    This error box 623 often appears when I'm online and it's boring, what the hell. It is a "network connection error", and it says "cannot load the dialogue." I had tried a "fix" that I found on the microsoft site using microsoft, but it was not useful

  • Impossible to publish my video filled with burn on dvd - r disc

    whenever I finished publish format and start to burn disc - after about 6% ecoding, error messagetold you can't burn DVDs disc - unknown error - please help.I've worked really hard put some photo togeather and videos family to make a movie.I download