Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Call Library Function in LabView 6i to access U2C_SpiReadWriteSS transfer routine used by Diolan interface adapter only returns the first byte from the SPI Slave

What version of LabVIEW are you running? I'm running 6i. When I looked for examples as per your instructions, I didn't find any named "Call DLL." Thanks again for you help, it is greatly appreciated!
0 Kudos
Message 11 of 17
(1,869 Views)
I'm using 8.2. Sorry, forgot that you were running 6i. The example should still be available in 6i. Check the "Program Files\National Instruments\LabVIEW 6i\examples\dll\data passing" directory, or thereabouts. You can also check the Knowledgebase for "calling external code from LabVIEW". There used to be a separate document available called "Using External Code in LabVIEW" that was later integrated into the LabVIEW help. In 6i it was still separate. The 7.0 version is here. The basic premise still holds, though.
0 Kudos
Message 12 of 17
(1,863 Views)
Hi, I'm a LabVIEW beginner and as you've been working on this library calling, I was wondering if it is possible that you send your final program online. Thx Zm@steR
0 Kudos
Message 13 of 17
(1,739 Views)
Are you asking this of me, or the original poster? And, what specifically, are you referring to?
0 Kudos
Message 14 of 17
(1,734 Views)
I was asking it from who can help me ^^ But I just saw that this program will not match my application because I want to communicate with the I2C protocole and not the SPI one. Perhaps you can help me thaught. Do you know what is the type of the data return by the U2C-12. e.g. I set the clock and the datasheet says : Return values: U2C_SUCCESS The I2C bus frequency value was successfully set. U2C_HARDWARE_NOT_FOUND U2C-12 device referenced by hDevice handle was not found. Do I have tu use a string ? (Hope you'll understand me, my english is quite poor)
0 Kudos
Message 15 of 17
(1,729 Views)
Do you have the API documentation? If not you can download it from Diolan. The return value is an integer, as you can see from the figure in post#8. U2C_SUCCESS refers to the value of the enum, which is what is used in the C library. If you installed the software for the board you will find the definitions for the datatypes in the file "C:\Program Files\Diolan\U2C-12\Src\Common\i2cbridge.h".
0 Kudos
Message 16 of 17
(1,712 Views)
Sure I download it. It's easier to work with it, but I don't understand everything. Sometimes it's quite difficult for me to understand english specs. And as I just start with LabVIEW, it's even harder to manage to find which kind of value I've got to use. I'll work on it, but I you can expect for several more questions. Thanks again for your help.

Message Edité par Zm@steR le 05-22-2008 02:49 AM
0 Kudos
Message 17 of 17
(1,696 Views)