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.

DLPLCRC410EVM: ActiveX programming needs Discovery 4100 Explorer

Part Number: DLPLCRC410EVM

Hi, 

I have programmed D4100 using Active X in C/C++. It works fine however for it to work, there is a wierd necessity of opening Discovery 4100 Explorer. We need to open that GUI first and only then the code works and we can see the patterns on DMD. It was the same scenario even with LabVIEW code before. We cannot have this as a user experience. I suspect there is some initialization happening with GUI that is not happening with Active X code. Appreciate if you could suggest what we are missing to avoid openign the Discovery 4100 Explorer GUI for the code to work.

Here is the sample code for initialization

devNum_DMD = axDDC41001->GetNumDevices(); //Gives 1.
dllRev_DMD = axDDC41001->GetDLLRev();
connectDevReturn_DMD = axDDC41001->ConnectDevice(devNum_DMD, fpgafile_DMD); //fpgafile_DMD is "C:\Program Files (x86)\D4100Explorer\D4100_GUI_FPGA.bin"
isDMDAttached = axDDC41001->IsDeviceAttached(); //Gives true
nDMDType = axDDC41001->GetDMDTYPE(); //Gives '7'
clearReturn_DMD = axDDC41001->Clear(18, 1); //Performing a global reset.

The code for running the pattern is the following in a loop

axDDC41001->FileToFrameBuffer(imgfile_DMD, 0); //imgfile_DMD is path to a binary file created for a pattern.

axDDC41001->LoadToDMD(18, 1, 0);

It works fine but only when the GUI is open on the side. Why is that the case? Is there some intializaiton that is missing.

I tried programing with the API code as an alternative but failed to understand errors e.g. after getting

deviceNum = GetNumDev() correct 

I read the bin file data into the writebuffer and use the following

I get a '-1' from the funciton "program_FPGA(writeBuffer, writeSize, deviceNum);" which I can't understand and nothing works after that. Unless there is a specific example code and good documentiaon on troubleshooting error codes which is not available, it is not easy to program with API code. 

For the time being, if you could suggest how we can circumvent the need to open GUI, with ActiveX programming, that would be great.

Thank you

GM