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.

DLPNIRSCANEVM: Creating Custom Software to control NIRScan

Part Number: DLPNIRSCANEVM
Other Parts Discussed in Thread: DLPC350

Hello, 

This seems to be a somewhat common question on these forums, however I have not seen a concrete answer yet to suit my needs. I am attempting to create custom software to control the NIRScan module connected to my Linux computer via USB. As of now, I have downloaded the source code for the LightCrafter4500 software as a reference/foundation and have also successfully recognized the NIRScan module over the HIDAPI interface used by LightCrafter. 

I have looked through the API.h file for the LightCrafter software and read through all the functions listed there, but now I cannot seem to understand how to actually initiate a scan and read the results. So my question is, how do use actually perform a scan on the NIRScan system at a hardware programming level?

Any input would help, thanks!

  • I have thought about this a little more and also looked into the NIRScan Nano GUI, and I now think a much better way to create custom software for the NIRScan is to base it heavily off the API for the Nano GUI. Therefore, I have a quick follow up question:

    Are the read/write commands the exact same for the NIRScan and the NIRScan Nano? In other words, can I directly use the functions listed in the API.h file from the Nano GUI source code to control the NIRScan system?
  • Hi Justin,

    The DLPNIRSCANEVM uses a Sitara processor running Linux to actually perform the scans and host the web interface to the device. You're able to use the Lightcrafter 4500 GUI to see NIRscan module because the Lightcrafter 4500 and NIRscan share the same controller. Note however that the Lightcrafter 4500 source code will not be useful to you as far as controlling the NIRscan.

    As far as the Nano, due to the fundamental differences in hardware you won't be able to use the API for the Nano GUI/SW to accomplish what you are looking for. The source code you are really looking for is the software bundle for Linux and the ARM SDK which are found on the product page for the DLPNIRSCANEVM. You can also find the design files for this device here: www.ti.com/.../tida-00155

    Generally, this module is intended for evaluating the performance of DLP in spectroscopy so there isn't much support available for custom software at this point.

    -Paul

  • Hi Paul, 

    Thanks for your reply, this is a much better starting point for my purposes. I have downloaded the software bundle for Linux and found the Sitara SDK within. Also provided are a few example applications for the dlp-nirscan. If I wish to compile and run say the dlp_nirscan.c file to perform scans, I should be connected to the DLPNIRSCANEVM through the mini-USB interface to the DLPC350, even though I am using the SDK for the main Sitara processor, correct?

    Justin

  • Hi Justin,

    If you have running software on the NIRnano EVM, you shouldn't need to compile anything. Take a look at this app note, section 1.3.1 for basic information on how to access the right directory and run some scans. Unfortunately we don't have any further public documentation at this point in time for the command line, but this should get you started. www.ti.com/.../dlpa066.pdf

    You should be able to take the source code provided in the bundle and follow the GUI code to see how things are being called and what's being used.

    My apologies for there not being more detail at this stage, we are looking at how to provide more information for this platform for folks who are trying to automate scanning.

    Thanks,
    Paul
  • Hi Paul,

    I tried to develop a new function to control the DMD and tried to compile with Qt but I received this error I'm unsure why: http://i.imgur.com/13c4CfZ.png

    I have new_config and patDefG declared in scope, and the .h file for patDefG is included at the top. I'm unsure about the value of m_calibCoeffs. I know it is declared in scanconfigdialog.h but the value that appears when I hover my cursor over it in Qt is "Anonymous:79". We tried both the latest version of Qt Creator (v4.3.0) and version 3.4.1 and had the same issue.

    Any help would be appreciated.
  • Hi Ben,

    I'm a little confused - I don't see dlpspec_scan_grid_genPatDef() anywhere in my code. How much modification have you have done to the code? Have you tried compiling without any modification to make sure the GUI builds/runs?

    -Paul
  • Hi Paul,

    I have attempted to add a new scan type, so I've been editing the spectrum library and the GUI files. I compiled without any modification and the GUI builds/runs, but after adding the changes to the code, I am still receiving the error mentioned in my previous comment. None of my modifications have added new files, only either added functions to existing files or modified the functions within those files. 

    patDefGrid is located in the same file (dlpspec_scan.h) as patDefCol. The definition is: http://imgur.com/VYsdteL

    I can provide any other details if needed.

    -Ben

  • Hi Ben,

    Sorry for my blindness the first time - my searchfu failed me when I was looking for dlpspec_scan_grid_genPatDef(). I'm glad you can compile with no issues before any modification.

    Looking at your code more carefully a second time, I don't see anything glaringly wrong. It looks to me like you must have forgotten to include dlpspec_scan_grid.h at the top of scanconfigdialog.cpp. Did you create a new header file for your new scan type?

    -Paul
  • Hi Paul,

    I included dlpspec_scan_grid_genPatDef() inside of dlpspec_scan_col.c so I do not have a new header file for the new scan type, and it is already being included. I did not create a new header file because I was worried I would forget to include it in certain files, but I'm not sure if this in itself would cause errors.

    -Ben

  • I don't know either. All I can say at this point is to just make sure that all your structures are defined properly and that all the includes are correct. You know the code compiles correctly prior to changes, so one of your edits must have created the error.

    -Paul