'GetCtrlVal'에 해당되는 글 1건

  1. 2008.01.24 GetCtrlVal() 함수
2008. 1. 24. 18:05

GetCtrlVal() 함수



GetCtrlVal()함수는 해당 컨트롤의 값을 받아오는 함수이다.
다시말해서 수치컨트롤, 문자열컨트롤, 버튼컨트롤 등의 값을 읽어올 때 사용하는 CVI함수이다.

이와 반대로 컨트롤에 값을 기록할 때에는 SetCtrlVal()함수를 사용한다.

관련된 함수 정보는 NI LabWindows/CVI Help를 검색해보면 아래와 같은 정보를 얻을 수 있다.

GetCtrlVal

int GetCtrlVal (int panelHandle, int controlID, void *value);

Purpose

Obtains the current value of a control.

When the control ID is for a list box or ring control, GetCtrlVal returns the value of the currently selected list item. To obtain the index of the selected list item, use GetCtrlIndex.

Note   This function is not valid for graph and strip chart controls.

Parameters

Input
Name Type Description
panelHandle integer Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.
controlID integer The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl.
Output
Name Type Description
value void * The control value. The data type of value must match the data type of the control.

Return Value

Name Type Description
status integer Return value indicating whether the function was successful. A negative number indicates that an error occurred.


참고 : CVI 정보나눔, NI LabWindows/CVI Help


'Programmings > CVI' 카테고리의 다른 글

CVI에서 컨트롤을 동적으로 생성하기  (0) 2008.01.24
GetActiveCtrl() 함수  (0) 2008.01.24
LabWindows/CVI에서 Win32 API를 사용하는 방법  (0) 2008.01.18
CVI 첫번 째 프로그램 - Hello world  (0) 2008.01.15
CVI 설치  (0) 2008.01.15