Recent

Author Topic: Advantech DaqNavi  (Read 6757 times)

Degibbo

  • New Member
  • *
  • Posts: 46
Advantech DaqNavi
« on: October 29, 2018, 03:10:33 am »
G'day All,
Has anyone had success in driving Advantech PCI cards via DaqNavi in Lazarus?

If so, could you please walk me through the procedure?
So far all attempts by me have failed miserably with multiple errors.  Clearly I don't know what I am doing, so need firm guidance.

Cheers & thanks,
DG

jamie

  • Hero Member
  • *****
  • Posts: 7602
Re: Advantech DaqNavi
« Reply #1 on: October 29, 2018, 06:10:47 pm »
isn't there a C++ example code ? and of course the PDF on the API would be nice..

I am sure you need to install a DLL for the interface or some installation before your app can talk to it.

Most of us here can take a simple C++ example and convert it to fpc/Laz.

Do not try to do the .net examples.

The only true wisdom is knowing you know nothing

tr_escape

  • Sr. Member
  • ****
  • Posts: 437
  • sector name toys | respect to spectre
    • Github:

Degibbo

  • New Member
  • *
  • Posts: 46
Re: Advantech DaqNavi
« Reply #3 on: October 31, 2018, 12:32:38 am »
G'day gentlepersons.  Thanks for the replies.
Unfortunately my programming skills are not good enough to handle this task without hand holding.  The vandor sent me instructions on how to build an ActiveX component in Delphi, but there are too many differences with Lazarus.

I don't really want to create a component specifically for this task.  I have found the "BDaqOcxLib_TLB" that the original Delphi program had in its Uses clause, but I get about 13 "can't find" errors in compiling, most I expect related to "AxCtrls" and/or "StdVCL" which are both present.  I am sure that those with experience would be able to determine what is missing or wrong, but I can't fathom it.

Cheers & thanks,
DG

jamie

  • Hero Member
  • *****
  • Posts: 7602
Re: Advantech DaqNavi
« Reply #4 on: October 31, 2018, 01:02:56 am »
you need a C++ example that can be engineered over to FPC.

And yes, those that wrote the Delphi one also had these API's instructions...

The only true wisdom is knowing you know nothing

CM630

  • Hero Member
  • *****
  • Posts: 1651
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: Advantech DaqNavi
« Reply #5 on: October 31, 2018, 08:59:00 am »
If you have C header files (they should be provided with the drivers) it should not be too hard to convert them to Pascal.

You might find these useful:

http://forum.lazarus.freepascal.org/index.php?topic=7894.0
http://forum.lazarus.freepascal.org/index.php?topic=26658.0
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2

mig-31

  • Sr. Member
  • ****
  • Posts: 308
Re: Advantech DaqNavi
« Reply #6 on: October 31, 2018, 09:33:04 am »
In past I looked into Linux DAQNavi version. All examples were done in QtCreator. If I remember correctly, all code was written in C++. Translation of C++ header to FPC will be more difficult compare to C.

Without any code example in C++ or Delphi, it's so difficult to say what you must do to make you work. DAQNavi is so big ~700MB. Post a part of your code with reading/writting data from/to Advantech DAQ or Delphi example from DAQNavi, if you can.

Lazarus 4.0 - OpenSuse Leap 15.4, Mageia 8, CentOS 7

 

TinyPortal © 2005-2018