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.

DLPNIRNANOEVM: DLPNIRNANOEVM

Part Number: DLPNIRNANOEVM
Other Parts Discussed in Thread: DLPC150

I am writing an application that simple needs to read the spectrum after a scan. Configuration and setup would be done using the standard GUI. 

Does the InterpretScan provide this functionality? 

It appears that based upon MainWindow::InterpretScanData, that this can be done by the following sequence of "commands" (leaving out details relate to device status, error checking... and all other required programming)


  1 .NNO_InterpretScan() which will initiate a scan

(assume don't need NNO_PerformScan() and NNO_InterpretScan()  actually enables the DLPC150 and light sources)

 2 . NNO_GetFileSizeToRead(NNO_FILE_INTERPRET_DATA)

 3. NNO_GetFile() which grabs the serialized data as an array of char  

4. which is interpreted by Spectrum::SetInterpretData () by sequentially reading   the wavelength and intensity value  from the serialized data.(double read, inc sizeof (double), int read, inc sizeof(int)

So it appears the spectrum data from a scan can be read as  "interpret data"without using dlpspec_scan_interpret() from the Spectrum Library  to deserialize  and entire  scanResults structure??

Is there a way to just grab the  spectrum ("interpreted data") for the reference as well? (for example using the NNO_FILE_REF_CAL_DATA file type)?  

Jim Stafford

Doggonics

  

  • Hello Doggonics,

    I believe what you are saying is correct. But with out using Spectrum Library you will be using simply getting a .dat binary file. This file is what Spectrum Library uses to make useful information in the form of a plot or cvs file.

    I will leave this thread open for a while to see if other members of the community have done something similar to this and want to chime in.

    Best,
    ~Danny White
  • Jim,

    Welcome to the E2E forums and thanks for your interest in our DLP products.

    I'm not sure I'm understanding the question. It sounds like you are trying to specifically read the spectrum data without interpreting it. Is this correct?

    I'll see if I can get in touch with one of our experts who is familiar with this platform to help further.

    Best Regards,
    Philippe Dollo
  • I am currently writing this is Python, and have had no trouble creating messages, and communicating with the scanner using the HIDAPI extension module.

    However, I am really trying to avoid having to wrap the required functions of  the Spectrum library and creating a extension module. (based upon compatibility issues of the *.a library and complier versions, vs 32bit library and 64bit Python interpreter.... or  whatever else would go wrong with the toolchain) 

    However,  trying to decode a entire .dat file is well beyond what I would tackle.

    I was hoping that  I could grab a binary that only had the  spectrum (wavelength and intensity)  through the interpret data file.  

    I am trying to use  NNO_GetFileSizeToRead command , with a parameter of 8 (enum NNO_FILE_INTERPRET_DATA) and the scanner hangs. 

    How does NNO_GetFile know what filetype to read? Does the NNO_GetFileSizeToRead  provide a pointer to for the NNO_GetFile cmd??. (finally a question)

    Just for those interested. NNO_InterpretScan did not initiate a scan, I used NNO_PerformScan to start a scan, and then send the NNO_InterpretScan command  which I hope is creating the interpret data file. 

    I am assuming there are different file types, is that right? or do you essentially always send a .dat file?

    Another useful note , it appears that 0x10 is added to the first byte in the response if there was something wrong with the command,  which normally just the FlagByte that was send out in the first byte of the response. 

  • Hello,

    I believe to get useful information concerning the out put of the TIVA would require spectrum library. Please see the www.ti.com/.../dlpu030g.pdf section "5.1.7 DLP Spectrum Library". It should show you why getting values such as reflectance and absorbance require Specturm library. It compares a reference scan.

    Best,
    ~Danny White
  • My assumption is that there are different serialized structures that are returned depending upon the cmd. I was looking at the Spectrum::Set InterpretData with states that it takes "scan interpreted data" as serialized blob and then creates two arrays.
    Exactly what I want :-)

    I guess it is this blob that I am interested in getting .
    It appears from the code in MainWindow::InterpretScanData that this was obtained using using GetFile on file type NNO_FILE_INTERPRET_DATA

    Unfortunately it looks like I may be missing a step here because dlpspec_types for the Spectrum Library does not have a BLOB_TYPE for interpreted data, so I am not sure where Spectrum::SetInterpretData is getting the data from to deserialize the wavelength and intensity.
  • Hello,

    Is this still an active issue for you?

    Best,
    ~Danny W
  • I have given up with this command because it does not seem to work.

    I am went to parsing the serialized scan data file to grab the adc values. 

    That is when I found the issue with the last  two bytes in the 512 packets were missing, which is in a different post. 

    I looked through the mainwindow.ui to so see where the Interpret scan is used, and did not find a method referencing this command.?

    However, it would really be nice to know whether this command actually is currently functional