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.

MATLAB code to control LightCrafter(TM)

Other Parts Discussed in Thread: DLP4500, DLPC300

Hi everybody,

for those who want to control the LightCrafter(TM) via MATLAB:

I've prepared a framework in order to send BMP images (more to come) to the LightCrafter(TM). You can download (or have a look at it) on https://github.com/fglichttechnik/TI-DLP-LightCrafter

Best regards

Jan

  • Jan,

    Thanks, I'll see if we can adapt this for our X3 system. It uses USB, but it should be fairly straightforward to adapt.

    - Adam

  • Hello Jan,

        I am very glad that you posted a great example on how to control LC through MATLAB. Thank you. I was wondering, if I can start and stop pattern sequence loaded internally in LC through MATLAB as well? This I need because, I am triggering LC by a Point Gray USB camera to project series of patterns for 3D scanning and am afraid that  if this external triggering misses the order of patterns, the scan will not work. I am experiencing false triggers once a while. Therefore, if I stop and start loaded patterns before every scan I can start with the same sequence each time. Thank you for your help.

    Sincerely,

  • Hi Cem,

    have a look into a file titled: "DLP® LightCrafterTM DM365 Command Interface Guide ".

    All commandeds are described there, I'm currently not aware of all commands. With the provided Code on gitHub it should be very easy to add new commands.

    Best regards

    Jan

  • Hello Jan,

        Based on your code , I added more control functions to your LightCrafter m.file (see attached zip file for LightCrafter.m, and LightCrafterTest.m) . Since I am not as good programmer as you, the first function I wanted to test did not work. It i sintended to get the version information of various LC parts. I am sending '00' as in input argument to this getVersion function, but it does not return any value back. According to the the programming manual, there supposed to be 32 bit information for the various version information. could you please let me know what I am doing wrong? If you check my other functions in the m-file, maybe we can publish this to the DLP LC community. This is really good way of controlling LC. Thank you for your help and  nice insight.

        Sincerely,

    Cem

    7271.MATLAB Code.zip

  • Hi Cem,

    thanks for adding those new methods. I currently don't see what's wrong. I have no access to my LCr till next week, so you might want to recheck the manual if everything is as it should be (also compare my functions). Maybe one of your other function works? Are my functions working in your current set up?

    Please make method names start with lower case letters an between all ( ) a space, e.g. aMethod( arg1, arg2 )

    (I know I didn't do it everywhere, but it makes the code better to read ).

    Best regards

  • Hello Jan,

            The Matlab returns the following output if the input argument to getVersion is '00'. See if you can make sense of it. I expected, for example, for DM65 an output like  3.31 as LC GUI report when it is connected. For the input argument '10' which is for FPGA we should get 2.4.39 etc. The reason I wanted to use this LC function becasue it does not write or change anything on LC, it should just return some info showing we have communication. On te hother hand your code does something to LC. But when I tried your code to change the color of the projected background, I got the following output and the background color did not change.

              My understanding with the structure of your code is that  a call like L.getVersion( '00', tcpObject) should return something or we should do something like this:

              Output = L.getVersion( '00', tcpObject);

              In which case, the "Output" variable should store what is returned from LC. But even this did not work.It gives "Too many output  arguments" error.

             I will correct any programming error/formatting per your recommendation.  As you can see. I am not a programmer.

    The L.gettVersion code:


            function getVersion( obj,Version, connection )

                if (~ischar(Version) && (length(Version)~=2))
                    disp('Version must be a 2 digit hex string 00, 10, or 20')
                    return;
                end

                header = obj.createHeader();
                header( 1 ) = uint8( hex2dec( '02' ) );    %packet type
                header( 2 ) = uint8( hex2dec( '01' ) ); %CMD1
                header( 3 ) = uint8( hex2dec( '00' ) ); %CMD2
                header( 4 ) = uint8( hex2dec( '00' ) ); %flags
                header( 5 ) = uint8( hex2dec( '01' ) ); %payloadLength LSB
                header( 6 ) = uint8( hex2dec( '00' ) ); %payloadLength MSB
                payload = uint8( hex2dec( Version ) ); %payload
                packet = obj.appendChecksum( [ header; payload ] );
                %packet
                obj.sendData( packet, connection );
            end

    Program running L.getVersion ('00', tcpObject) returns in Matlab:

    >> LightCrafterTest

    L =

      LightCrafter handle

      Properties:
        tcpConnection: []

      Methods, Events, Superclasses


       TCPIP Object : TCPIP-192.168.1.100

       Communication Settings
          RemotePort:         21845
          RemoteHost:         192.168.1.100
          Terminator:         'LF'
          NetworkRole:        client

       Communication State
          Status:             closed
          RecordStatus:       off

       Read/Write State  
          TransferStatus:     idle
          BytesAvailable:     0
          ValuesReceived:     0
          ValuesSent:         0
     

       TCPIP Object : TCPIP-192.168.1.100

       Communication Settings
          RemotePort:         21845
          RemoteHost:         192.168.1.100
          Terminator:         'LF'
          NetworkRole:        client

       Communication State
          Status:             closed
          RecordStatus:       off

       Read/Write State  
          TransferStatus:     idle
          BytesAvailable:     0
          ValuesReceived:     0
          ValuesSent:         0
     

    checksum =

         4

    wrote some data
    BytesAvailable event occurred at 10:27:59 for the object: TCPIP-192.168.1.100.

    -------------------------

    Program runningL.setStaticColor( 'FF', 'FF', 'FF', tcpObject) retturns in Matlab and nothing happens on LC.

    >> LightCrafterTest

    L =

      LightCrafter handle

      Properties:
        tcpConnection: []

      Methods, Events, Superclasses


       TCPIP Object : TCPIP-192.168.1.100

       Communication Settings
          RemotePort:         21845
          RemoteHost:         192.168.1.100
          Terminator:         'LF'
          NetworkRole:        client

       Communication State
          Status:             closed
          RecordStatus:       off

       Read/Write State  
          TransferStatus:     idle
          BytesAvailable:     0
          ValuesReceived:     0
          ValuesSent:         0
     

       TCPIP Object : TCPIP-192.168.1.100

       Communication Settings
          RemotePort:         21845
          RemoteHost:         192.168.1.100
          Terminator:         'LF'
          NetworkRole:        client

       Communication State
          Status:             closed
          RecordStatus:       off

       Read/Write State  
          TransferStatus:     idle
          BytesAvailable:     0
          ValuesReceived:     0
          ValuesSent:         0
     

    checksum =

         5

    wrote some data

    checksum =

        10

    wrote some data

  • Hi Cem,

    this is the problem:

      TCPIP Object : TCPIP-192.168.1.100

    ...

         Status:             closed


    the LightCrafterTest.m is outdated.


    Try this:

    L = LightCrafter();

    L.connect();


    -> now the status should be "open"

    If not you're having a communications problem with your lightcrafter, maybe due to the driver it needs or maybe because it has another standard internal IP.

    Unless the status is open no other command will work.

    Try until you get it open, then test one of my commands,

    then yours. They seem as they should work.

    Maybe reading commands are not supported, yet, but I'm not sure, I never listened to any of the answers he sent.


    Best regards

    J.


  • Hello Jan,

          I guess we are getting there. The code of line L.connect was commented out by mistake. But even after, it was un-commented, the status of communication is "Closed". But strange enough if I change input argument from '00' to say '10', the checksum changes fro 4 to 10.The IP address info is as reported by ipconfig. I do not know how to find out tcpip port number. It could be different than 21845 for my machine? So what is wrong?

    Ethernet adapter Local Area Connection 4:

       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : USB Ethernet/RNDIS Gadget #3
       Physical Address. . . . . . . . . : FA-AF-11-A3-84-67
       DHCP Enabled. . . . . . . . . . . : Yes
       Autoconfiguration Enabled . . . . : Yes
       Link-local IPv6 Address . . . . . : fe80::64e6:bc2c:2a81:8702%23(Preferred)
       IPv4 Address. . . . . . . . . . . : 192.168.1.99(Preferred)
       Subnet Mask . . . . . . . . . . . : 255.255.255.0
       Lease Obtained. . . . . . . . . . : Thursday, October 25, 2012 8:40:14 AM
       Lease Expires . . . . . . . . . . : Monday, November 05, 2012 10:26:53 PM
       Default Gateway . . . . . . . . . :
       DHCP Server . . . . . . . . . . . : 192.168.1.100
       DHCPv6 IAID . . . . . . . . . . . : 439549842
       DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-17-BF-30-4D-3C-97-0E-1A-20-16

       DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                           fec0:0:0:ffff::2%1
                                           fec0:0:0:ffff::3%1
       NetBIOS over Tcpip. . . . . . . . : Enabled

    >> LightCrafterTest

    L =

      LightCrafter handle

      Properties:
        tcpConnection: []

      Methods, Events, Superclasses


    obj =

      LightCrafter handle

      Properties:
        tcpConnection: [1x1 tcpip]

      Methods, Events, Superclasses


       TCPIP Object : TCPIP-192.168.1.100

       Communication Settings
          RemotePort:         21845
          RemoteHost:         192.168.1.100
          Terminator:         'LF'
          NetworkRole:        client

       Communication State
          Status:             closed
          RecordStatus:       off

       Read/Write State  
          TransferStatus:     idle
          BytesAvailable:     0
          ValuesReceived:     0
          ValuesSent:         0
     

       TCPIP Object : TCPIP-192.168.1.100

       Communication Settings
          RemotePort:         21845
          RemoteHost:         192.168.1.100
          Terminator:         'LF'
          NetworkRole:        client

       Communication State
          Status:             closed
          RecordStatus:       off

       Read/Write State  
          TransferStatus:     idle
          BytesAvailable:     0
          ValuesReceived:     0
          ValuesSent:         0
     

    checksum =

         4

    wrote some data
    >>

  • Hi Cem,

    did you manually try to fopen the tcpConnection object?

    The IP and port are standard by default, at least for the LCr I bought. I think you can use the TI LCr tool to set up that information or ask in other threads for help how to connect to the LCr.

    Best regards

    J.

  • Jan, this code is excellent.  Thank you.

    One thing I notice is the setStaticColor function payload works correctly when reversed:

    payload = uint8( [ hex2dec( B );  hex2dec( G ); hex2dec( R ); hex2dec( '00' ); ] );

    Maybe you can try this and see if it is my error or an error in the command specs.

    Jeremy

  • HI Jeremy,

    thanks. Never really used sending colors. Don't have access to my LCr either at the moment. Will have a look on that and fix it once I've got access to it again.

    Best regards

    J.

  • Jan,

    I was wondering if you have had any problems connecting. When I call 

    tcpObject = tcpip('192.168.1.100',21845)

    fopen(tcpObject) 

    to connect to the device, I get 

    Communication State
    Status: closed
    RecordStatus: off

    and am unable to send packets to the LCr. I understand this is probably an issue unrelated to the code, but any advice would be much appreciated. 

  • Hi Scott,

    which OS are you using? This worked on Win XP and OS X for me. Did you connect the device as described in the TI manual? Does it work with the TI Software? Can you ping the device?

    If not have a look into the documentation and then once you've got it working it should work from MATLAB as well.

    Best regards

    J.

  • Jan,

    Did you ever try to set a pattern sequence?  I've tried this code:

                header( 1 ) = uint8( hex2dec( '02' ) ); %packet type
                header( 2 ) = uint8( hex2dec( '04' ) ); %CMD1
                header( 3 ) = uint8( hex2dec( '80' ) ); %CMD2
                header( 4 ) = uint8( hex2dec( '00' ) ); %flags
                header( 5 ) = uint8( hex2dec( '13' ) ); %payload length LSB
                header( 6 ) = uint8( hex2dec( '00' ) ); %payload length MSB
                
                payload = uint8( [ hex2dec( '01' ); hex2dec( '01' ); hex2dec( '00' ); hex2dec( '00' ); hex2dec( '01' );... % Byte(0-4)
                                   hex2dec( '00' ); hex2dec( '00' ); hex2dec( '00' ); hex2dec( '00' );... % Byte(5-8) trigger delay
                                   hex2dec( '00' ); hex2dec( '00' ); hex2dec( '00' ); hex2dec( '00' );... % Byte(9-12) trigger period
                                   hex2dec( '00' ); hex2dec( '00' ); hex2dec( '00' ); hex2dec( '00' );... % Byte(13-16) exposure time
                                   hex2dec( '00' ); hex2dec( '00' );]);                                                         % Byte(17-18)

    But this packet causes the Lcr to respond with an error of unknown type '0x01'.  Any ideas?

    Thank you,

    Jeremy

  • Hello Jan,

    It has been a long while working on LCr with Matlab. I am not sure whether you are still working on such things. I had to come back to controlling LCr again since our other approaches failed. I want to do the following:

    a) Stop display mode "pattern sequence"

    b) Change display mode to "static'

    c) Here later I will control a camera to take a picture

    d) Change display mode back to "pattern sequence"

    e) Start pattern sequence (to be triggered by the camera)

    I am not sure how to read existing parameters using Matlab functions before setting values to them. For example, how can I read the DisplayMode before I change the mode say from "Static" to "Pattern Sequence"? Is there a say "getDsiplayMode" similar to "setDisplayMode"?

    Another issues is the connection to LCr. If I do not use the L.connect statement, the program somehow works but  I get "Connection denied" error after the first run. If I use it, then I do not get any error message but, for example, the display mode does not change.

    I attached the code.Could you please have a look at my code? Thank you.

    2844.MATLAB_Code.zip

  • Hi Cem,

    still don't have access to my LCr at the moment, so can't test anything by myself. 

    I think it's still working with this:

    tcpObject = tcpip('192.168.1.100',21845) fopen(tcpObject)
    The connect() method should have had replaced the lines above, but I had problems with that, so I was still using the above code (without calling the connect() method).
    You would then call a set methods with the above created object:
    L.setBMPImage( imData1, tcpObject )
    Till now I have only implemented methods I needed, which doesn't mean that there are more functions available. Am pretty sure, that it's also possible to read the settings, have a look into the programmers manual of the LCr.
    
    
    Best regards
    J.
  • Hi Cem,

    Not sure if you are still looking for an answer, but you can read the LCr current parameters using MATLAB. You use the same command structure, except that the packet type (Byte 0) should set to 'Host Read' (0x04) and set the payload to zero.

    For example, to read the current DMD input mode, you can try:

    header = uint8(zeros(6,1));
    header(1) = hex2dec('04'); %PCKT type - 0x04 means 'host read' i.e. query device
    header(2) = hex2dec('01'); %CMD1
    header(3) = hex2dec('01'); %CMD2
    header(4) = hex2dec('00'); %flags
    header(5) = hex2dec('01'); %payload len LSB
    header(6) = hex2dec('00'); %payload len MSB
    
    payload = uint8(hex2dec('00')); %Payload 
    
    chksum = uint8(mod(sum([header;payload]), 256)); 
    
    packet = [header; payload; chksum];
    
    dmd = tcpip('192.168.1.100',21845); 
    dmd.BytesAvailableFcn = @instrcallback; %This prints out when bytes are available 
    dmd.BytesAvailableFcnCount = 7; 
    dmd.BytesAvailableFcnMode = 'byte'; 
    
    fopen(dmd); 
    
    fwrite(dmd,packet); pause(1); %Pause to give the DMD module enough time to respond 
    out = fread(dmd,dmd.BytesAvailable);
    fclose(dmd);

    Check the content of the variable 'out' against the DM365 command guide to understand what it means. Hope this helps!

    p/s: the tcpip object works for me too.

  • Hello all,
    I am new in this field and I need some suggestions and supports, thanks to everybody for your help.

    I tried to use the Jan's code but I got some problems. What at first I would like to do is just send a simple static image trough Matlab and later on I would like to edit the code in order to load a pattern of images. 
    What I obtain from the following code is the following.

    Code used: 
    %create / load simple image
    im1 = zeros( 684, 608, 3 );
    im1 (300:380, 300:380, :) = 255;
    imwrite( im1, 'im1.bmp' );
    imFile1 = fopen( 'im1.bmp' );
    imData1 = fread( imFile1, inf, 'uchar' );
    fclose( imFile1 );
    %connect to the device
    tcpObject = tcpip('192.168.1.100',21845)
    fopen(tcpObject)
    %talk to the device
    L=LightCrafter()
    %various implemented commands
    L.setBMPImage( imData1, tcpObject )
    L.setStaticColor( 'FF', 'FF', 'FF', tcpObject )
    L.setPattern('0A', tcpObject)

    result obtained:

    TCPIP Object : TCPIP-192.168.1.100

    Communication Settings
    RemotePort: 21845
    RemoteHost: 192.168.1.100
    Terminator: 'LF'

    Communication State
    Status: closed
    RecordStatus: off

    Read/Write State
    TransferStatus: idle
    BytesAvailable: 0
    ValuesReceived: 0
    ValuesSent: 0

    L =

    LightCrafter handle

    Properties:
    tcpConnection: []

    Methods, Events, Superclasses


    checksum =

    5

    wrote some data

    payloadLengthMSB =

    255


    payloadLengthLSB =

    255


    modifiedHeader =

    2
    1
    5
    0
    255
    255

    FIRST CHUNK

    checksum =

    139

    wrote some data
     .
     .
    wrote some data

    and more other lines of "wrote some data"

    After launching the code Matlab status remain "busy" and I have the restart the overall program.

    My understanding from the previous posts was regarding the status which should be open and not close like in my case.  I can correctly make a ping to 192.168.1.100. 

    If everything works well what I should obtain is a projection onto DMD of the image im1.bmp I am right?

    Thanks for any suggestion.

    Pablo. 

  • first check the lcr booted to test pattern.  you may need to update firmware.  a good way to test the connection is to use the GUI provided by TI, it very simply communicates with lcr and is worth testing.

    also check your network connection on your computer, when you power on the lcr or connect the cable you should have a new 'unknown or unrecognized network'.   this takes awhile (a min or two for me) so don't execute code until this configures. 

    if the above steps work, then matlab should be able to detect the port and connect using your code.  as you probably know if tcpobject doesn't read 'open' don't bother trying to send an image you need to fix this first. 

    Jeremy

  • Hi Jeremy thanks for your quick reply,
    I was looking for what you said. I am able to communicate via GUI  with the lcr for example by sending a simple static image. 

    I check also the code understanding more. Now I correctly get the status "open" in the field  for both the tcpip objects and also matlab doesn't remain anymore in the status "busy". But still I am not able to visualize the image loaded with the instruction:

    L.setBMPImage( imData1, tcpObject )  

    this line should do that isn't it?

    The versions of what I am using are:

    DM365: 3.31
    FPGA: 2.4.39
    MSP430: 2.5 

    Thanks for your help. 

  • HI Juan,

    I had problems with grayscale images, so I'm always sending RGB bitmaps

  • what is the response packet?

    data = fread(tcpObject, tcpObject.BytesAvailable);

    will tell you if the image was successfully written to the lcr.

    if there is no error in the read data, then it may be hardware problem on the lcr.

    Also, look at image file you write from matlab imwrite, make sure this is

    the correct class/data type.  in matlab the image is uint8  with size N x N x 3.

    Jeremy

  • Jeremy, Jan, 

    sorry for this but to understand more I would like to make a step back, not loading anymore an image but first I want to try to load/change the internal pattern. Doing that what I can notice is that the red led remain constantly ON. 

    What does it mean? to use again the lcr I need to turn off and turn on the board.

    the code that I use is:

    L=LightCrafter();
    L.connect();
    
    %check the connection status,  "open"
    L.tcpConnection
    
    tcpObject = tcpip('192.168.1.100',21845);
    fopen(tcpObject);
    tcpObject
    
    L.setPattern('0D', tcpObject) % point A
    
    fclose(tcpObject);
    L.disconnect(); %point B

    What I expect is in point A, the pattern on DMD should be "0D", but this change doesn't occur immediately, in fact I need to execute also the two lines until point B. After this, the red led remain stuck in ON and on the DMD I can see the pattern '0D' correctly load. I though I can load without any problem any internal pattern by just executing the point A command.

    Thanks for your help.

    Pablo

     ps. I just use the matlab code and not anymore the GUI to interact with lcr, is correct?

  • I am not aware of any documentation for the red/green indicator lights. 

    You could at least add ' fread' at line 12 to help debug.  Also note that certain commands require the lcr to transfer a read response data payload before the next write command.

    I would still use the GUI to update firmware or help debug.

    Jeremy

  • Hi jeremy sorry for the delay,

    For the red/green light fix in a particular status  I understand that by executing the two lines 

    fclose(tcpObject);
    L.disconnect(); 
    depends on when you execute this 2 lines from Matlab you will have or green or red led (because this two leds blink on the system board consecutively, so you have 50% of probability the get one of those) anyway I still don't understand why this behavior. Unfortunately I can't post to you the the exact error message that I got when I executed the 'fread' command. I was upgrading the firmware but now the board is not working anymore. I just remember that there was an error such as: "size must be great than 0".  So probably that is the reason because the code for me is not working so well.
    Hope to come back soon with this for the moment I got a big problem with my board. 
    Thanks for your help.
  • Hi Pablo,

    I hope you fixed the issue on your board. With MSP430 v2.7, you cannot remove the light engine. The device goes into shut down mode. You have to reconnect the light engine to continually operate the board.

    Regarding the RED LED on the systems board, I suspect there might be a over voltage/ overheat condition on the board.

    I want you to check the D3 LED on the driver (bottom) board. If the MSP430 detects any failure, the D3 blinks at certain rate. Let us know the On and OFF time of the LED.

    Regards,

    Divya

  • Hi Divya,

    concerning the upgrade issue now everything work properly. The problem was the light engine as you say, we reconnect everything and now is working fine. 

    Now, Executing the matlab code seems that the system board becomes frozen. In the bottom layer, (driver board) there is just one green led (I suppose is the D3) constantly ON. No red led blinks.

    Maybe there is something wrong with my code, at least I wish so. I attached the two files that I'm using.
    Thanks.

    Hi Jeremy,
    I got this error when I execute the fread command.

    >> data = fread(tcpObject,tcpObject.BytesAvailable);
    ??? Error using ==> icinterface.fread at 163
    SIZE must be greater than 0.

    Thanks for your help.

     Pablo

     6215.PabloLCr.zip

  • I have had the 'SIZE must be greater than 0' error, this occurs sometimes.  When I restart matlab or power off/reboot the lcr then the problem is fixed.

    Jeremy

  • Hi Jeremy,

    I noticed that behavior too, but honestly I didn't expect that kind of behavior. If you tell me that this occurs also to you well, is ok. 

    I'm working now with the sample code in visual studio and the things are much more straightforward but i would like to come back with matlab soon.

    Thanks a lot for your help.

    Pablo

  • Pablo,

    If you are able to send the pattern sequence/extended pattern sequence in VS let me know.  I had trouble with this before.

    Thanks,

    Jeremy

  • Yes I do. But I think is better to open a new thread for this topic. here

    Pablo

  • Juan Pablo said:

    I got this error when I execute the fread command.

    >> data = fread(tcpObject,tcpObject.BytesAvailable);
    ??? Error using ==> icinterface.fread at 163
    SIZE must be greater than 0.

    Hi Pablo (and everyone else),

    One thing I've noticed is that you have opened two tcp/ip objects to the same address. In your code (my_lightcraftertest.m) you have

    L=LightCrafter();
    L.connect();
    
    tcpObject = tcpip('192.168.1.100',21845);
    ...
    fopen(tcpObject);

    But if you look at Jan's code, L.connect() does precisely the same thing (actually in his lightcraftertest.m, the L.connect(), L.disconnect() calls are commented out). I wonder if this is causing a conflict in MATLAB somehow.

  • Hi Pablo.

    I met the same problem like you. It seems like you finally find way to make it work.

    Can you talk me how to fix it?

    Thank you.

    Zichao Bian

  • Hi Zichao,

    If you are talking about the communication between Matlab and LCr, I am sorry but I couldn't make it. If you are interesting in the communication with Visual Studio I think I can be able to guide you, let me know what you need.

     

    Pablo

  • Pablo

    Thank you. Actually i want to communicate with Matlab, Maybe you can guide me about VS.

    Thank you.

    Zichao Bian 

  • What do you need to do? Are you able to run the sample code that TI provide?

    Pablo

  • TI provide the sample code? i didn't know about it. Can you share me the link?

    Thanks.

    Zichao

  • here  download software and bundle 3.0 version. Then you will find a folder, API-SampleCode-v2.0-Windows and what you need is there.

    Pablo.

  • Well, sorry i forgot to mention what i use is DLP LCr4500. Do you think the Matlab code posted  by Jan Winter can work for DLP4500? Maybe i should ask him directly.

    Thank you

    Zichao 

  • Sorry but I don't know if that works with 4500. You can try.

    Good luck.

    Pablo

  • Thank for you help!

    Zichao

  • Hi Jan

    I want to know whether the code you posted can work with DLP LightCrafter 4500?

    when i used this code, i got this.

    Communication State
    Status: closed
    RecordStatus: off

    Do you know how to fix it?

    Thank you

    Zichao Bian

     

  • Hello Zichao Bian,

    There is a fundamental difference b/w two platforms as far as command and data transfer. 

    The old one, LightCrafter 3000 platform uses TCP (in particular Ethernet over USB using RNDIS driver) method to send the command . The MATLABcode implementation is done with TCP interface in mind.

    The new LighCtafter 4500 platform as know USB HID interface for command & data transfer, i think we had discussed here earlier http://e2e.ti.com/support/dlp__mems_micro-electro-mechanical_systems/f/924/p/363072/1275615.aspx#1275615. So we have to implement everything from the beginning.

    Regards,
    Sanjeev

  • Jan,

    is there anyway using matlab to control the external pattern like read a file and project it?

    Thanks!

    YANG 

  • Hi Yang,

    have a look onto the example in the gitHub repository:

    https://github.com/fglichttechnik/TI-DLP-LightCrafter

    Best regards

    J.

  • Hi Jan,

    I'm his teammate.

    I notice that you are actually using Matlab to send tcp packets to DM365. DM365 can thus parse these commands and provide the FPGA with a bunch of signals to be modified or further transmitted to DLPC300, right?

    Then the problem is, what if the signals I want to modify is not in the set of commands introduced in the DM365 datesheet?

    To be specific, I want to use HDMI to send 60-Hz, 24-bit RGB to DLPC300.  The default operation to be done by DLPC300 is to decode each frame to 24 bit-planes and store them in a buffer, and then project them with different weight, i.e. 1 to 128 in a total 256 time slot, for a single color. I guess this is done by PWM when sending the information of each row to the buffer. What I want to do is forcing the weight of the 24 bit-planes to be exactly the same, i.e. 32 for each in a total 256 time slot, for a single color. I guess as long as I can modify the PWM signal, this will be done.

    So I would really appreciate it if you can help me.

    Best regards

    Freddie Huang

  • Freddie - 

    I may not fully understand your needs, but I think you can accomplish this in the V5 GUI by selecting HDMI port, check the External Streaming Pattern Sequence, and select the color you wish using 1-bit color bit depth.  This gets you 24 patterns per frame or 1440/sec using a 60 Hz HDMI input. You'll need to adjust your MATLAB script to emulate these calls.

  • Hi Adam,

    If I set 1-bit monocolor mode as you suggest, what will the 24 patterns of the frame be like? Will they just be duplicates of that frame, for I learn from another thread, the weight-decoding algo only works when the mode is 24-bit RGB.