0 Replies Latest reply on Dec 14, 2012 2:01 AM by userc_39268

    Interfacing FX2LP with LabVIEW using NI-VISA drivers

      Hi all,

      I tried to use fx2lp with LabVIEW using NI-VISA drivers.
      I followed the following steps and could use the LabVIEW standard examples like USB RAW-Bulk and USB RAW-Control to communicate with the device.
      I used the example projec Bulkloop which could be found among the firmware examples for FX2LP with the DVK contents. Bulkloop is simply taking OUT data from the out endpoint and looping it back to the IN endpoint, so host receives the same data as it sends.
      I used a random PID_VID of 0555_0666 just for trying it on my PC.


      Here are the steps that I followed:
      1. Most important of all, installed the latest version of LabVIEW and NI-VISA package.
      2. Because FX2LP is a USB RAW class device, we need to configure the NI-VISA to use that driver. Basically using the NI-VISA driver wizard we can build an inf file for that PID_VID which will bind the device to the NI-VISA drivers.
      Complete Steps to follow are given at the link: http://www.ni.com/white-paper/4478/en#toc2
      3. I checked my device using the VISA Interactive Control and I could see the communication as expected.
      4. I opened the LabVIEW project USB RAW-Bulk from the examples in LabVIEW. You will get this example only after you have installed the NI-VISA drivers appropriately.
      Help->Find Examples->(Search for) USB RAW bulk and you will find this example.
      5. Attach your device, (it should be attached I suppose) check device manager if it shows the device as NI-VISA device. Run the LabVIEW project, you should see the device now in the VISA Resource Name drop down menu. Click Open Session to open communication session with the device.
      6. Type some data in the Bulk Out window, click Bulk Out. Data would be sent across (you will see no error in the error window). Now click on Bulk In (you can leave the data field size to be 512 bytes), you would see the same data being received from the device.

      I attached some snapshots for reference.

      I hope this is useful for some LabVIEW beginners like me.