This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DLPD4X00KIT: Problem using D4100_usb.dll

Part Number: DLPD4X00KIT

I am trying to control the Discovery 4100 from LabView via the D4100_usb.dll.   I have a similar problem to one mentioned before.

If I simply use my LabView VIs then I get no control and strange results (e.g. if I write a number to SetPatternSelect I don't read back the same number with GetPatternSelect).  However, if I first run the Discovery 4100 Explorer and then my LabView, it works fine.  

According to the Explorer, I have the following versions:

Software Version: 2.0

OCX Version 1.2

DLL Version 2.1

USB Driver Version 1.3.3.231

USB Firmware Version 2.0

APPSFPGA Code Version: 13.3.2

Any advice would be greatly appreciated.

-Albrecht

  • Hello Albrecht,

    Welcome to the DLP section of the TI-E2E forums.

    I suspect that running the Explorer creates the handle to the board or that the GUI puts it into the mode that the Patterns can be controlled from the GUI.  I believe by default that the system comes up automatically running the patterns.

    Are you able to talk via Labview to the EVM at all or is it just the patterns that are behaving strangely?

    Fizix

  • Dear Fizix,

       Thank you for the quick response.   I have not yet tried to upload an image to the FPGA, just trying the basic Set and Get functions.

    I found that if I don't use the Explorer, the Get functions return garbage.  (I have no way of knowing if the Set functions are working).

    GetNumDev works properly. I get 0 if D4100 is unplugged and 1 if it is plugged in.

    GetFirmwareRev always returns 512.

    If I don't start Explorer, then calls, such as GetDMDType or GetPatternSelect return a different  seemingly random number each time I call. 

    If I start the Explorer, then the functions return reasonable (and consistent) values.  Also, then I can set values and read the correct setting back.

    Is there some function call I need to make to initialize the system?

  • One other oddity.

    When I do GetDMDTYPE after running the Explorer, it returns a 3.   According to the documentation, the allowed values are 0,1,or 7.

    The Explorer also shows the DMD Type as 0.55 XGA [X].

  • Hello Albrecht,

    This was an older DMD type that was supported, but is no longer made or documented.  What DMD do you actually have attached?

    Fizix

  • Hello again Albrecht,

    I just realized that I assumed you are using the DLPR410A (i.e. the latest version of the PROM) and the matching kit since the reported software version you listed is 2.0 and the APPSFPGA Code version is 13.3.2.

    Is this correct?  I am trying to determine what the GUI is doing that the Labview code is not.  

    Is it just a matter of opening the GUI and then closing it, or does it have to be running in the background?

    Also, I looked back over some very old LabView code I had for the earlier version (DLPR410) and noticed that for the function, the DevNum_in is "0" and works without calling the GUI or having opened it at any point first.  Now it does require that the D4100_usb.dll file be in the same directory as the Labview vi (or executable).

    Fizix

  • Fizix,

       To be honest, I don't know exactly what I have.  I inherited the system from a colleague who has retired.

    The markings on the DLP are:

    4559641

    1076-6318W

    95A6HDD 180207E

    180207

    The driver board is marked:

    DLP Discovery 4100   with a sticker:  T41-2610-0161

    Here is some things I tried:

    DLP4100 not connected to system.

    GetNumDev in LabView returns 0   [good]

    Connect DLP4100 and turn on.

    GetNumDev in LabView returns 1  [good]

    GetFPGARev(0) in LabView returns garbage [bad]

    GetPatternSelect(0) in LabView returns garbage [bad]

    SetPatternSelect(0,2) returns 1 [good]

    then GetPatternSelect(0) returns garbage [bad]

    Start "DLP Discovery 4100 Explorer" program, exit immediately without doing anything.

    SetPatternSelect(0,2) returns 1 [good]

    then GetPatternSelect(0) returns 2 [good]

    All other functions seem to work as expected.

    Turn DLP 4100 board off and back on.

    SetPatternSelect(0,2) returns 1 [good]

    then GetPatternSelect(0) returns garbage [bad]

    So, it seems like just starting up the Discovery program initializes something on the DLP4100 board.

    If I unplug the DLP4100 board from the USB and reconnect (without shutting off power to the board) it still works.

    I hope that sheds some light.

    Thank you,

    Albrecht

  • Hello Albrecht. 

    I believe you are using the older board, which explains the behavior.  The older board had to have a different bit file loaded into the APPS_FPGA before it will talk to the GUI (or API) over USB properly.

    This is easy enough to test in the following way:

    1. Turn on Power.  The LED's near the FPGA's should go through a sequence of Red/Green cycle(s) and end up green after a couple of seconds.
    2. Next Plug in the USB cable.
    3. Start the GUI and watch the LED associated with the APPS_FPGA (LX50) - it should go red for a second and then go green. 
      1. If it does not, then it is likely that the board is the latest DLPR410A revision of the DLPC410 PROM.
      2. If it does, then it is almost certainly the DLPR410 version of the DLPC410 PROM.

    Once the FPGA has been programmed it should communicate with the GUI (or API) until it is reprogrammed.  This loaded version of the USB aware FPGA code does not have built in patterns.  Even if you load the newer APPS_FPGA code, it expects the DLPR410A code to be present in the DLPC410.

    This should answer your issue. 

    Please do one more favor and look at the board and see if there are any labels/paint dot markings on the DLPR410 (see the magenta rectangle in this illustration):

    Thank you,

    Fizix

  • Fizix,

       Thank you very much.  This solves my problem.

    Just to summarize for the benefit of others:

    PROBLEM: FPGA code stored in PROM on older version of Discovery 4100 board is incompatible with D4100_usb.dll library. 

    SOLUTION: Use program_FPGA function of the dll to load D4100_GUI_FPGA.bin (found in install dirctory of Discovery Explorere GUI program) in to the FPGA. All dll library calls now appear to function normally.