Recent

Author Topic: NIDAQmxBase header translation  (Read 42693 times)

mig-31

  • Sr. Member
  • ****
  • Posts: 260
Re: NIDAQmxBase header translation
« Reply #15 on: September 12, 2014, 06:42:31 pm »
A new version of NIDAQmx doen't support Linux. Only NIDAQmx 8.0.2 exists for Linux and run under Linux distribution with kernel 2.6.x, actually long time supported Red Nat Linux 6 and it clones CentOS 6 and Scientific Linux 6. It works with Labview, but i didn't discover it with C examples.
A last version of NIDAQmxBase 3.7.0 supports newer linux distributions, like OpenSuse, with kernel around 3.3.x.

I'm primary interested on using NI hardware under Linux.
Are you sure that NIDAQmx does not work on Linux and only NIDAQmxBase works on it?
As far as remember, I found the  NIDAQmx bindings in a project for Linux.
Is the so library name of the last Linux NIDAQmx the same as in Windows nicaiu?
Could you upload pascal bindings for NIDAQmx for Linux to this topic (NIDAQmxCAPI_TLB.pas have ActiveX dependence in uses part )?
Thanks
Lazarus 2.0.2 - CentOS 7.x, Mageia 7.1

CM630

  • Hero Member
  • *****
  • Posts: 858
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: NIDAQmxBase header translation
« Reply #16 on: September 16, 2014, 08:47:31 pm »
Is the so library name of the last Linux NIDAQmx the same as in Windows nicaiu?
 


 nicaiu does not sound familiar to me though I might have seen it. Any way I did not understand your question.
Could you upload pascal bindings for NIDAQmx for Linux to this topic (NIDAQmxCAPI_TLB.pas have ActiveX dependence in uses part )?

I have posted the link a few posts above  :D Here is the same link.
« Last Edit: September 16, 2014, 08:49:27 pm by paskal »
Лазар 1,8,2;W7 64bit or XP 32bit;FPC3,0,4;rev 57369

mig-31

  • Sr. Member
  • ****
  • Posts: 260
Re: NIDAQmxBase header translation
« Reply #17 on: September 18, 2014, 08:58:25 am »
Hi,

nidaqmx_snippet.7z  includes NIDAQmxCAPI_TLB.pas, which has in uses section ActiveX. ActiveX doesn't support under Linux. 
Also nidaqmx.pas is a bindings for nicaiu.dll (system32), not for nidaqmx32.dll on Windows 32-bit.
I discovered only NIDAQmxBase under Linux. It installs only nidamxbase.so library and nidaqmxbase.h=nidaqmxbase.pas (uploaded above in this topic).
I will try to install older linux driver NIDAQmx 8.0.2 and discover C header files.
Lazarus 2.0.2 - CentOS 7.x, Mageia 7.1

CM630

  • Hero Member
  • *****
  • Posts: 858
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: NIDAQmxBase header translation
« Reply #18 on: September 19, 2014, 07:58:07 am »
Hm, I looked at the page again and I start wondering why did I consider it a Linux project. Maybe I have tried to run it under Windows. And maybe I was wrong to think that is was a Linux app !?

nidaqmx_snippet.7z  includes NIDAQmxCAPI_TLB.pas, which has in uses section ActiveX. ActiveX doesn't support under Linux. 
 


The  nidaqmx_snippet.7z  is made by me for Win, using the libraries from https://github.com/chandranorth/RTSPM. And the the ActiveX statement is commented there.
 

Also nidaqmx.pas is a bindings for nicaiu.dll (system32), not for nidaqmx32.dll on Windows 32-bit.
 

Actually, I did not understand, do you need bindings for nicaiu.dll or for nidaqmx32.dll?
As I have written, my snippet requires nicaiu.dll.

 

Some of our DAQs are manufactured in 2002 and as far as I have understood they won't work with nidaqmxbase so I cannot afford spending time in that direction. If you are making software for your company only, Base libs might be fine, but if you mean wider usage, maybe you should avoid them.


