Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Developement of Instrument Drivers

I am developing an instrument driver for a biomedical device. I have low level APIs along with the device to communicate with it. Using these API functions I can get the data in my computer in a C or C++ code. I want to develop a Lab VIEW instrument driver for that device. I have downloaded generic template from the NI website and modified for naming conventions according to my device. Now I have got the driver icon in Function->Instrument I/O -> Instrument Drivers-> My Driver. I also have different icons named Initialize, close, tree, Utilities etc. Now I want the Initialize of palette to open my device. So how do I call my APIs (to open the device) from this initialize ICON after dragging it to block diagram window. I have C function to open my device, but how do I integrate that with Lab VIEW Initialize ICON.
0 Kudos
Message 1 of 5
(3,745 Views)
First, let me ask you what kind of device this is and what you're using to communicate with it in your C/C++ code. Typically, a LabVIEW instrument driver will contain only "G" code and use VISA functions to communicate with GPIB, Serial, USB, Ethernet, PXI instruments. The exception is VXI plug&play or IVI drivers that are originally written with LabWindows/CVI. If your instrument uses one of the above, I would strongly urge you to avoid DLL calls. In general, I think there exists a strong resistance to using LabVIEW drivers where the possiblity to modify or correct code does not exist. If you do insist on using a DLL, then your driver should be written as a LabWindows/CVI driver and the creation of a LabVIEW driver can be done automatically with existing tools.
0 Kudos
Message 2 of 5
(3,729 Views)
Hi,
Dennis Knutson
 
Thanks a lot for reply.
The device i have is a biomedical amplifier, where i capture low level signals from the electrodes and amplify them, convert to digital data and send this data to my PC using USB. I have all the API's in C/C++ language to get the digital data from the device to my PC. I have all the functions to communicate with the device like AmpReset(), SetAmpGain(), GetADCData...etc. Now i want to develope a labVIEW instrument driver for that device. So i want to call these functions from labVIEW. Like in any instrument driver we use "initialize" ICON from the palette, we drag and drop this ICON so that it will initialize the device and internally we can configure the setting for communication into the block diagram. Now the functionality i want from the driver is that the Initialize ICON should call my AmpReset() or AmpPrepare(). Similarly i should be able to use the data in labVIEW that i got from GetADCData(). For that i need to call these functions from labVIEW. Please let me know how can i do this and what should i refer for this. I am very new to LabVIEW, your guidence can help me lot.
 
Thanks.
0 Kudos
Message 3 of 5
(3,702 Views)
probably would like to know how to use Call library function from initialize.vi if i am on right track.
0 Kudos
Message 4 of 5
(3,695 Views)
There is a manual called "Using External Code In LabVIEW". You can get to it from Help>Search the LabVIEW Bookshelf.
0 Kudos
Message 5 of 5
(3,689 Views)