From Friday, January 17th 11 PM CDT (January 18th 5 AM UTC) through Saturday, January 18th 11:30 AM CDT (January 18th 5:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending and receiving data from PIC18F4550

Solved!
Go to solution

ok some success, now im using void  HidD_GetHidGuid(int32_t *arg1); function in call library function node,

 

and i could get the Device Interface GUID into the numeric indicator...

 

now what about other functions... for example, HidD_GetAttributes .. in order to use it, i must supply the IN HANDLE HidDeviceObject, as stated by the MSDN help..

 

however, i cannot find any example code where it could be extracted from... i have a driver code, but there they use another functions like HidD_GetAttributes = (PHidD_GetAttributes)GetProcAddress(hHID, "HidD_GetAttributes"); 

 

so... now i really need some example or explanation from someone who used to work with HID.DLL from LabView... though i understand already the overall process.. 

 

ok i will research more for now and wait for any replies

0 Kudos
Message 11 of 25
(5,290 Views)
Solution
Accepted by cyrax

Ok, i was experimenting with all this stuff and now could make it run. So here is what i decided to use, when you install Microchip Solutions, in its install folder there is a folder USB Device - MCHPUSB - Generic Driver Demo, u should just compile it with MPLAB, and load the HEX file to the PIC18F4550. Then, im attaching my VI, u should put mpusbapi.dll in the same folder with this VI, and run it, also, dont forget to point all the Call Library Function Nodes in the VI to point to this DLL (cuz i think i had it in another folder).

 

mpusbapi.dll is a custom USB driver...it is i think even better solution than making it work with HID.DLL, also another good thing is that u can have another custom windows application work with this DLL, and the LabView VI is just talking to mpusbapi.dll

 

it is better than installing and messing with VISA... one driver - two applications (LabView, custom app).

 

the VI is working, i did not implement all the functions, but it works, it reads data from potentiometer and displays on meter.

 

p.s. there is also same example in the internet, but it was done with CIN, however, i think its easier and better to do it with Call Function Library node and DLL. I wish to find such an example before...but now i hope it would help someone.

 

thanx for replies and advices here!

0 Kudos
Message 12 of 25
(5,245 Views)

forgot to say... u should also not forget to install the driver, it is located in that same install folder of Microchip Solutions..

 

thanx

0 Kudos
Message 13 of 25
(5,242 Views)

Hello,

 

I'm trying to open your file but it was created with LV 8.6 and i didn't got this version of LV.

It's possible to convert it on the version combatible with LV 8.5?

 

Thanks for replies

0 Kudos
Message 14 of 25
(4,035 Views)

Mr. Bar,

 

There is a downconvert request thread here: 

http://forums.ni.com/t5/LabVIEW/Downconvert-VI-Requests/m-p/1067229?requireLogin=False

 

Regards,

 

Kyle Mozdzyn

Applications Engineering

National Instruments

Regards,

Kyle M.
Applications Engineering
National Instruments
0 Kudos
Message 15 of 25
(4,017 Views)

Hello

 

Thank for the replies!

0 Kudos
Message 16 of 25
(3,999 Views)