LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TI DSK interface to Labview

HI

I want to use the TI c600 DSK board but instead of programming the
interface test routines in VC++ I want to do it in Labview. I have used
Labview quite a bit and have used the Call library function before also.
But I have a problem.

The function dsk6x_open is define as
BOOL dsk6x_open(char *pfname, dskHANDLE *HandlePtr);

The Bool type and the Char type is easy, but the dskHANDLE type is a bit
of a mistery to me. In the Win32 example included on the DSK manuals,
the variable is defined as below and.

dskHANDLE handle;
char *pfname = "c:\\ti\\c6000\\dsk6x11\\include\\ti_ppdsk.cfg";

if(dsk6x_open(pfname,&handle)){
etc............
}

How do you set the 2nd argument of the Call library function to work
with the dskHANDLE type. I suppose
it is some kind of structure with its
contends. The usual way is to pass a pointer to the structure if you
work in C. So how now ?? How do you set the Labview Call library
function types??

Regards

R

--
-------------------------------------------
Mail from Adriaan H. Bredekamp

Electrical Engineer
Department of Physics and Astronomy, Condensed Matter Division
Klingelbergstr. 82, CH-4056 Basel, Switzerland
phone: +41 (0)61 267 37 69, GSM mobile: +41 (0)76 583 6501
Fax: +41 (0)61 267 37 84
-------------------------------------------
0 Kudos
Message 1 of 3
(2,804 Views)
Adriaan,

LabVIEW cannot pass structures to a DLL call at this time. To do this, you would need to write a wrapper function that takes all of the individual elements that LabVIEW can pass and combine them into the structure.
An easier task would be to find out where dskHANDLE is defined and what type it is. In VC++, a HANDLE is an unsigned 32-bit integer. My guess is that may also be the case here. However, that data type has to be defined in one of their header files somewhere otherwise the examples will not compile in VC++. I would start at their top level header file and search for typedef's for this data type.

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 2 of 3
(2,804 Views)
> I want to use the TI c600 DSK board but instead of programming the
> interface test routines in VC++ I want to do it in Labview. I have used
> Labview quite a bit and have used the Call library function before also.
> But I have a problem.
>
> The function dsk6x_open is define as
> BOOL dsk6x_open(char *pfname, dskHANDLE *HandlePtr);
>
> The Bool type and the Char type is easy, but the dskHANDLE type is a bit
> of a mistery to me. In the Win32 example included on the DSK manuals,
> the variable is defined as below and.
>
> dskHANDLE handle;
> char *pfname = "c:\\ti\\c6000\\dsk6x11\\include\\ti_ppdsk.cfg";
>
> if(dsk6x_open(pfname,&handle)){
> etc............
> }
>
> How do you set the 2nd argument of the Call library function to work
> with the dskHA
NDLE type. I suppose it is some kind of structure with its
> contends. The usual way is to pass a pointer to the structure if you
> work in C. So how now ?? How do you set the Labview Call library
> function types??
>


In general, when you run into a type specified in another header file,
you will need to look it up and make a substitution. In this case, I
believe that you can pass in an int32 by adress so that the first call
can allocate, making a new int32 value, and you can then pass that value
to the later calls.

Greg McKaskle
0 Kudos
Message 3 of 3
(2,804 Views)