"Scott Hannahs" <[EMAIL PROTECTED]> wrote: >At 7:58 -0500 5/19/04, [EMAIL PROTECTED] wrote: >>If the task acquires a finite number of samples and you set this input to >> -1, the VI waits for the task to acquire all requested samples, then reads >> those samples. > >Is this a blocking wait like the non-DAQmx call into a CIN (or LLB) or >is it a "LV style" wait where other LV nodes even in the same thread can >execute? That would be nice!
It is a blocking wait for the thread the Call Library Node to DAQmx is called in and in LabVIEW before 7.0 this would cause the execution subsystem in which the according VI runs to block entirely. LabVIEW 7.0 and higher acquires by default several threads per execution subsystem so other VIs beside the CLN but in the same execution subsystem can keep running. >Is there a way to do this threading in our own created dlls (frameworks)?. >I would like to make my PCI-GPIB library non-blocking but that is not >trivial because of this limitation. Is there a way to set up a call back >into LV for a non-blocking wait from a CIN or framework? You don't need to do anything special other than making sure your DLL is reentrant (no globals or if there are, they must be protected by mutexes, but watch out to not create mutual exclusion locks if you might end up using more than one mutex to protect different resources) and then set the Call Library Node to execute reentrant (the node changes from orange to light yellow if it is reentrant). Before LabVIEW 7 this would block the execution subsystem anyhow unless you reconfigure the thread allocation for that subsystem with an undocumented VI in the vi.lib/utility/sysinfo.llb. In LabVIEW 7 it will not block the execution subsystem but only the single thread LabVIEW uses to call that library function. >Then again, DAQmx could be ported to all the other platforms since it was >written in such a nice modular way that it only needs a trivial stub driver >for other platforms..... :-) Everybody would hope it's trivial but I'm sure it is anything but that ;-) Rolf Kalbermatter CIT Engineering Nederland BV tel: +31 (070) 415 9190 Treubstraat 7H fax: +31 (070) 415 9191 2288 EG Rijswijk http://www.citengineering.com Netherlands mailto:[EMAIL PROTECTED]
