Jump to content

mattdl68

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by mattdl68

  1. Hi all...HAPPY NEW YEAR. I've been having alot of problems with calling SDK funtions. Is there any resources that clarifies the funtion parameters and how to configure them in labview. found this link These are the some of the dll's I need to call. One of the things I'm tring to do is find USB devices. The first thing I need to do; -call the SetupDiGetClassDevs which is in the setupapi,dll. see link SetupDiGetClassDevs returns a handle to a device information set that contains all installed devices that matched the supplied parameters. Depending what I set for parameters i can get imformation on all devices connected to all ports. My problem is don't know how the parameters are configured. HDEVINFO SetupDiGetClassDevs( IN LPGUID ClassGuid, OPTIONAL (how do I configure each of the parmteters in labview) IN PCTSTR Enumerator, OPTIONAL IN HWND hwndParent, OPTIONAL IN DWORD Flags ); There are more call I need to make ,but need to get this imformation first. Thanks
  2. QUOTE (jakestern @ May 30 2008, 05:01 PM) I think this is what you want
  3. Thanks RolfK. I was able to get MAXs to reconize the Visa Raw but it had an error. It reconized thre device and forund the id and serial number of the device. See attached. After fighting with the visa raw. I tried using the library function. I do have the doucumintation. It says I have to use the SetupDIGetDeviceInterfaces. This is some of what the manuals says. Use the SetupDiGetDeviceInterfaceDetail function to get the symbolic link name for the interface, which the operating system uses to encode its enumeration information describing the device. The string contains the VID and PID of the device found by the operating system. Test each string to find the one (or more if you have multiple Lab Bricks attached) that contains the VID and PID values in it. For the Microsoft Windows environment, the portion of the device strings containing the VID and PID are in the format: sDevSubstring1 = “vid_041f&pid_1201”; // VID and PID for LSG-402 sDevSubstring2 = “vid_041f&pid_1202”; // VID and PID for LSG-152 sDevSubstring3 = “vid_041f&pid_1203”; // VID and PID for LSG-251 Once you have identified a Lab Brick, open it by using the DevicePath from the Interface Device Detail Data structure, using the normal CreateFile function. Once you have opened the device1 you can read the Lab Brick’s serial number using the HidD_GetSerialNumberString function. I have the commands to communicate with the device. I'm having difficulty on configuring the dll parameters when using the call library function. I made a simple VI that just adds one to the input.I put this vi in a labview prodject and created a dll. I called the dll I made using the call library funtion and it automatically confiured the parameters.That worked great. What I tried next was to find the header file for the setupapi.dll and create a wrapper around the setupapi dll. it had errors creating the wrapper. Do you know of any documatation that has a step by step instruction of using windows dll in in labview. Thanks
  4. I trying to communicate via USB with a labbrick generator.It uses the hid.dll to communicate. I tried using the driver wizzrd in labview but the raw driver shows up in max as a unknow device and it comes up in the windows device manager with my driver name and under the usd ni visa, Windows says it works fine and max can't open a session. I try the library function and called the setupapi and selected the SetupDiGetDeviceInterfaceDetail but i'm not sure how to configure the parameters. Then I tried to import the driver but it asks me for a header file.I beleive you need to get them from Microsoft by downloading the windows development kit. When I search for the kit all i get is the one for 2008 sever, thanks
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.