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.

Failed to call the API of the DLP Light Commander

Hello,

I'm trying to write a program to control the DLP Light Commander with the API provided. However, I have met some problems while debugging the sample projects provided in the TI website: some of the API functions cannot work well as expected.

For example, when we are debugging the project "StatusDriverC", which is used to check the Status of the Light Commander. And we found out that only few functions can return a "STAT_OK" to demonstrate that they are working properly. These functions are :

"InitPortabilityLayer(loglvl+1, loglvl, Logit)", "DLP_Status_CommunicationStatus();" and "DLP_Misc_GetVersionString(buf, sizeof(buf));".

All the other functions return "STAT_ERROR", which means they are not working as expected.

Do you have any idea about this problem?

Waiting for your response.

Best Wishes,

Xinyu

  • Hi Xinnyu,

    Welcome to DLP&MEMS forum.

    The sample projects put on the web are tested on WindowsXP 32 bit OS before posting. I think there is problem on your pc environment which is preventing it from communicating with hardware. Ensure you are compiling and running the application as 32bit mode.

    I suggest you to try the following -

    1. Run LIghtCommander GUI on the PC. Verify you are able to talk to hardware like try reading the version info or DMD park/unpark

    2. Close the LC GUI App

    3. Compile and run the application. You should be able to talk to it.

    Regards,

    Sanjeev

  • Hello Sanjeev,

    Thank you for your response on my problem.

    Actually, I have already run the Light Commander GUI on my PC (WindowsXP 32 bit OS).  And the GUI works perfect: all the status is OK and we can use the GUI to control the Light Commander. 

    However, when we compile and run the sample application, we failed to have a correct return value of the API functions. 

    I was wondering if there was any problem with the configuration of my project. But I have already followed the steps provided in the project.

    Is there any other reasons for the problem?

    Waiting for your response. Thank you.

    Best Wishes,

    Xinyu

  • Hello Xinyu,

    Are you able to build your application completely? For example - On building StatusDriverC project is it creating the StatusDriverC.exe? It will created under Release or Debug directory based on build configuration you have selected for building.

    I also found that  there is post build step in each project which basically copies the .dlls  xcopy ..\lib\*.dll  $(OutDir) this step is failing and the copy will not happen.

    In that case you have to manually copy both PortabilityLayer.dll and USBlib.dll from the "lib" directory to the directory where your .exe is built. Then run the .exe from command line.

    Attaching the .exe I have built from the same project to  try this on you system.

    2148.StatusDriverC.zip

    Regards,
    Sanjeev

     

     

     

  • Dear Sanjeev,

    Thank you so much for your kind help. 

    Actually, we have also met the problem you talked and solved the problem by copy the dll files manually to the correct directory. After that, we can build the project successfully. 

    But when we run the project, we cannot get the right return value, see the following picture:


    You can find that almost all the return code is 1, which means the function has not work properly.


    We don't know what is the problem. Do you have any idea?


    Thank you so much for your response and kind help.


    Best Wishes,

    Xinyu

  • Hi Xinyu,

    Did you try the StatusDriverC.zip file i attached in my previous reply? 

    Regards,

    Sanjeev

  • Hello Sanjeev,

    I have tried the exe file you attached. And the result is almost the same with mine.

    See the picture:

    Waiting for your response.

    Yours,

    Xinyu

  • Hi Xinyu,

    Ok. Then it is likely the problem with PC side USB driver or PC configuration itself. Can you try installing LC GUI software on another machine and run this application?

    You mentioned that the LC GUI works fine so it confirms there is no issue with LC hardware. Can you send the version information from the LC GUI? In the LC GUI main window goto Help->About LightCommander Control take the snapshot and send it to us.

    Also let us know the PC configuration details. Is LC device is detecting properly in DeviceManager? Send the us Device Manager / Universal Serial Bus controllers details/snapshot.

    Regards,

    Sanjeev

     

  • Hello Sanjeev,

    Thank you for your suggestion. We are going to find another machine to see what will happen.

    Here is the snapshot of the LC GUI version information:

    And the following picture is the snapshot of the Universal Serial Bus Controller:

    I hope these information could help to figure out what the problem is.

    Thanks again for your kind help.

    Best Regards,

    Xinyu

  • Hi Xinyu,

    Now I understand the problem you are facing. The snapshot of LC GUI version is very useful in debugging the issue. Therefore we recommend everybody to put the system version information while reporting the issue.

    The _SampleApps not working because of the MCU Version mismatch. Just upgrade to latest firmware revision, your application works fine. The details provided below.

    Upgrade the LightCommander(TM) firmware from the web. Goto http://www.ti.com/tool/dlpr200 Download DLR200F firmware.

    The LOGIC GUI software is also of older version; you can visit LOGIC website to download GUI software.

    The latest LC GUI and MCU version as follows -

    1) MCU Version 2.1.5

    2) LC GUI 1.0.92.495

    Note - Always ensure you are upgrading DLPCR200F first before upgrading LC GUI.

    This should solve your problem. Let me know if NOT.

    Regards,

    Sanjeev

  • Dear Sanjeev,

    Thank you for the suggestion. I hope it could solve my problem.

    Now, the problem is that I cannot find the serial number of the Light Commander, without which I cannot download the latest GUI from the Logic PD website. Is there any other method that I can download the GUI? Or, could you send me a copy of the GUI software? My e-mail address is: xinyu1991@gmail.com . 

    Thank you so much for your long-term help.

    Best Wishes,

    Xinyu

  • Hi Xinyu,

    So I presume you were able to upgrade the firmware to 2.1.5 and the issue with _SampleApps not working is resolved. Please confirm.

    With respect to GUI unfortunately I cannot share the installer. I suggest you to get in touch with LOGIC support. They will be able to assist you with identifying the Serial Number of the hardware and then you will be able to updgrade the GUI version.

    Regards,

    Sanjeev

     

  • Dear Sanjeev,

    Sorry for the late reply. We are on vocation these days so I have not response you for several days. 

    I have tried to upgrade the GUI software and the firmware. Now, we can use the API to finish our work.

    Thank you so much for you help.

    Yours,

    Xinyu

  • Hi Xinyu,

    Sure. Good luck with your work.

    Regards,

    Sanjeev