- Calling LabView DLL's

From: [at]} <Rainer>
Date: Sat, 11 Aug 2007 14:27:19 +0200

----boundary-LibPST-iamunique-413165341_-_-
Content-type: text/plain


Am 09.08.2007 um 18:06 schrieb Wojtek Skulski:

> On Wed, 8 Aug 2007, Rainer Neubauer wrote:
>> Does this mean you call the NI DLL's directly, i.e. writing an
>> interface module and calling the DLL procedures from BlackBox, so
>> "bypassing" the LabView language (which would imply a proper
>> documentation of the DLLs) ?

>
> Yes, exactly. I can release my interface modules to the community,
> provided I do not have to write documentation ;-)
>

This sounds interesting. It would be nice if you could give me a hint
where
to find the documentation of a certain DLL (e.g. for the PXI-4351) at
NI.


> Please let me know if you are interested. I can send the following
> subsystems "as is" to whoever wants to have a look, but please do it
> at your own risk.

It would be great if you could mail the interface module for this DLL
and the
subsystem for the PXI-4351 (to rainer.neubauer{([at]})nowhere.xy
have
a look how you did it and by the way learn a lot.

I'm currently trying a similar approach but I take a long way round:
instead of writing an interface module directly for a NI DLL I take the
LabView-VI's (= subroutines) sitting on top of the DLL, try them out
to see how it works
and then tell LabView to build a DLL of these VI's. Then I write an
interface module
for this DLL and call the code from CP.

Advantages:
- playing around with the VI's at a very low level to see how it
works before I write interface modules
- if something does not work (or better: if I do not understand how
it works)
I have the extensive LabView help available or may ask anybody being
familiar in the world of LabView without talking about CP and (more
important)
about lowest level details of the C language
- I may decorate these VI's with some small code around their input
or output
values directly in LabView to get rid of unnecessary low level
details as soon
as possible. This code will go into the DLL too.

Example: There are often VI's taking input parameters of types 8 bit
unsigned or
16 bit unsigned. For me this seems to make not so much sense; I guess
these types are
just what the C code in their DLL expects to get. So I put LabView
type conversions right
in front of these inputs to be able to supply all integer inputs with
32bit signed integer values
which corresponds to CP INTEGER type.

Best regards,
Rainer

--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy

----boundary-LibPST-iamunique-413165341_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydG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XHBhcg0KZGV0YWlscyBhcyBzb29uXHBh
cg0KYXMgcG9zc2libGUuIFRoaXMgY29kZSB3aWxsIGdvIGludG8gdGhlIERMTCB0b28uXHBhcg0K
XHBhcg0KRXhhbXBsZTogVGhlcmUgYXJlIG9mdGVuIFZJJ3MgdGFraW5nIGlucHV0IHBhcmFtZXRl
cnMgb2YgdHlwZXMgOCBiaXQgIFxwYXINCnVuc2lnbmVkIG9yXHBhcg0KMTYgYml0IHVuc2lnbmVk
LiBGb3IgbWUgdGhpcyBzZWVtcyB0byBtYWtlIG5vdCBzbyBtdWNoIHNlbnNlOyBJIGd1ZXNzICBc
cGFyDQp0aGVzZSB0eXBlcyBhcmVccGFyDQpqdXN0IHdoYXQgdGhlIEMgY29kZSBpbiB0aGVpciBE
TEwgZXhwZWN0cyB0byBnZXQuIFNvIEkgcHV0IExhYlZpZXcgIFxwYXINCnR5cGUgY29udmVyc2lv
bnMgcmlnaHRccGFyDQppbiBmcm9udCBvZiB0aGVzZSBpbnB1dHMgdG8gYmUgYWJsZSB0byBzdXBw
bHkgYWxsIGludGVnZXIgaW5wdXRzIHdpdGggIFxwYXINCjMyYml0IHNpZ25lZCBpbnRlZ2VyIHZh
bHVlc1xwYXINCndoaWNoIGNvcnJlc3BvbmRzIHRvIENQIElOVEVHRVIgdHlwZS5ccGFyDQpccGFy
DQpCZXN0IHJlZ2FyZHMsXHBhcg0KUmFpbmVyXHBhcg0KXHBhcg0KLS0tIEJsYWNrQm94XHBhcg0K
LS0tIHNlbmQgc3ViamVjdCBIRUxQIG9yIFVOU1VCU0NSSUJFIHRvIGJsYWNrYm94QG9iZXJvbi5j
aH19AA//Hx8=


----boundary-LibPST-iamunique-413165341_-_---
Received on Sat Aug 11 2007 - 14:27:19 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:31:25 UTC