
User Manual of Machine Vision Camera SDK Demo (C#)
4.3 Programming Guideline
4.3.1 IO Property
There are two IO properties, LineSelector or LineMode.
LineSelector: Select IO port. Three IO ports are available: Line0, Line1 and Line2. Line0 – Can be configured
as input only; Line1 – Can be configured as output only; Line2 – Can be configured input or output.
LineMode: Input or output mode.
4.3.2 APIs for Getting and Setting
In the sample program, the APIs used to get and set IO are m_pMyCamera.MV_CC_GetEnumValue_NET(string
strKey, ref CSI.MVCC_ENUMVALUE pstValue), and m_pMyCamera.MV_CC_SetEnumValue_ NET (string strKey,
UInt32 nValue).
In the SDK, the API function which is similar with the format of Set or Get + Data Type +Value is a general API
used to get or set any camera properties. The first parameter in the general API is property name, which is a
string type string and can be found in the Feature Tree of MVS, while the second parameter is the obtained or
configured property value.
4.3.3 IO Operation
The type of property nodes <LineSelector> and <LineMode> in the Demo is Enumeration type. Call general API
can realize the property operations.
Get:
MyCamera.MVCC_ENUMVALUE stSelValue =
new MyCamera.MVCC_ENUMVALUE();
nRet = m_pMyCamera.GetEnumValue("LineSelector", ref stSelValue);
MyCamera.MVCC_ENUMVALUE stModeValue =
new MyCamera.MVCC_ENUMVALUE();
nRet = m_pMyCamera.GetEnumValue("LineMode", ref stModeValue);
Set:
nRet = m_pMyCamera.SetEnumValue("LineSelector", nValue);
nRet = m_pMyCamera.SetEnumValue("LineMode", nValue);
7
















