LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

API's & drivers

Hello.

I'm already a bit confused when reading about drivers and APIs... What's the difference between an API and a driver???(because sometimes texts refers to some of them without distinction).

Once known the difference, which is which? NI-DAQ is a... driver or API???
And this for NI-DAQ, NI-DAQmx, NI-SCOPE, NI-FGEN, NI-DAQ 7.

For what I think I understand NI-DAQ and NI-DAQmx are both drivers and APIs, and NI-FGEN and NI-SCOPE just APIs. If I'm not wrong, why 2 APIs for one driver???

Thanks.
0 Kudos
Message 1 of 4
(7,171 Views)
Hmm. You're right that we often use those terms interchangeably.

Technically, the driver is the piece of code that runs in the operating system kernel that does the low-level programming of the I/O hardware.

This low-level programming is somewhat complicated, so we create a higher-level Application Programming Interface (API) on top of it that is more natural for the user's programming environment.

So, for example, NI-DAQmx has a driver that controls NI's DAQ hardware. NI-DAQmx also includes a LabVIEW API for LabVIEW users, a C API for CVI users, etc.

So when we talk about NI-DAQmx in LabVIEW, we're talking about the whole stack of software--the LabVIEW VIs for DAQmx all the way down to the low-level kernel driver. Sometimes we call it the N
I-DAQmx driver, and sometimes we call it the API. For the most part, you don't ever have to care about which specific components we're talking about.

The same is true for all of these other products you mention. For example, NI-SCOPE is the software you use to talk to NI's Oscilloscope products. It includes an API for LabVIEW, an API for C, as well as the low-level driver that programs the hardware.

Does this help clarify things?

Brian
Message 2 of 4
(7,171 Views)
Thanks a lot Brian!!!
Another little question to finish:
NI-SCOPE(API) can use both NI-DAQ(driver) and NI-DAQmx(driver). Then why NI-SCOPE(API) and not NI-DAQmx(API) or NI-DAQ(API)? Why use NI-SCOPE and NI-FGEN (APIs), in my case, and not NI-DAQ(API) and NI-DAQmx(API)? Which are they advantages? Just being easier to use or learn(because they have a more limited set of functions)?

Eneko
0 Kudos
Message 3 of 4
(7,171 Views)
It is true that some of the APIs for our modular instruments use components from the DAQ driver to talk to the hardware. This is primarily for efficiency of development; for certain tasks, the low-level programming of one of our DAQ boards and one of our oscilloscope boards is very similar.

At the API level, the DAQ API presents a general purpose API that cuts across a lot of different kinds of hardware with a lot of different capabilities. We could extend the API to also cover all oscilloscope functionality, and all Function Generator functionality, and all High-Speed Digital functionality, and all Digital Multimeter functionality, etc. But doing so could make programming any of our hardware more difficult, because you have to understand
a lot more that may not apply to you.

So, we present different APIs for the different groups of hardware, so that each API can focus on making its own hardware powerful and easy to use.

For example, NI-SCOPE includes several measurements that you traditionally find on oscilloscopes, such as rise time, overshoot, etc. The NI-DAQmx API doesn't do measurements like this directly; you have to use Advanced Analysis functions to compute them.

I hope this helps.

Brian
0 Kudos
Message 4 of 4
(7,171 Views)