04-01-2010 03:18 PM
MG,
I have the same camera and pci board....and am trying to control the integration time as well. However, I am lost in how to do this..(even after reading the posts above). Did you ever get a vi that worked? Would you mind sharing with me so that I can figure out how to do it? Any assistance would be helpful.. I tried to write a read program and kept getting a timing out issue.
Regards,
Cali
04-07-2010 03:29 PM
also, is the byte count always the same? another thing is how to figure out what to put in the status count packet info.. how did you know FFOO was unread by slave?
thanks
04-07-2010 03:48 PM
The Byte count will depend on the number of data bytes you are sending. This tells the slave device how many byes of data it should expect to read.
For my case, the Status packet doesn't matter when sending data, but will sometimes contain useful info when reading the reply.
04-08-2010 08:32 AM
04-13-2010 12:07 PM
Hi MG,
Thanks for the VI files. I tried to modify the Camera CMD and Get response VI and I got an errror due to the termination character issue with the alpha nir camera (because of serial read vi). I attempted to modify the vi and replace it with the serial byte vi and now I get a timing error.. I saw in the earlier posts that you were having the same issue with the serial read and the camera... did you ever get a vi to work using the serial byte vi..do you have it? I know you are busy so thanks for taking the time to help.
Thanks again,
Cali
04-13-2010 05:00 PM
here's the VI I'm doing the reads with.
It's not runnable on my current machine b/c I don't have IMAQ loaded but I think it will work for you. Not sure if this is the same version as previously uploaded or not.
08-09-2010 02:03 PM
MG,
okay, so I'm sending the following commands through imgSessionSerialWrite:
49/03/00/00/00/00/01/00/00/4D -> LONG_INT
49/81/01/00/00/00/02/00/00/00/CD -> READ_FPA
I manipulate the four least significant data bits to fit what I want to send back
49/01/01/00/00/00/02/**/**/??/?? -> WRITE_FPA * and ? depend on the read response
49/03/03/00/00/00/02/xx/xx/??/?? -> INT_TIMER x and ? depend on the desired time
After each use of imgSessionSerialWrite(sid, buffer, &size, 3000); I follow it with
imgSessionSerialRead(sid, buffer, &size, 3000); which returns nothing but 0's
any clue what I'm missing? Why am I not getting a buffer that looks something like:
49/03/00/xx/xx/... after the imgSessionSerialRead() function?
08-09-2010 02:30 PM
Not sure. This looks like "C" or "C++" function calls to me.
All my work was in "G", and I don't have the prototypes of your function calls, or the manual describing what the parameters do.
You might want to implement a loop that reads a single byte at a time (while bytes are pending). Normally, that ends up being the answer when I'm dealing with a serial device.
Sorry I can't be of more help.
08-09-2010 02:37 PM
vs3@tamu wrote:
MG,
okay, so I'm sending the following commands through imgSessionSerialWrite:
49/03/00/00/00/00/01/00/00/4D -> LONG_INT
49/81/01/00/00/00/02/00/00/00/CD -> READ_FPA
I manipulate the four least significant data bits to fit what I want to send back
49/01/01/00/00/00/02/**/**/??/?? -> WRITE_FPA * and ? depend on the read response
49/03/03/00/00/00/02/xx/xx/??/?? -> INT_TIMER x and ? depend on the desired time
After each use of imgSessionSerialWrite(sid, buffer, &size, 3000); I follow it with
imgSessionSerialRead(sid, buffer, &size, 3000); which returns nothing but 0's
any clue what I'm missing? Why am I not getting a buffer that looks something like:
49/03/00/xx/xx/... after the imgSessionSerialRead() function?
Are you resetting your size parameter in between the two calls? The variable is used for input as the size of the array and on output to tell how many bytes were read/written.
Eric
08-09-2010 03:06 PM
okay, so the third parameter is an output parameter? I have been using it to tell the functions how many bytes to write/read... it sounds like that is incorrect.
on a slight tangent, I just placed the imgSessionSerialFlush() function in before my write function, and put a imgSessionSerialReadBytes() command in between the write and read functions. The imgSessionSerialReadBytes() function populates the buffer with the response I expected from the imgSessionSerialRead() function...
What is the difference between these two?