LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i use labview for communicating with pic18 microcontroller through usb port?

Hi all,

 

I want to make a DAQ card using pic 18 microcontroller which has a built-in usb protocol. I have the firmware of this

controller which will  make it as a usb device. How can i receive the analog voltages from this DAQ card in Labview? or i mean to say that how i can communicate labview with the Pic 18 microcontroller through usb port? I have also the

mpusbapi.dll file which is for Visual C++. Can i make changes in this dll file to make it compatible with labview?

 

0 Kudos
Message 1 of 13
(5,860 Views)

I'm not sure what this dll should be, but you can call in in LabVIEW with the Call Library Function Node.

To work directly with the USB Interface just search the forums for "USB Raw Communication with LabVIEW".

 

 

Hope this helps,

Christian

0 Kudos
Message 2 of 13
(5,859 Views)

Thanks for your reply. Can you send me the link of the tutorial for using call library function and for communicating

labview with usb device?

 

 

 

 

 

Muzammil_IIEE

 

 

0 Kudos
Message 3 of 13
(5,846 Views)

So what I would do know is go into the LabVIEW help, search for Call Library Function Node, read it, look for an example, send you the example and the helps content. Then I would go to ni.com, or forums.ni.com, click into the search field and type USB Raw Communication LabVIEW, then I would get lots of links and post them here for you.

 

Don't you think you can do that by yourself?

0 Kudos
Message 4 of 13
(5,843 Views)

Which labview version do you have. Up to labview 7.1 it was no USB raw communication options. I have heard it did not work well in 7.1, but from 8.x most of the errors were fixed.

Here is a link it should be useful http://forums.ni.com/ni/board/message?board.id=170&message.id=340676&query.id=365864#M340676



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 5 of 13
(5,839 Views)

muzammil_IIEE wrote:

Hi all,

 

I want to make a DAQ card using pic 18 microcontroller which has a built-in usb protocol. I have the firmware of this

controller which will  make it as a usb device. How can i receive the analog voltages from this DAQ card in Labview? or i mean to say that how i can communicate labview with the Pic 18 microcontroller through usb port? I have also the

mpusbapi.dll file which is for Visual C++. Can i make changes in this dll file to make it compatible with labview?

 


What hardware do you have?

Just a PIC 18F..... controller IC as such or is it mounted on a development/evaluation board?

So you have some code to implement an USB port in the PIC but you still don't have code to read some analog signals in that PIC. Such code can't be written in LabVIEW.

 

The mpusbapi.dll is a Microchip dll right?

 

So can you please be more specific regarding the hardware you have?

Thanks for that! 

Message 6 of 13
(5,835 Views)

You seem close to understand my problem. I have pic18F4550 IC and i want to make DAQ card by using this

IC. I am not using any evaluation board of microchip. I want to  make a DAQ card which consists of this IC and

it will read analog voltages and just transfer it to the PC ( on labview) . I have the firmware of usb of pic 18 series

but that firmware is for microchip's evaluation board . so I have few questions to ask

 

 

1) What changes do i have to make in that usb firmware to develop the application for non- microchip evaluation

     board?

 

2) mpusbapi.dll is a dll of microchip, but it is for visual C++. Do i need to make any changes in this dll file?

     or i can directly use "call library function " to call this dll file without making any changes to it.

 

Waiting for your useful reply

 

Thanks

0 Kudos
Message 7 of 13
(5,818 Views)

To be honest I'm not familiar with PIC's, I prefer 8051 based µC Smiley Tongue

 

Anyway it's indeed what I thought, you have only part of the code needed in the PIC, the USB part.

Now you first need to write code in the PIC to read the analog and/or digital inputs and transfer the data through the USB port.

Then you can use the dll to communicate with the PIC. You can indeed use "call library function" vi's but be sure to have the correct datatypes connected or it will go wrong Smiley Sad

 

Finally some links that can help you:

Forum with some PIC specialists to help you with the PIC code, especially Nigel Goodwin 🙂

You're not the first is this what you want to do?

 

Good luck!

 

0 Kudos
Message 8 of 13
(5,811 Views)
Have you tried to Google the phrase ->microchip usb labview. I did and I think you will find some useful links


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 9 of 13
(5,800 Views)

Thanks a lot Alain for sending me some useful links. I will definitely now get some direction now but in the upcoming

days , if you find some more solutions to my problem then please send.

0 Kudos
Message 10 of 13
(5,798 Views)