📄 lv2000.pas
字号:
unit Lv2000;
interface
uses Windows;
// The following set of constants can be used in LvSendCmd(), LvSendCmdEx() functions
// The 4. byte is camera ID - by default it is 0;
// use the bitwise OR operator or PLUS operator to add camera ID
// Note that for commands, which require additional values to be send,
// the LvSendByteCmdEx() function is more suitable instead of LvSendCmdEx()
// The constants for this function are listed in section below.
const
// Adjust Exposure Mode command
LV_SET_EXPOMODE_AUTO = $AA600000; // Set exposure mode to AUTO
LV_SET_EXPOMODE_SHUTTER = $AA600100; // Set exposure mode to SHUTTER ADJ (Iris, AGC remains AUTO)
LV_SET_EXPOMODE_IRIS = $AA600200; // Set exposure mode to IRIS ADJ (Shutter, AGC remains AUTO)
LV_SET_EXPOMODE_AGC = $AA600300; // Set exposure mode to AGC ADJ (Shutter, Iris remains AUTO)
LV_SET_EXPOMODE_MANUAL = $AA600400; // Set exposure mode to MANUAL
// Backlight
LV_GET_BACKLIGHT = $AA610000; // Get Backlight level
// White Balance
LV_SET_WB_AUTO = $AA650000; // Set White Balance mode to AUTO
LV_SET_WB_SPECIAL = $AA650100; // Set White Balance mode to SPECIAL
LV_SET_WB_INDOOR = $AA650200; // Set White Balance mode to INDOOR
LV_SET_WB_OUTDOOR = $AA650300; // Set White Balance mode to OUTDOOR
LV_SET_WB_MANUAL = $AA650400; // Set White Balance mode to MANUAL
LV_SET_WB_PUSHAUTO = $AA650500; // Set White Balance mode to PUSH AUTO
// Display Camera ID ON/OFF
LV_TOGGLE_DISPLAY_ID = $AA6A0000; // Toggle the Camera ID Display ON/OFF
// Iris Area Weighting Value
LV_GET_IRIS_WEIGHT = $AA6B0000; // Get Iris Area Weighting value
//LV_SET_IRIS_WEIGHT = $AA6C0000 // Set Iris Area Weighting value in 3rd byte
// Zoom Lens Position
LV_GET_ZOOM_POS = $36000000; // Get Zoom Lens Position
// Focus Lens Position
LV_GET_FOCUS_POS = $37000000; // Get Focus Lens Position
LV_FOCUS_AUTO = $AA580000; // Set Auto Focus (undocumented by the manufacturer)
LV_FOCUS_MANUAL = $AA590000; // Set Manual Focus (undocumented by the manufacturer)
// Camera Power ON/OFF
LV_SET_POWER_ON = $3A000000; // Camera Power ON
LV_SET_POWER_OFF = $3E000000; // Camera Power OFF
// Preset: Memorize Zoom, Focus, Digital zoom
LV_SET_PRESET_0 = $4D000000;
LV_SET_PRESET_1 = $4D010000;
LV_SET_PRESET_2 = $4D020000;
LV_SET_PRESET_3 = $4D030000;
LV_SET_PRESET_4 = $4D040000;
LV_SET_PRESET_5 = $4D050000;
LV_SET_PRESET_6 = $4D060000;
LV_SET_PRESET_7 = $4D070000;
// Reset of microcontroller of the camera
LV_RESTART = $4F000000; // Reset the camera's microcontroller
// Digital Zoom Power from 2x to 8x
LV_SET_DIGIZOOM_POWER_2 = $52000000; // Set Digital Zoom max. power to 2x (total 32x)
LV_SET_DIGIZOOM_POWER_3 = $52010000; // Set Digital Zoom max. power to 3x (total 48x)
LV_SET_DIGIZOOM_POWER_4 = $52020000; // Set Digital Zoom max. power to 4x (total 64x)
LV_SET_DIGIZOOM_POWER_5 = $52030000; // Set Digital Zoom max. power to 5x (total 8= $)
LV_SET_DIGIZOOM_POWER_6 = $52040000; // Set Digital Zoom max. power to 6x (total 96x)
LV_SET_DIGIZOOM_POWER_7 = $52050000; // Set Digital Zoom max. power to 7x (total 112x)
LV_SET_DIGIZOOM_POWER_8 = $52060000; // Set Digital Zoom max. power to 8x (total 128x)
// Set camera ID
LV_GET_CAMERA_ID = $CC000000;
// Constants than can be used in LvSendByteCmd(), LvSendByteCmdEx() functions
LV_SET_BACKLIGHT_B1 = $AA;
LV_SET_BACKLIGHT_B2 = $62;
LV_SET_IRIS_WEIGHT_B1 = $AA;
LV_SET_IRIS_WEIGHT_B2 = $6C;
LV_MEMORIZE_ZOOM_B1 = $49;
LV_MEMORIZE_FOCUS_B1 = $4A;
LV_MEMORIZE_DIGIZOOM_B1 = $4B;
LV_SET_PRESET_B1 = $4D;
LV_SET_CAMERA_ID_B1 = $78;
// Key Actions
// Each Key command must be stopped by the LV_KEY_STOP command
// Stop, reset
LV_KEY_NOT = $5F000000; // Do not do anything
LV_KEY_STOP = $5F0C0000; // Stop all key actions being performed
LV_KEY_RESET_SETTINGS = $5F520000; // Reset the camera mode to default
// Zoom
LV_KEY_ZOOM_TELE = $5F010000; // Zoom to Tele
LV_KEY_ZOOM_TELE_QUICK = $5F020000; // Zoom to Tele quickly
LV_KEY_ZOOM_WIDE = $5F030000; // Zoom to Wide
LV_KEY_ZOOM_WIDE_QUICK = $5F040000; // Zoom to Wide quickly
LV_KEY_TOGGLE_DIGIZOOM = $5F220000; // Toggle Digital Zoom mode ON/OFF
// Focus
LV_KEY_FOCUS_FAR_QUICK = $5F080000; // Move focus to far quickly
LV_KEY_FOCUS_NEAR_QUICK = $5F090000; // Move focus to near quickly
LV_KEY_FOCUS_FAR = $5F380000; // Move focus to far slowly
LV_KEY_FOCUS_NEAR = $5F390000; // Move focus to near slowly
LV_KEY_FOCUS_FAR_STEP = $5F0A0000; // Move focus to far by one step
LV_KEY_FOCUS_NEAR_STEP = $5F0B0000; // Move focus to near by one step
LV_KEY_TOGGLE_FOCUS_MODE = $5F510000; // Toggle between "Manual/Auto" and "Push Auto" modes
LV_KEY_FOCUS_PUSH_AUTO = $5F3F0000; // In Push Auto mode, push the focus
// In Manual/Auto, toggle between Manual/Auto
// Shutter, Iris, AGC
LV_KEY_SHUTTER_UP = $5F400000; // Increase shutter speed
LV_KEY_SHUTTER_DN = $5F410000; // Decrease shutter speed
LV_KEY_IRIS_UP = $5F420000; // Increase iris
LV_KEY_IRIS_DN = $5F430000; // Decrease iris
LV_KEY_AGC_UP = $5F440000; // Increase AGC level
LV_KEY_AGC_DN = $5F450000; // Decrease AGC level
// Brightness, Hue
LV_KEY_BRIGHTNESS_UP = $5F460000; // Increase brightness
LV_KEY_BRIGHTNESS_DN = $5F470000; // Decrease brightness
LV_KEY_HUE_UP = $5F4C0000; // Increase hue
LV_KEY_HUE_DN = $5F4D0000; // Decrease hue
// Sharpness
LV_KEY_SHARPNESS_UP = $5F530000; // Increase sharpness level
LV_KEY_SHARPNESS_DN = $5F540000; // Decrease sharpness level
// White balance
LV_KEY_WB_RED_UP = $5F480000; // Increase red level in special WB mode
LV_KEY_WB_RED_DN = $5F490000; // Decrease red level in special WB mode
LV_KEY_WB_BLUE_UP = $5F4A0000; // Increase blue level in special WB mode
LV_KEY_WB_BLUE_DN = $5F4B0000; // Decrease blue level in special WB mode
LV_KEY_TOGGLE_PUSH_WB = $5F4E0000; // Toggle Push White Balance mode ON/OFF
// Menu
LV_KEY_MENU_SEL_UP = $5F4F0000; // Scroll the menu selection up
LV_KEY_MENU_SEL_DN = $5F500000; // Scroll the menu selection down
LV_KEY_MENU_DATA_UP = $5F270000; // Increase the data of the selected menu item
LV_KEY_MENU_DATA_DN = $5F280000; // Decrease the data of the selected menu item
LV_KEY_TOGGLE_MENU = $5F250000; // Toggle Menu ON/OFF
// Other
LV_KEY_TOGGLE_BACKLIGHT = $5F1A0000; // Toggle Backlight mode ON/OFF
LV_KEY_TOGGLE_FLICKERLESS = $5F1B0000; // Toggle Flickerless mode ON/OFF
LV_KEY_TOGGLE_NEGATIVE = $5F1E0000; // Toggle Negative mode ON/OFF
LV_KEY_TOGGLE_MONO = $5F210000; // Toggle Monochrome mode ON/OFF
LV_KEY_TOGGLE_DISPLAY = $5F240000; // Toggle On Screen Display (OSD) Key function ON/OFF
LV_KEY_TOGGLE_POWER = $5F320000; // Toggle camera power ON/OFF
function LvCloseComm: DWORD; stdcall;
function LvOpenComm (ucCommPort: BYTE): DWORD; stdcall;
function LvSendByteCmd (ucSend1: BYTE; ucSend2: BYTE;
ucSend3: BYTE; ucCameraID: BYTE): DWORD; stdcall;
function LvSendByteCmdEx (ucSend1: BYTE; ucSend2: BYTE;
ucSend3: BYTE; ucCameraID: BYTE;
var ucReturn1: BYTE; var ucReturn2: BYTE;
var ucReturn3: BYTE; var ucReturn4: BYTE): DWORD; stdcall;
function LvSendCmd (dwCmd: DWORD): DWORD; stdcall;
function LvSendCmdEx (dwCmd: DWORD;
var ucReturn1: BYTE; var ucReturn2: BYTE;
var ucReturn3: BYTE; var ucReturn4: BYTE): DWORD; stdcall;
function LvSendCmdWithStop (dwCmd: DWORD): DWORD; stdcall;
function LvGetFocusLensPos (var wFocus: WORD; ucCameraID: BYTE): DWORD; stdcall;
function LvGetZoomLensPos (var wZoom: WORD; var ucDigiZoom: WORD;
ucCameraID: BYTE): DWORD; stdcall;
function LvMemorizeZoom (ucIndex: BYTE; wZoom: WORD;
ucCameraID: BYTE): DWORD; stdcall;
function LvMemorizeFocus (ucIndex: BYTE; wFocus: WORD;
ucCameraID: BYTE): DWORD; stdcall;
function LvGetIrisWeight (var ucIrisWeight1: BYTE;
var ucIrisWeight2: BYTE;
ucCameraID: BYTE): DWORD; stdcall;
function LvSetIrisWeight (ucIrisWeight1: BYTE;
ucIrisWeight2: BYTE;
ucCameraID: BYTE): DWORD; stdcall;
procedure LvControlDlg (iComPort: integer; iCameraId: integer); stdcall;
procedure LvControlDlgEx (iComPort: integer; iCameraId: integer;
iLeft: integer; iTop: integer); stdcall;
implementation
function LvCloseComm; external 'lv2000.dll' name 'LvCloseComm';
function LvOpenComm; external 'lv2000.dll' name 'LvOpenComm';
function LvSendByteCmd; external 'lv2000.dll' name 'LvSendByteCmd';
function LvSendByteCmdEx; external 'lv2000.dll' name 'LvSendByteCmdEx';
function LvSendCmd; external 'lv2000.dll' name 'LvSendCmd';
function LvSendCmdEx; external 'lv2000.dll' name 'LvSendCmdEx';
function LvSendCmdWithStop; external 'lv2000.dll' name 'LvSendCmdWithStop';
function LvGetFocusLensPos; external 'lv2000.dll' name 'LvGetFocusLensPos';
function LvGetZoomLensPos; external 'lv2000.dll' name 'LvGetZoomLensPos';
function LvMemorizeZoom; external 'lv2000.dll' name 'LvMemorizeZoom';
function LvMemorizeFocus; external 'lv2000.dll' name 'LvMemorizeFocus';
function LvGetIrisWeight; external 'lv2000.dll' name 'LvGetIrisWeight';
function LvSetIrisWeight; external 'lv2000.dll' name 'LvSetIrisWeight';
procedure LvControlDlg; external 'lv2000.dll' name 'LvControlDlg';
procedure LvControlDlgEx; external 'lv2000.dll' name 'LvControlDlgEx';
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -