04-10-2012 09:36 AM
Good morning. I was wondering how I could create an attribute in a camera .icd configuration file which accepted multiple parameters. For example, on my camera, the serial syntax for setting a region of interest is "roi x1 x2 y1 y2". However, in the .icd file I don't know how to specify an attribute which accepts multiple parameters. For example, the "vertical binning" setting is defined in the .icd file as an Integer as follows (where "sbv" is the serial command to be issued to the camera, and %d is the variable integer):
Attribute (Vertical Binning) {
Value (Integer) {
Min (1)
Max (8)
Increment (1)
Display {
Multiplier (1.000000)
Offset (0.000000)
Precision (0)
Units (units)
}
Default (1)
Current (1)
Action (Serial) {
Command (sbv %d\r)
Response (\r\nOK>)
How can I create an attribute in the file which has multiple parameters, such as four integers (one each for a corner of a region of interest). Thanks!
04-11-2012 04:47 PM
So far I could not find an example that used multiple parameters. However, have you tried something like the following?
Default (0,0,0,0)
Current (0,0,20,20)
Basically, try to use four integers as the representation for 'one variable.'
02-04-2013 02:51 PM
I am also trying to do something similar to this. I tried the suggestion given but it still only allows 1 parameter. A snippet of my .icd file is below.
Attribute (ROI Settings) { Value (Integer) { Min (0) Max (79) Increment (1) Display { Multiplier (8.000000) Offset (0.000000) Precision (0) Units (Pixel) } Default (0, 0, 0, 0) Current (0, 0, 0, 0) Action (Serial) { Command (ROI %d, %d, %d, %d\r) Response () Timeout (1000) Delay (100) } } }
Any answer or help is appreciated.
Thanks,
Bruce
02-06-2013 09:09 AM
Bruce,
You can try setting the Acquisition Window in Measurement & Automation Explorer under Acquisition Parameters for your camera then save those settings. I believe that sets an ROI with using the Top Left coordinates and the width and height you desire.
02-06-2013 09:22 AM
Thanks for your input. This particular camera has windowing capability (which allows much faster frame rates when in windowing mode) so I was trying to utilize a command that is sent to the camera that changes the window size and location using just one command. Fortunately I have the ability to set the windowing location of the camera using 4 separate commands, but the camera firmware designers wanted to reduce the instruction set by removing the redundant discrete commands and just have 1 command to set the windowing location. I will try need to convince them not to remove the 4 separate commands from this and future cameras.
Bruce