LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I build a dll containing a callback function ,the callback function is used in CVI.

Solved!
Go to solution

HI 

Case is that LABVIEW receive external data and produce a interrupt ,then pass data to CVI.

Can I build a dll  containing a callback function ,use the callback function in CVI. Or there is a better way?

THANKS

0 Kudos
Message 1 of 14
(4,117 Views)

We need a lot more information about what you want to do and what you have done so far to be able to give any useful information here.

 

Most likely you do not want to use callback functions at all.

 

And why would you want to do the data acquisition in LabVIEW to create a DLL of it to be used in CVI, instead of doing all in CVI directly??

Message Edited by rolfk on 11-17-2009 08:10 AM
Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 14
(4,107 Views)
http://zone.ni.com/devzone/cda/tut/p/id/8503
Regards
Asad Tirmizi
Design Engineer
Institute of Avionics and Aeronautics

" Its never too late to be, what u want to be"
Using LabVIEW 8.2
0 Kudos
Message 3 of 14
(4,100 Views)

rolfk 写:

We need a lot more information about what you want to do and what you have done so far to be able to give any useful information here.

 

Most likely you do not want to use callback functions at all.

 

And why would you want to do the data acquisition in LabVIEW to create a DLL of it to be used in CVI, instead of doing all in CVI directly??

Message Edited by rolfk on 11-17-2009 08:10 AM

The data acquisition is done on PXI-7842 ,it must work in LABVIEW . Then other task has done in CVI. So,  LABVIEW(getting data) --> CVI(processing data) .

0 Kudos
Message 4 of 14
(4,085 Views)
What Rolf is trying to say is that there is no reason to use LV to collect the data and pass to CVI when you can just simply do the data collection in CVI. If LabVIEW can do it then CVI can do it the exact same way.



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 5 of 14
(4,077 Views)

Joe_H 写:
What Rolf is trying to say is that there is no reason to use LV to collect the data and pass to CVI when you can just simply do the data collection in CVI. If LabVIEW can do it then CVI can do it the exact same way.

I use PXI-7842.  Can I  operate it with CVI ?

0 Kudos
Message 6 of 14
(4,049 Views)

If you can run it in LV then you can use it in CVI. The daq driver is the same, it is just the interface in which it is used. You can use it in LabVIEW, CVI, C++. Whichever you prefer.




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 7 of 14
(4,044 Views)

 


Joe_H 写:

If you can run it in LV then you can use it in CVI. The daq driver is the same, it is just the interface in which it is used. You can use it in LabVIEW, CVI, C++. Whichever you prefer.


 

I need operate FPGA of PXI-7842.  Can CVI do it ?

I will receive external data through programming FPGA, then translate data to CVI for other task .

External data will arrive at any time . LV must buffer external data, then tell CVI  data ready to take away.

And I do not want to use the query method with CVI always.

帖子被coolfire在 11-19-2009 10:25 AM
时编辑过了
帖子被coolfire在 11-19-2009 10:26 AM
时编辑过了
0 Kudos
Message 8 of 14
(4,034 Views)

coolfire wrote:
I need operate FPGA of PXI-7842.  Can CVI do it?

I will receive external data through programming FPGA, then translate data to CVI for other task .

External data will arrive at any time . LV must buffer external data, then tell CVI  data ready to take away.

And I do not want to use the query method with CVI always.


Well I'm pretty sure you can't develop the FPGA part in CVI. However in order to access the FPGA from a Windows application it needs to use the NI-RIO API. Technically it should be possible to access the NI-RIO API from CVI, since it is basically a DLL based C AP. LabVIEW uses internally this same API.

 

Obviously in order to use that API, NI would need to provide the documentation and C header files for that API. In case they don't or can't do that you would indeed have to create a LabVIEW wrapper and compile that into a DLL to be accessed by CVI. However LabVIEW does NOT support callback pointers, so you couldn't do that directly in LabVIEW. Instead you could use Windows events, calling in LabVIEW the apropriate Windows APIs to deal with them. Still most likely you will not be able to avoid some C wrapper on the LabVIEW side too, to provide some bindings to platform APIs. All in all a rather complicated setup, so I would in your case bug the NI repersentative about support for NI-RIO directly for CVI.

Rolf Kalbermatter
My Blog
Message 9 of 14
(4,022 Views)
So now is there no way to complete this work ?
0 Kudos
Message 10 of 14
(4,009 Views)