Edit: I just found out that that I have made a .pas for dynamic linking of nicaiu.dll and it seems to work. I will try to upload it somewhere next week.
« Last Edit: September 19, 2014, 12:25:57 pm by paskal »
Лазар 1,8,2;W7 64bit or XP 32bit;FPC3,0,4;rev 57369

mig-31

  • Sr. Member
  • ****
  • Posts: 260
Re: NIDAQmxBase header translation
« Reply #19 on: September 29, 2014, 09:35:19 am »
Quote
Actually, I did not understand, do you need bindings for nicaiu.dll or for nidaqmx32.dll?
As I have written, my snippet requires nicaiu.dll.
Hi,
I tried bindings for nicaiu.dll and it works. It able me to work with NI hw under Windows.

Question is if you tried NIDAQmx under Linux with the last verison NIDAQmx 8.0.2 http://www.ni.com/download/ni-daqmx-8.0.2/2322/en/. Probably NI was stopped develop it. I think your bindings for Windows probably works with it.
Lazarus 2.0.2 - CentOS 7.x, Mageia 7.1

CM630

  • Hero Member
  • *****
  • Posts: 858
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: NIDAQmxBase header translation
« Reply #20 on: September 29, 2014, 10:05:13 am »
Have you seen that: What Linux Distributions Do National Instruments Drivers and Software Support?
I have no experience with these distros so I cannot be helpful in the recent future. I'd rather spend some time on running a DAQ on Android, but I have no Android device and all our USB DAQs are MCC  :D
Maybe you should start a NI Linux thread, which might attract more Linux aware persons.


Edit: Yesterday I tried to install NIDAQmx and NIDAQmxBase on Ubuntu, but I did not succed. It probably means that I'm done with NI+ Linux.
« Last Edit: September 30, 2014, 08:57:04 am by paskal »
Лазар 1,8,2;W7 64bit or XP 32bit;FPC3,0,4;rev 57369

mig-31

  • Sr. Member
  • ****
  • Posts: 260
Re: NIDAQmxBase header translation
« Reply #21 on: September 30, 2014, 09:22:51 am »
I am interested on only pascal bindings.
I asked about pascal bindings on, like ANSI C headers, on NI Forum, but nobody answer on it.

Quote
Edit: Yesterday I tried to install NIDAQmx and NIDAQmxBase on Ubuntu, but I did not succed. It probably means that I'm done with NI+ Linux

Generally NIDAQmx or NIDAQmxBase are for rpm Linux distributions and NIDAQmxBase supports kernels around 3.3.x, NIDAQmx 8.2.0 supports only old kernel 2.6.x. On newest Ubuntu you can't install it.
Lazarus 2.0.2 - CentOS 7.x, Mageia 7.1

CM630

  • Hero Member
  • *****
  • Posts: 858
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: NIDAQmxBase header translation
« Reply #22 on: September 30, 2014, 12:09:20 pm »
Generally NIDAQmx or NIDAQmxBase are for rpm Linux distributions and NIDAQmxBase supports kernels around 3.3.x, NIDAQmx 8.2.0 supports only old kernel 2.6.x. On newest Ubuntu you can't install it.
That's exactly what is says- "won't work on anything but 2.6.х".
I have no idea what you are using DAQs for, but maybe for Linux you'd like to try MCC devices. They generally have better drivers, they declare support for a wide range of linuxes and in their latest drivers they have some examples for Android. Also, their devices are cheaper, which is not insignificant- if you want to use a cheaper OS, you are likely to prefer cheaper DAQs, too. As far as HW is concerned- same low quality. I think most boards are assembled in the same factory in Hungary.
I could try to run a MCC device in Linux, if this will be useful for you.

Лазар 1,8,2;W7 64bit or XP 32bit;FPC3,0,4;rev 57369

