Mikrotron MC136, MC137 Reference Manual

MC136x/MC137x
HighSpeed Memory Camera With GigEVision Interface
G
Gii
E
E
V
Vii
s
sii
n
G
G
nII
C
C
m
m
R
R
eff
err
c
c
e
M
M
all
MC136x/MC137x Camera Manual Rev. 1.0
Copyright 2009 Mikrotron GmbH
Mikrotron GmbH
Landshuter Str. 20-22 D-85716 Unterschleissheim Germany
Tel.: +49 89 726342 00 Fax: +49 89 726342 99
info@mikrotron.de
www.mikrotron.de
Table of contents
1. Introduction
..........................................................................................................................3
1.1. General Target.......................................................................................................................3
1.2. GEN<i>CAM Specification...................................................................................................4
1.3. Interface Type .......................................................................................................................4
2. Feature description
........................................................................................................5
2.1. Camera Information .............................................................................................................5
2.2. Image Size Controls.............................................................................................................8
2.3. Acquisition and Trigger Controls......................................................................................12
2.4. Record Controls..................................................................................................................16
2.5. Stream Controls..................................................................................................................19
2.6. Analog Controls...................................................................................................................21
2.7. Camera State......................................................................................................................24
3. General Programming Guide
..............................................................................25
3.1. Camera States....................................................................................................................25
3.2. State Transformations........................................................................................................26
4. Record Programming Guide
................................................................................27
4.1. Continuous Recording, single sequence........................................................................27
4.2. Continuous Recording with more than one sequence..................................................29
4.3. Single Recording................................................................................................................30
4.4. Triggered Recording...........................................................................................................30
5. Streaming Programming Guide
.........................................................................31
6. Summarize of the features
.....................................................................................33
MC136x/MC137x GenICam Reference Manual
3
1. Introduction
Today's digital cameras are packed with much more functionality than just delivering an image. Processing the image and appending the results to the image data stream, controlling external hardware, and doing the real-time part of the application have become common tasks for machine vision cameras. As a result, the programming interface for cameras has become more and more complex.
The goal of GenICam is to provide a generic programming interface for all kinds of cameras. No matter what interface technology (GigE Vision, Camera Link, 1394 DCAM, USB, etc.) they are using or what features they are implementing, the application programming interface (API) should be always the same.
GEN<i>CAM as a standard for the definition of software and hardware (cameras) is becoming increasingly important.
Our cameras of the production line MC136x and MC137x are GigE Vision complient cameras. The GigE Vision standard uses Ethernet as the hardware interface to connect a camera to its host. GigE Vision is based on GEN<i>CAM which ensures compatibility to a wide range of programming interfaces and applications.
The description of this manual covers the Mikrotron cameras from the series
MC136x and MC137x
1.1. General Target
The configuration, status and control capabilities of the cameras are accessible by a number of camera 'features'. This manual gives you an overview of the features defined in the MC136x and MC137x. Special functions of the cameras will be descriped in detail to give you all informations you may need to realize your software projects with our cameras.
There are a number of standard features, wich are common to all GigE Vision complient cameras. For example, there areare features to configure the communication over the Ethernet interface. Not all of this features are descriped in this manual. They are descriped in detail in the document 'GEN<i>CAM Standard Features Naming Convention' which can be downloaded from the homepage of the GEN<i>CAM organisation (http://www.genicam.org/).
Please use a GEV-Viewer to show all possible features of the camera ( e.g. GEVPlayer from Pleora).
This specification provides the definitions of all camera related features and show you how to use
them for your programming.
MC136x/MC137x GenICam Reference Manual
4
1.2. GEN<i>CAM Specification
This manual is based on the GEN<i>CAM Standard Features Naming Convention, Version 1.2.1, 2008-08-19 from the GEN<i>CAM Organisation at www.genicam.org.
1.3. Interface Type
Each feature is accessible by a specific interface. Each interface has a number of attributes descriping the current value/state and capabilities (e.g. value range) of a feature. The following interfaces are currently defined in the GenICam standard (each one is given with the typical widget used to map it on a graphical user interface):
Interface Type Widget
IInteger maps to a slider with value, min, max, and increment IFloat maps to a slider with value, min, and max plus a physical unit IString maps to an edit box showing a string IEnumeration maps to a drop down box ICommand maps to a command button IBoolean maps to a check box IRegister maps to an edit box showing a hex string ICategory maps to an entry in a tree structuring the camera's features IPort maps to the camera port and is typically not shown graphically
MC136x/MC137x GenICam Reference Manual
5
2. Feature description
This chapter describes the features from the feature list in chapter 2 in detail. The methods you may use to read from and write to the features depend on the functions provided
by the API of the GigE Vision SDK of your choice. Because the GigE Vision interface is standardize there are a number of different SDK's from different vendors you can use to communicate with the camera.
The following description of the features gives you the 'raw' format for the commands and values you will send to the camera or you will get from it. Each write command to the camera is receipt by an ACK (0x06). Each read command returns the current value of the requested features followed by a trailing ACK. If a command fails a NACK (0x15) is returned.
The format of the values you will get from the functions of the API of your choice may be differ from this description. Please read the documentation of your SDK for details how they handle read/write commands to the camera.
2.1. Camera Information
DeviceVendorName
This feature provides the manufacturer name.
Feature name
DeviceVendorName
Access Read only Interface IString Unit
--
Range
--
Response „Mikrotron GmbH\0“ Note the string is limited by a trailing „\0“
DeviceModelName
This feature provides the model name.
Feature name
DeviceModelName
Access Read only Interface IString Unit -­Range -­Response e.g. „MC1366\0“ Note the string is limited by a trailing „\0“
MC136x/MC137x GenICam Reference Manual
6
DeviceManufacturerInfo
This feature provides extended manufacturer information. Here it is the position of Mikrotron GmbH.
Feature name
DeviceManufacturerInfo
Access Read only Interface IString Unit
--
Range
--
Response „85716 Unterschleissheim, Germany\0“ Note the string is limited by a trailing „\0“
DeviceVersion
This feature provides the version.
Feature name
DeviceVersion
Access Read only Interface IString Unit
--
Range
--
Response e.g. „Version 1.0.0\0“ Note the string is limited by a trailing „\0“
DeviceID
This feature provides the serial numbe.
Feature name
DeviceID
Access Read only Interface IString Unit
--
Range
--
Response e.g. „01234\0“ Note the string is limited by a trailing „\0“
DeviceScanType
This feature specifies the scan type of the sensor.
Feature name
DeviceScanType
Access Read only Interface IEnumeration Unit
--
Range Areascan or Linescan Response 0 Note Areascan
Linescan
MC136x/MC137x GenICam Reference Manual
7
CameraHeadReset
This feature ist used to reset the camera and to put it in its power up state.
Feature name
CameraHeadReset
Access Write only Interface ICommand Unit -­Range -­Response Note
MC136x/MC137x GenICam Reference Manual
8
2.2. Image Size Controls
SensorWidth
This feature indicates the effective width of the sensor in pixels.
Feature name
SensorWidth
Access Read only Interface IInteger Unit pixel Range -­Response 1280 Note
SensorHeight
This feature indicates the effective height of the sensor in pixels.
Feature name
SensorHeight
Access Read only Interface IInteger Unit pixel (hex) Range -­Response 1024 Note
WidthMax
This feature represents the maximum width (in pixels) of the image after horizontal binning, decimation or any other function changing the horizontal dimensions of the image.
Feature name
WidthMax
Access Read only Interface IInteger Unit pixel Range -­Response 1280 Note
HeightMax
This feature represents the maximum height (in pixels) of the image after vertical binning, decimation or any other function changing the vertical dimensions of the image.
Feature name
HeightMax
Access Read only Interface IInteger Unit pixel Range -­Response 1024 Note
MC136x/MC137x GenICam Reference Manual
9
Width
This feature represents the actual image width expelled by the camera (in pixels).
Feature name
Width
Access Read/Write Interface IInteger Unit pixel Range 96...1280 Response 1280 Invalidation
RecordMaxFrames, RecordMaxFramesPerSequence, AcquisitionFrameRateMax, AcquisitionFrameRateRaw, ExposureTimeMax, AcquisitionSource
Precondition
CameraState = Idle
Note The value must be 96 modulo. (decimal 96,192,...)
Additionally Width can be set to the full sensor width which is 1280 pixel.
Width + OffsetX WidthMax
Height
This feature represents the actual image height expelled by the camera (in pixels).
Feature name
Height
Access Read/Write Interface IInteger Unit pixel Range 1... 1024 Response e.g. 0400 Invalidation
RecordMaxFrames, RecordMaxFramesPerSequence, AcquisitionFrameRateMax, AcquisitionFrameRateRaw, ExposureTimeMax, AcquisitionSource
Precondition
CameraState = Idle
Note
Height + OffsetY HeightMax
OffsetX
This feature represents the horizontal offset from the origin to the AOI – Area Of Interest (in pixels).
Feature name
OffsetX
Access Read/Write Interface IInteger Unit pixel Range 0... 1152 Response e.g. 0 Invalidation
RecordMaxFrames, RecordMaxFramesPerSequence, AcquisitionFrameRateMax, AcquisitionFrameRateRaw, ExposureTimeMax, AcquisitionSource
Precondition
CameraState = Idle
Note - The value must be 96 modulo. (decimal 0,96......1152)
- Width + OffsetX WidthMax
MC136x/MC137x GenICam Reference Manual
10
OffsetY
This Feature represents the vertical offset from the origin to the AOI – Area Of Interest (in pixels).
Feature name
OffsetY
Access Read/Write Interface IInteger Unit pixel Range 0... 1022 Response e.g. 0 Invalidation
RecordMaxFrames, RecordMaxFramesPerSequence, AcquisitionFrameRateMax, AcquisitionFrameRateRaw, ExposureTimeMax, AcquisitionSource
Precondition
CameraState = Idle
Note
Height + OffsetY HeightMax
PixelFormat
This feature indicates the format of the pixel to use during the acquisition.
Feature name
PixelFormat
Access Read only Interface IEnumeration Unit -­Range -­Response Note
Mono8 monocrome BayerGR8 color
PixelCoding
This feature indicates the coding of the pixels in the image. The camera returns frame data in raw format, that means in the native format of the sensor. The color version of the camera uses a 'Bayer Filter' in front of the sensor. The data returned by this camera type includes the color information in coded form, so the user has to convert the image to RGB by himself, This value must always be coherent with the PixelFormat register.
Feature name
PixelCoding
Access Read only Interface IEnumeration Unit -­Range -­Response Note Mono <- monochrome
Raw <- color
MC136x/MC137x GenICam Reference Manual
11
PixelSize
This feature indicates the total size in bits of a pixel of the image. This value must always be coherent with the PixelFormat register.
Feature name
PixelSize
Access Read only Interface IEnumeration Unit -­Range -­Response Note Bpp8
PixelColorFilter
This feature indicates the type of color filter that is applied to the image. This value must always be coherent with the PixelFormat register.
Feature name
PixelColorFilter
Access Read only Interface IEnumeration Unit -­Range -­Response Note
None monochrome
MC136x/MC137x GenICam Reference Manual
12
2.3. Acquisition and Trigger Controls
AcquisitionMode
This feature controls the acquisition mode of the device. It defines the number of frames to capture during an acquisition and the way the acquisition stops. Actually only the acquisition mode 'Continuous Mode' is supported.
In Continuous Mode frames are captured continuously without stopping. Acquisition can be stopped by an AcquistionStop command.
Feature name
AcquisitionMode
Access Read/Write Interface IEnumeration Unit -­Range Continuous Response Continuous Invalidation Precondition
CameraState = Idle
Note
AcquisitionSource
This feature defines the streaming source of frame data from the camera.
Feature name
AcquisitionSource
Access Read/Write Interface IEnumeration Unit -­Range Live, Memory Response e.g. 00 Invalidation
AcquisitionStart
Precondition
CameraState = Idle
Note Live
Frame data is streamed directly from the camera to host without buffering.
Memory Frame data is streamed from the camera internal frame buffer to the host.
MC136x/MC137x GenICam Reference Manual
13
AcquisitionFrameRateMax
This feature represents the upper limit of the frame rate(in hertz) of the camera in dependency of the current camera settings.
Feature name
AcquisitionFrameRateMax
Access Read only Interface IInteger Unit Hz (fps – frame per second) Range -­Response e.g. 500 Invalidation
AcquisitionFrameRateRaw
Note
AcquisitionFrameRateRaw
This feature defines the current frame rate (in hertz) of the camera.
Feature name
AcquisitionFrameRateRaw
Access Read/Write Interface IInteger Unit Hz (fps – frame per second) Range
1... AcquisitionFrameRateMax Response e.g. 500 Invalidation
ExposureTimeRaw, ExposureTimeMax
Precondition
CameraState = Idle, AcquisitionFrameRateMax
Note
ExposureMode
This feature is used to set the exposure mode of the camera. Currently there is only Timed exposure available. The exposure duration time is defined by the feature ExposureTimeAbs,
The camera MC136x and MC137x suport only the Timed mode now. Default value is Timed.
Feature name
ExposureMode
Access Read/Write Interface IEnumeration Unit -­Range Timed Response Timed Invalidation Precondition
CameraState = Idle
Note
MC136x/MC137x GenICam Reference Manual
14
ExposureTimeMax
This feature represents the upper limit Exposure time (in us) at which the Frames can be captured.
Feature name
ExposureTimeMax
Access Read only Interface IInteger Unit microseconds - us Range
--
Response e.g. 1944 Invalidation
ExposureTimeRaw
Note
ExposureTimeRaw
This feature is used to set the Exposure time (in microseconds). This controls the duration where the photosensitive cells are exposed to light.
Feature name
ExposureTimeRaw
Access Read/Write Interface IInteger Unit microseconds - us Range
2… ExposureTimeMax Response e.g. 2 Invalidation Precondition
CameraState = Idle or LIVE, ExposureTimeMax Note
AcquisitionStart
This feature starts the frame acquisition. The frame source is specified by AcquisitionSource.
Feature name
AcquisitionStart
Access Write only Interface ICommand Unit
--
Range
--
Response -­Invalidation
CameraState
Precondition
CameraState = Idle, AcquisitionSource Note
if AcquisitionSource is LIVE, then CameraState become:
IdleAcquisitionStartLive
if AcquisitionSource is MEMORY, then
IdleAcquisitionStartStreaming
MC136x/MC137x GenICam Reference Manual
15
AcquisitionStop
This feature stops the Acquisition of the device at the end of the current frame. If no Acquisition is in progress, the command is ignored.
Feature name
AcquisitionStop
Access Write only Interface ICommand Unit
--
Range
--
Response -­Invalidation
CameraState
Precondition
CameraState = Live or Recording or Streaming Note
CameraState  Idle
MC136x/MC137x GenICam Reference Manual
16
2.4. Record Controls
RecordMode
This feature defines the record operation mode. There are two modes:
-single recording In this mode the cameras internal buffer is filled with frames untill the end of the buffer is reached. Afterwards, the camera stopps recording.
-continuous recording In this mode the cameras internal buffer is filled with frames. When the end of the buffer is reached recording continuous at the start of the buffer.
Feature name
RecordMode
Access Read/Write Interface IEnumeration Unit -­Range Single, Continuous Response Continuous Invalidation
RecordNumberOfSequences, RecordMaxFrames,
RecordMaxFramesPerSequence
Precondition
CameraState = Idle Note Single
Continuous(default)
if single recording, RecordNumberOfSequences is set to1
sequence automatically
RecordNumberOfSequences
This feature defines the number of different sequences that will be recorded. The default value is one sequence. Possible values are 1, 2, 4 or 8 sequences.
Feature name
RecordNumberOfSequences
Access Read/Write Interface IEnumeration Unit Range One, Two, Four, Eight Response e.g. One Invalidation Precondition
CameraState = Idle Note
MC136x/MC137x GenICam Reference Manual
17
RecordTrailer
This feature defines the number of frames to record after a record stop trigger is detected. The default value is 0.
Feature name
RecordTrailer
Access Read/Write Interface IInteger Unit number of picture Range
0… (RecordMaxFramesPerSequence-1) Response e.g. 0 Invalidation Precondition
CameraState = Idle, RecordMaxFramesPerSequence Note
RecordMaxFrames
This feature indicates the maximal number of frames that can be recorded in sum of all defined sequences.
Feature name
RecordMaxFrames
Access Read only Interface IInteger Unit number of picture Range -­Response e.g. 3274 Note
RecordNumberOfFrames
This feature indicates the number of recorded frames in sum off all defined sequences.
Feature name
RecordNumerOfFrames
Access Read only Interface IInteger Unit number of picture Range -­Response e.g. 3274 Note
MC136x/MC137x GenICam Reference Manual
18
RecordMaxFramesPerSequence
This feature indicates the maximal number of frames, that can be recorded in one sequence.
Feature name
RecordMaxFramesPerSequence
Access Read only Interface IInteger Unit number of picture Range -­Response e.g. 3274 Note
RecordNumberOfFramesPerSequence
This feature indicates the number of recorded frames in one sequence.
Feature name
RecordNumberOfFramesPerSequence
Access Read only Interface IInteger Unit number of picture Range -­Response e.g. 3274 Note
RecordStart
This feature starts the recording to the camera internal buffer. Recording will start at the first of the number of defined sequences.
Feature name
RecordStart
Access Write only Interface ICommand Unit -­Range -­Response -­Invalidation
CameraState
Precondition
CameraState = Idle or Live, Note
RecordStop
This feature stops the recording mode.
Feature name
RecordStop
Access Write only Interface ICommand Unit -­Range -­Response -­Invalidation CameraState Precondition CameraState = Recording Note
MC136x/MC137x GenICam Reference Manual
19
2.5. Stream Controls
StreamSequenceSelector
If streaming from the camera to the host is selected, this feature defines the index of the sequence the frames are read from.
Feature name
StreamSequenceSelector
Access Read/Write Interface IInteger Unit Range 0 .. 7 Response e.g. 0 Invalidation
RecordNumberOfFramesPerSequence, StreamStartNumber,
StreamEndNumber
Precondition
CameraState = Idle Note
StreamStartNumber
This feature defines the frame start number at which streaming from a sequence buffer to the host should start. The frame number is relative to each buffer and starts with 0.
Feature name
StreamStartNumber
Access Read/Write Interface IInteger Unit number of picture Range
0... StreamEndNumber Response e.g. 0 Invalidation
RecordNumberOfFramesPerSequence, StreamStartNumber, StreamEndNumber
Precondition
CameraState = Idle, StreamSequenceSelector, StreamEndNumber
Note
StreamStartNumber StreamEndNumber
StreamEndNumber
This feature is used to set the number of the last frame for stream.
Feature name
StreamEndNumber
Access Read/Write Interface IInteger Unit number of picture Range
StreamStartNumber... RecordNumberOfFramesPerSequence Response e.g. 0 Invalidation Precondition
CameraState = Idle, StreamSequenceSelector,
StreamStartNumber, RecordNumberOfFramesPerSequence
Note
StreamStartNumber StreamEndNumber
RecordNumberOfFramesPerSequence
MC136x/MC137x GenICam Reference Manual
20
StreamSingleFrame
This feature is used to read a single frame from a sequence buffer. The frame to read is absolutely addressed by its frame number. To read a frame set this feature to the requested frame number.
Feature name
StreamSingleFrame
Access Read/Write Interface IInteger Unit number of picture Range
0... RecordNumberOfFramesPerSequence-1 Response e.g. 0 Invalidation Precondition
CameraState = Idle, StreamSequenceSelector, StreamStartNumber, RecordNumberOfFramesPerSequence
Note
StreamSingleFrame RecordNumberOfFramesPerSequence-1
MC136x/MC137x GenICam Reference Manual
21
2.6. Analog Controls
GainRaw
This feature is used to set the digital gain of the camera.
Feature name
GainRaw
Access Read/Write Interface IInteger Unit Range 0…600 Response e.g. 0 Invalidation Precondition
CameraState = Idle or Live,
Note
BlackLevelRaw
This feature is used to set the black level of the camera.
Feature name
BlackLevelRaw
Access Read/Write Interface IInteger Unit Range 50…200 Response e.g. 50 Invalidation Precondition
CameraState = Idle or Live
Note
SlopsMode
This feature is used to set the mode of the multiple slope feature of the camera. The multiple slope mode used to extend the dynamic range of the camera.
Feature name
SlopsMode
Access Read/Write Interface IEnumeration Unit Range NormalShutter, DualSlope, TripleSlope Response e.g. NormalShutter Invalidation Precondition
CameraState = Idle or Live
Note NormalShutter – disable slops
DualSlope – dual slope enable TripleSlope – triple slope enable
MC136x/MC137x GenICam Reference Manual
22
SlopsDualRaw
This feature is used to set the dual slope of the camera.
Feature name
SlopsDualRaw
Access Read/Write Interface IInteger Unit Range
SlopsdualMinSlopsDualMax Response e.g. 1 Invalidation Precondition
CameraState = Idle or Live, SlopsMode = DualSlope or
TripleSlope Note
SlopsDualMin
This feature indicates the minimum of the dual slope.
Feature name
SlopsDualMin
Access Read only Interface IInteger Unit Range -­Response 1 Invalidation Precondition
CameraState = Idle or Live, SlopsMode = DualSlope or
TripleSlope Note
SlopsDualMax
This feature indicates the maximum of the dual slope.
Feature name
SlopsDualMax
Access Read only Interface IInteger Unit Range -­Response e.g. 63 Invalidation Precondition
CameraState = Idle or Live, SlopsMode = DualSlope or
TripleSlope Note
MC136x/MC137x GenICam Reference Manual
23
SlopsTripleRaw
This feature is used to set the triple slope of the camera.
Feature name
SlopsTripleRaw
Access Read/Write Interface IInteger Unit Range
SlopsTripleMinSlopsTripleMax Response e.g. 1 Invalidation Precondition
CameraState = Idle or Live, SlopsMode = TripleSlope Note
SlopsTripleMin
This feature indicates the minimum of the triple slope.
Feature name
SlopsTripleMin
Access Read only Interface IInteger Unit Range -­Response e.g. 2 Invalidation Precondition
CameraState = Idle or Live, SlopsMode = TripleSlope Note
SlopsTripleMax
This feature indicates the maximum of the triple slope.
Feature name
SlopsTripleMax
Access Read only Interface IInteger Unit Range -­Response e.g. 63 Invalidation Precondition
CameraState = Idle or Live, SlopsMode = TripleSlope Note
MC136x/MC137x GenICam Reference Manual
24
2.7. Camera State
CameraState
This feature indicates the state of the camera.
Feature name
CameraState
Access Read only Interface IEnumeration Unit Range -­Response Idle, Live, Streaming, Recording Invalidation IdleLive: --
IdleStreaming:--
IdleRecording: RecordNumberOfFrames,
RecordNumberOfFramesPerSequences
LiveIdle: --
LiveRecording: RecordNumberOfFrames,
RecordNumberOfFramesPerSequences
RecordingIdle: RecordNumberOfFrames,
RecordNumberOfFramesPerSequences
StreamingIdle: -­Precondition
CameraState = Idle, StreamSequenceSelector,
StreamStartNumber, RecordNumberOfFramesPerSequence
Note
MC136x/MC137x GenICam Reference Manual
25
3. General Programming Guide
3.1. Camera States
The feature CameraState indicates der current state of the camera. The camera has 4 states:
IDLE the camera is in IDLE state
LIVE the camera is streaming live frames from the camera to the host
RECORDING the camera is in recording mode. Recorded frames will be stored in the cameras internal buffer. If LIVE streaming was enabled when recording starts, a live image stream is send to the host while recording is running.
STREAMING the camera is streams recorded frame data from the cameras internal buffer to the host.
The accessibility of camera features depends on the current camera state. The table below shows this dependencies.
available unavailable IDLE all states ­LIVE
all „read only“ features
CameraHeadReset
ExposureTimeRaw
GainRaw
BlackLevelRaw
SlopsMode
SlopsDualRaw
SlopsTripleRaw
AcquisitionStop
RecordStart
others
RECORDING
all „read only“ features
CameraHeadReset
AcquisitionStop
RecordStop
others
STREAMING
all „read only“ features
CameraHeadReset
AcquisitionStop
others
MC136x/MC137x GenICam Reference Manual
26
3.2. State Transformations
The camera goes to the IDLE state automatically after the power-up. The diagramm below shows the state transitions between the different camera states:
IDLE RECORDING
LIVE STREAMING
Possible state transitions:
Transition Precondition Transition trigger IDLE LIVE
AcquisitionSource = Live AcquisitionMode = Continuous
AcquisitionStart
LIVE IDLE --
AcquisitionStop
IDLE RECORDING
--
RecordStart or trigger button on camera
RECORDING IDLE
RecorStop or trigger button on camera
LIVE RECORDING --
RecordStart or trigger butto on camera
IDLE STREAMING
AcquisitionSource = Memory AcquisitionStart or
AcquisitionStart and StreamSingleFrame
STREAMING IDLE
AcquisitionStop or transmition ended
MC136x/MC137x GenICam Reference Manual
27
4. Record Programming Guide
The camera is capable to record frames directly in the internal memory of the camera at full speed. The memory can be configured as one large buffer or can be devided in up to 8 regions of equal size, called sequences. Recording is controlled by the RecordStart, RecordStop features and hardware trigger button on the back side of the camera.
The table below gives you an overview of the possible recording modes of the camera. The method to start and stop recording depends on the used recording mode.
Record Mode Start Stop Continuous Recording single sequence
RecordStart RecordStop or trigger button
on camera Continuous Recording more than one sequence
RecordStart
RecordStop or trigger button
on camera
(„Sequence jump“ only with
trigger button on camera) Single Recording
RecordStart RecordStop or trigger button
on camera Triggered Recording trigger button on camera trigger button on camera
The different recording mode will be discussed in detail in the chapters below.
4.1. Continuous Recording, single sequence
In continuous mode the camera fills the internal buffer circularly with frames. It starts recording at the beginning of the buffer and fills it with frames untill the end of the buffer is reached. After reaching the end of the buffer recording starts again at the beginning of the buffer and so on, Recording Stopp when the command „RecordStop“ is given or the trigger button on the camera is pressed.
stop
Memory
start
first picture
The RecordMode, RecordNumberOfSequences and RecordTrailer features must be set before recording is started.
MC136x/MC137x GenICam Reference Manual
28
There is an additional feature for defining a record sequence, called 'RecordTrailer'.
Memory
trailer
stopstart real stop
trailer
The trailer value defines the number of recorded frames after a stop event initiated by the trigger button or a RecordStop command. The trailer value is only meaningful in continuous recording mode and continuous recording mode with more sequences.
Example:
We want to record 100 pictures after a trigger event. So the feature RecordTrailer has to be set to 100 before the start of recording. The dafault value of the RecordTrailer is 0.
The record activity is started with the feature RecordStart. As long as recording is running the Trigger-LED on the camera is blinking and the feature CameraState returns the state „Recording“.
Recording gets stopped with the feature RecordStop or the trigger button on the back side of the camera. After the record stop event is given recording continuous until the additional number of frames (RecordTrailer) are recorded to the buffer. Now the camera state changes to „Idle“ and the trigger-LED will stop blinking.
Please note: If recording is stopped by the trigger button, you have to give the camera an additional RecordStop command after the hardware trigger.
The programming flow for a continuous recording to a single frame is:
RecordMode = Continuous
RecordNumberOfSequences = One
RecordTrailer = x (Range: 0.....RecordMaxFramesPerSequence-1)
RecordStart
•...
RecordStop or trigger buttom (then RecordStop)
Read the RecordNumberOfFrames and RecordNumberOfFramesPerSequence
MC136x/MC137x GenICam Reference Manual
29
4.2. Continuous Recording with more than one sequence
The camera internal buffer can be subdevided into 2, 4 or 8 record sequences. Each recording to a sequence buffer is done as descriped in the mode 'Continuous Recording, single buffer' above.
The difference to a single buffer recording is descriped by an example with 2 sequences in the example below:
Sequence 1
trigger
start
Sequence 2
stop
Sequence 1
full
trigger
start
first picture
Sequence 2
stop
first picture
not full
The start of recording must be done per software(RecordStart), and the end of the recording can be done per software or per trigger buttom. But if the trigger buttom is used, you must give the camera a RecordStop after the trigger event. The jump from one sequence to the next can only be done by the hardware trigger button of the camera.
The programming flow of a continuous recording with more sequences is:
RecordMode = Continuous
RecordNumberOfSequences = Two,Four or Eight sequences
RecordTrailer = x (Range: 0.....RecordMaxFramesPerSequence-1)
RecordStart
•...
RecordStop or trigger button (then RecordStop)
After the camera state changes to 'idle' the number of recorded frames can be read. You can read
the sum of all recorded frames of all sequences (RecordNumberOfFrames) or the number of recorded frames in a specific sequence ( RecordNumberOfFramesPerSequence). To get the number of recorded frames in a specific sequence, you have to select the sequence with the feature StreamSequenceSelector before.
MC136x/MC137x GenICam Reference Manual
30
4.3. Single Recording
Single recording means, that the recording starts at the beginning of the memory and stops automatically at the end of the buffer. Recording can be stopped prematurely using the command feature „RecordStop“.
If the camera is stopped automatically by reaching the end of the buffer, an additional RecordStop must be send to the camera.
Single recording mode is only availabe for one sequence. So, if the RecordMode is set to single the RecordNumberOfSequences will be set to one automatically.
The single recording mode does not support the feature RecordTrailer. The programming flow for the single recording mode is:
RecordMode = Single
RecordNumberOfSequences = One
RecordStart
•...
RecordStop or trigger button (then RecordStop)
Read the number of recorded frames form the feature nRecordNumberOfFrames which sould be
equal to RecordNumberOfFramesPerSequence.
4.4. Triggered Recording
Triggered recording means, that recording is started with the trigger button of the camera. A possibly running data transfer from the camera to the host has to be stopped by command AquisitionStop before recording starts. Recording is done in continuous recording mode. Stopping recording is also done with the trigger buttom of the camera. There is no live picture available for triggered recording.
The programming flow of a triggered recording is:
RecordMode = Continuous
Camera must be in 'idle' state
Wait until the feature CameraState changes from state 'idle' to state 'recording'
The state changes because of a trigger signal generated by the hardware button of the camera.
Wait until CameraState gets 'Idle' again. Now send a RecordStop to the camera.
Read the RecordNumberOfFrames and RecordNumberOfFramesPerSequence to get the
number of recorded frames.
MC136x/MC137x GenICam Reference Manual
31
5. Streaming Programming Guide
After recording is stopped the internal buffer of the camera is filled with a number of recorded frames.To enable streaming from the camera buffer to the host, the feature AcquisitionSource must be set to 'Memory'.
The streamrate is fix 30Mb/s, So if the picture is bigger, the framerate is smaller. Reading recorded frames from the camera to the host can be done in two different modes:
Single Frame Mode
Before reading a frame in 'Single Frame Mode' you must set StreamStartNumber and SreamEndNumber to 0. Activate streaming by performing the command AcquisitionStart. Now
the camera will send one frame which has to be discarded. Now single frames can be read from the camera just by setting their frame number in the feature StreamSingleFrame. After setting the frame number, streaming of the frame data to the host computer will start immediately.
A frame is addressed by its frame number which is the index of the frame in the camera internal frame buffer. The frame number starts with 0 for the first frame and goes up to RecordNumberOfFramesPerSequence-1 for the last frame. If you did recording in multi sequence mode, you must select the sequence you want to read from with the feature StreamSequenceSelector before reading.
The programming flow:
StreamSequenceSelector = 0 or 1 or….
Read the feature RecordNumberOfFramesPerSequence
StreamStartNumber = StreamEndNumber = 0
AcquisitionSource = Memory
Perform AcquisitionStart
Discard the next frame from the camera
Set StreamSingleFrame to the requested frame number
Frame Burst Mode
In 'Frame Burst Mode' you can read a number of consecutive frames from the camera by defining a frame start number with the feature StreamStartNumber and the number of the last frame to read by the feature StreamEndNumber. The address of the frame start number has to be less or equal than the frame end number. The address range for StreamStartNumber is 0 up to the value of StreamEndNumber. The range StreamEndNumber is StreamStartNumber up to RecordNumberOfFramesPerSequence-1. To start streaming the defined sequence perform the command AcquisitionStart. Data transmission stops automatically after the last frame of the sequence. Wihle data transmission is running, the camera state changes to 'streaming' and will be set to 'idle' after streaming ends. Select the sequence from where you want to read by setting the StreamSequenceSelector before reading,
MC136x/MC137x GenICam Reference Manual
32
The programming flow of a streaming is:
StreamSequenceSelector = 0 or 1 or….
Read the feature RecordNumberOfFramesPerSequence
StreamEndNumber = x (Range: StreamStartNumber
RecordNumberOfFramesPerSequence-1)
StreamStartNumber = x (Range: 0…. StreamEndNumber)
AcquisitionSource = Memory
Perform AcquisitionStart (CameraState gets Streaming)
The feature CameraState will be set automatically to Idle after streaming ends.
MC136x/MC137x GenICam Reference Manual
33
6. Summarize of the features
Feature Name Access
Write Parameter Response Interface
Camera Information
DeviceVendorName
R -- Mikrotron GmbH IString
DeviceModelName
R -- e.g. MC1366 IString
DeviceManufacturerInfo
R -- 85716
Unterschleißheim, Germany
IString
DeviceVersion
R -- e.g. Version 1.0.0 IString
CameraHeadReset
W -- ICommand
Image Size Controls
SensorWidth
R -- 1280 IInteger
SensorHeight
R -- 1024 IInteger
WidthMax
R -- 1280 IInteger
HeightMax
R -- 1024 IInteger
Width
R/W Range: 96…1280 IInteger
Height
R/W Range: 1…1024 IInteger
OffsetX
R/W Range: 0…1152 IInteger
OffsetY
R/W Range: 0…1022 IInteger
PixelFormat
R -- e.g. Mono8 IEnumeration
PixelCoding
R -- e.g. Mono IEnumeration
PixelSize
R -- e.g. Bpp8 IEnumeration
PixelColorFilter
R -- e.g. None IEnumeration
Acquisition and Trigger Controls
AcquisitionMode
R/W Continuous IEnumeration
AcquisitionSource
R/W Live, Memory IEnumeration
AcquisitionFrameRateMax
R -- IInteger
AcquisitionFrameRateRaw
R/W
Range : 1…
AcquisitionFrameRateMax
IInteger
ExposureMode
R/W Timed IEnumeration
ExposureTimeMax
R -- IInteger
ExposureTimeRaw
R/W
Range: 2…
ExposureTimeMax
IInteger
AcquisitionStart
W -- ICommand
AcquisitionStop
W -- ICommand
Record Controls
RecordMode
R/W Continuous or Single IEnumeration
RecordNumberOfSequences
R/W One, Two, Four, Eight IEnumeration
RecordTrailer
R/W Range : 0…
RecordMaxFramesPerSequence -1
IInteger
RecordMaxFrames
R -- IInteger
RecordNumberOfFrames
R -- IInteger
RecordMaxFramesPerSequenc e
R -- IInteger
RecordNumberOf FramesPerSequence
R -- IInteger
RecordStart
W -- ICommand
RecordStop
W -- ICommand
Stream Controls
StreamSequenceSelector
R/W 0.....7 IInteger
MC136x/MC137x GenICam Reference Manual
34
StreamStartNumber
R/W
Range: 0…
StreamEndNumber
IInteger
StreamEndNumber
R/W
StreamStartNumber … Seqrecpicnum-1
IInteger
StreamSingleFrame
R/W
Range: 0…
StreamEndNumber
IInteger
Analog Controls
GainRaw
R/W 0....600 IInteger
BlackLevelRaw
R/W 50…200 IInteger
SlopsMode
R/W NormalShutter, DualSlpoe, TripleSlope IEnumeration
SlopsDualRaw
R/W SlopsDualMin...SlopsDualMax IInteger
SlopsDualMin
R -- IInteger
SlopsDualMax
R -- IInteger
SlopsTripleRaw
R/W SlopsTripleMin...SlopsTripleMax IInteger
SlopsTripleMin
R -- IInteger
SlopsTripleMax
R -- IInteger
Camera State
CameraState
R -- Idle, Live,
Streaming, Recording
IEnumeration
Loading...