Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-IMAQ Serial Read/Write

Hi cbasmadjian!

 

I also found a KnowledgeBase article you might found useful.  Check it out!

 

Kristen H.

0 Kudos
Message 11 of 13
(4,070 Views)

Hi Kristen,

 

I have done more testing and almost to the point of giving up. My first question to you is instead of reinventing the wheel could it be possible if NI could upgrade the NI Camera File Generator program to allow the (Settings -> Serial Settings -> Test Serial Settings) Test Serial Settings component to increase its incoming buffer from the camera to something very large? I don't know who I would need to talk to on that. 

 

Other than that I have tried different variations getting this app to work. In the imgSessionSerialWrite function the second parameter is the parameter to send the desired command to the camera. I am using a character buffer to send the information. This is an example of what I am doing. Maybe by looking at this you may be able to assist me in troubleshooting why I am not getting what I want.

 

int SendToCamera()

{

int rval;

char myBuffer[30];

uInt32 pBuffer;

 

myBuffer[0] = 'g';

myBuffer[1] = 'c';

myBuffer[2] = 'p';

myBuffer[3] = '\r'; //The \r is neccessary for the camera. It expects a \r after every command given.

 

 pBuffSize = sizeof(myBuffer);
 rval = imgSessionSerialWrite(m_Sid, myBuffer, &pBuffSize , m_Timeout);

return rval;

}

 

When I read back the response from the camera it tells me the command that I have sent is unrecognized. If I type in the same exact command  in the NI camera file generator it will give me a portion of the result that I want. Any suggestions?

 

Message Edited by cbasmadjian on 05-05-2009 03:53 PM
0 Kudos
Message 12 of 13
(4,038 Views)

Hello Cbasmadjian,

You can submit a product suggestion through our website by clicking on Contact NI, and then under Product Feedback, click on feedback.  I will also submit a bug report internally so that it is reported to R&D two different ways. 

 

-Christina 

0 Kudos
Message 13 of 13
(4,015 Views)