rs_

  • Newbie
  • Posts: 1
Re: NIDAQmxBase header translation
« Reply #23 on: October 31, 2014, 08:54:21 pm »
I post here my work, the translated header file for NIDAQmx. It is the first version, but maybe it could be useful. In the future maybe I write an object wrapper around this, but for most applications this unit should work too.

mig-31

  • Sr. Member
  • ****
  • Posts: 260
Re: NIDAQmxBase header translation
« Reply #24 on: November 04, 2014, 09:35:17 am »
That's exactly what is says- "won't work on anything but 2.6.х".
I have no idea what you are using DAQs for, but maybe for Linux you'd like to try MCC devices. They generally have better drivers, they declare support for a wide range of linuxes and in their latest drivers they have some examples for Android. Also, their devices are cheaper, which is not insignificant- if you want to use a cheaper OS, you are likely to prefer cheaper DAQs, too. As far as HW is concerned- same low quality. I think most boards are assembled in the same factory in Hungary.
I could try to run a MCC device in Linux, if this will be useful for you.
You are right and I see on MCC web that they provide better Linux support, but now I don't have any project where I could try there devices, but I'm interested for how it works under Linux.
In my case, choice of using Linux, based on fact that it generally more stable and secured.
Old kernel is not big problem for now, because RHEL 6 and there clones Cent OS 6, Scientific Linux 6 will be supported until year 2020. And I think the newest RHEL7 also supported by National Instruments.
The main problem is the difference between NIDAQmxBase and NIDAQmx. Generally, Windows is supported better.
Lazarus 2.0.2 - CentOS 7.x, Mageia 7.1

mig-31

  • Sr. Member
  • ****
  • Posts: 260
Re: NIDAQmxBase header translation
« Reply #25 on: November 04, 2014, 09:57:01 am »
News:
  1. NI PXIe-6612 can be operated using NIDAQmx pascal bindings under Windows;
  2. I created pascal NIDAQmx bindings for Linux 32bit, kernel 2.6.x and NIDAQmx 8.0.2 for Linux:
      http://www.ni.com/download/ni-daqmx-8.0.2/2322/en/ 
      Succefully tested with NI PCI-6250 card.
      I attached headers to this discussion.
« Last Edit: November 06, 2014, 04:11:40 pm by mig-31 »
Lazarus 2.0.2 - CentOS 7.x, Mageia 7.1

mig-31

  • Sr. Member
  • ****
  • Posts: 260
Re: NIDAQmxBase header translation
« Reply #26 on: November 05, 2014, 11:16:14 am »
Hi,

There are a some information about NIDAqmx library and NI DAQ harware in this topic. It wil be good to create wiki page about it. ::)
Lazarus 2.0.2 - CentOS 7.x, Mageia 7.1

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: NIDAQmxBase header translation
« Reply #27 on: November 05, 2014, 11:44:27 am »
Good idea, looking forward to your contribution!
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

mig-31

  • Sr. Member
  • ****
  • Posts: 260
Re: NIDAQmxBase header translation
« Reply #28 on: November 05, 2014, 02:19:12 pm »
@BigChimp

Is it possible to add NIDAQmx and NIDAQmxBase bindings to freepascal sources as a library?
Lazarus 2.0.2 - CentOS 7.x, Mageia 7.1

CM630

  • Hero Member
  • *****
  • Posts: 858
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: NIDAQmxBase header translation
« Reply #29 on: November 05, 2014, 02:40:57 pm »
If you are asking if these libs can become a part of Lazarus/FPC and distributed with it- I am quite that the answer is no.
But you can create a LPK containing your files and create a project in Sourceforge or another repository. And you can list and document it in the Lazarus wiki.
For example I have created such a project, which besides other items, should contain my DAQ bindings, but I have not started uploading to it.

Лазар 1,8,2;W7 64bit or XP 32bit;FPC3,0,4;rev 57369