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.

Pattern Sequence RGB control via LabVIEW

Hi everybody,

I am fairly far into a project now where I've made slight modifications to some of the LCR 4500 source code to create a .dll file for use with LabVIEW. That portion seems to have been largely successful; using a tweaked version of API.cpp and the hidapi.h, I can issue commands and the LCR appears to be responsive. My question is related to the exact sequence of commands that should be issued in order to stream a series of images across the mini-HDMI in Pattern Sequence mode.

My program so far performs these steps:

1. Initialize hid

2. Open USB connection with LCR

3. Stop any currently running sequence via LCR_PatternDisplay

4. LCR_SetMode to enter pattern sequence mode, LCR_SetPatternTriggerMode to set Vsync, LCR_SetPatternDisplayMode to set video mode, LCR_SetExposure_FramePeriod for appropriate exposures (which I double-checked using the GUI). These all appear to be running successfully.

Here is where things get a little muddled for me. In the GUI I'm required to then choose a color and add a pattern to the sequence, then validate before playing it. I'm not really clear which of these are strictly associated with the UI in the GUI, and which are actually necessary to control the projector, nor what functions would correspond to doing the same without actually using the GUI.

What exactly do I need to call in addition to what I've already got? For instance, I've been trying to avoid the Validation command because LabVIEW is contrary when it comes to pointers, but fear that it may be required.

Thanks in advance,

Nick

  • Hello Nick,

    Your steps 1 - 4 looks proper.

    If you are using GUI v2.0, please keep the Internal Trigger Period (us) = Pattern Exposure (us).

    After Step - 4 you must perform two other steps, step#5, creating the pattern display LUT table and sending, step #6, issue validation command to makes sure that the configuration is proper.

    Step#5 -
    You can debug the GUI, put a break-point @ int LCR_SendPatLut(void), key is you should look at the contents of PatLut[] table entries, which you can copy and send via LabView.

    Step #6 - In GUI refer to void MainWindow::on_pushButton_Validate_clicked() function.
    You must call LCR_ValidatePatLutData(&status) - the status return value flags on BIT0 and BIT1 must be not set. Else you are need to re-look at the configuration setting.
    If Pointer is a concern, you can write another wrapper API code around it, this should just return pass or fail.

    LCR_Validate()
    {
    unsigned int status;
    LCR_ValidatePatLutData(&status);
    if((status&0x01) || (status&0x02))
    return FAIL;

    return SUCCESS;
    }

    Regards,
    Sanjeev
  • Dear Mr. Luttrell,

    I am working on a similar project, to deliver stream of 1bit patterns to LC4500 using LabView. Your approach seems to be very useful in this respect. Do you plan to share your code or .dll?

    Regards,
    Adnan