Jump to content

hippo Th

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by hippo Th

  1. Wow, that's a huge amount of input. :-) Thanks to all.

    So how to build up a single CLFN is partly clear.

    With wizard import of the function from .dll with .h-files, I still strugling. The wizard in LV partly recognized some functions from the .h-file, but not all (see picture). It depends which .h-file I choose. At the end, no fuction was usable.
    I allready tried to include in an .h-file the command #include "fileX",... . But with no sucess --> LV crashed.

    On 1/4/2019 at 11:59 PM, smithd said:

    Thats kind of a circular question -- if the manufacturer doesn't want people to use their driver standalone, then they will not provide a header. If they want people to be able to use their driver standalone, they must provide a header.

    In the docu is explicit written that you can develop your own driver. So it should work.

    On 1/4/2019 at 10:46 PM, ShaunR said:

    It requires a lot of setup allocations before you can call it. You need to start with the initialisation and de-initialisation functions then build it up from there. 

    I suppose, it probably will be written indirectly in the docu - maybe via the examples. Logical thinking. --> try & error.

    On 1/4/2019 at 11:52 PM, smithd said:

    You will have to make your own simple wrapper library which implements the callback functions.

    When it makes sense to work with callback function? Only, when I need this optional part of function?

    On 1/5/2019 at 1:13 AM, Rolf Kalbermatter said:

    Usually the lib library only is the import library for the DLL. C can't directly and magically call DLL functions. Somehow it needs to know in what DLL they are and how to load them into memory. This can be either done explicitly by calling LoadLibrary() and GetProcAddress() or by linking the import library that came with the DLL. The import library is simply a precompiled lib file that does all the LoadLibrary() and GetProcAddress() stuff already. In LabVIEW you can't link in a lib library but have to use a Call Library Node, which is the LabVIEW interface to LoadLibrary() and GetProcAddress().

    As I understand you all correct.
    The .lib-file is importand for the .dll. Is there a way to work with the .lib file in LV - 3third party software? (attached)
    The .lib-file can be loaded  on two ways: (1) By calling LoadLibrary()/GetProcAddrss() or (2) by linking the import library. But both ways are senseless for LV.
    The full/complete .h-file is nice for me as LV developer. But not necessary, when I have the docu with the description of function for the .dll. With the .h-file and the wizard, I can simple generate all functions automatically at once. With the docu I have to programm every function node according the description on my own.

    dll import.png

    cifX32DLL.lib

  2. Hi Shaun,

    1 hour ago, ShaunR said:

    CLFN

    What does CLFN stand for?

    1 hour ago, ShaunR said:

    The return value is int32_t not void. You are missing the Handle parameter (CIFXHANDLE) and pvData is a pointer to something (probably an array) - not an InstanceDataPtr (which is a special LabVIEW parameter).

    I know, that this is/was wrong. But, I do not see any other possibilty in LV. Therefor my upper questions. Where and in which form I get the Handle parameter?

    1 hour ago, ShaunR said:

    Even if you fix that. You are still not finished. You will need to call other functions to get CIFXHANDLE through some sort of initialisation procedure and then deinitialise once finished. You will probably also have to call the enumerate functions to get the boards and their channel numbers so you can populate those parameters. If they have provided C/C++ examples then that will tell you what functions you have to call and in what order. Any mistakes will usually result in a LabVIEW crash.

    Thanks. I am partly aware of this. 😕 But first, I want to "run" a single function - and then I would go further. Step by Step

    I was already looking for a header file and also a library file. But nothing fit so far. With the .lib-file I orientated myselfe here:


    Will I usually get this header or .lib file from the manufactor or is it secret? Alternativ, the manufactor offers their own software with a huge software package (about 900MB). But I don't know, how to implement their own software to my test bench with LabVIEW.

    Attached I added all .h and .lib - files from their software package.

    .h_and_.lib-files.zip

  3. Hello togehter,

    ich want to implement my first driver file (.dll) in Labview. As hardware for the driver file, I use the card "cifx 50e-dp" from the company Hiltscher.

    Attached is the documentation with a screenshot, the driver (win10 & 32bit) and an example-VI with my example function "xChannellORead" with the driver file.
    I hope, that in the documentation are all necessary information. :-/

    Unforteunatly is it not working how it should be.

    How must the VI be configurated? How are the correct settings/arguments in the Call Library Function? see --> configuration --> parameters
    Until now, my VI is not executable.

    Which name(s)? Which type(s)? Which data type(s)? ....
    Which calling convention? Try & error, if LabView crash?
    Are the names/arguments inlet or outlets? How can I reconize it?

    I would be happy about every note/impuls/advise.

    Best regards
    Thomas

    test.vi

    screenshot XChannellORead.png

    cifX API PR 04 EN.pdf

    cifX32DLL.dll

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.