질문,답변

글 수 1,629

[re] 몇 VISA 함수의 도움말

조회 수 2553 추천 수 0 2005.03.30 18:00:33
허창원 *.19.44.52
ViSession 이 Undeclared identifier라는 에러가 나온다면,
visa.h 헤더파일이 제대로 include 되지 않았나봅니다.

파일의 제일 윗부분에서 아래와 같이 라인을 추가해보시구요.

#include

visa.h 라는 텍스트 위에서 마우스 오른쪽 버튼 클릭시 나오는 팝업메뉴 중 "Open Quoted Text...(Ctrl+U)" 를 선택해서, visa.h 헤더파일이 제대로 불러지는지 확인해 보시죠.

아래의 함수에 대해 Function Panel(Ctrl+P)을 열어서 살펴본 도움말을 아래에 옮깁니다.

그럼, 좋은 하루되세요.


viOpenDefaultRM() --------------------------------------------------------------------------
Returns a session to the Default Resource Manager resource.

The Default Resource Manager is needed to open a session to any device.  The Resource Manager is capable (through viFindRsrc and viFindNext) to locate all resources currently on the system.

When a Resource Manager session is passed to viClose(), not only is that session closed, but also all find lists and device sessions (which that Resource Manager session was used to create) are closed.

Prototype:
ViStatus viOpenDefaultRM (ViPSession Rsrc_Manager_Handle);

viOpen() --------------------------------------------------------------------------
The viOpen operation is used to establish communication with a remote instrument.  Based on the Instrument Descriptor, the viOpen operation establishes a communication session with a device and creates an Instrument Handle that is used by all other VISA operations to perform operations on that session.

This operation applies to VISA resource manager sessions only.

Prototype:
ViStatus viOpen (ViSession Rsrc_Manager_Handle,
                 ViRsrc Instrument_Descriptor,
                 ViAccessMode Access_Mode,
                 ViUInt32 Open_Timeout,
                 ViPSession Instrument_Handle);


viSetAttribute() --------------------------------------------------------------------------
Sets a specified attribute for the given object.

Attributes have values of different data types with different valid ranges.  Because of this, a list of attributes, their data types and valid values are provided in the Help for "Attribute Value."


Some attributes are not settable by the user, and are denoted as such in the Help for "Attribute Value".

This operation applies to all VISA session types.

Prototype:
ViStatus viSetAttribute (ViObject Object_Handle,
                         ViAttr Attribute_Name,
                         ViAttrState Attribute_Value);

viWrite () --------------------------------------------------------------------------
Writes data to a device.  The data to be written is in the specified Buffer.  This operation returns when the transfer terminates.

This operation applies to the VISA INSTR session type.

Prototype:
ViStatus viWrite (ViSession Instrument_Handle, ViBuf Buffer,
                  ViUInt32 Count, ViPUInt32 Return_Count);

viRead () --------------------------------------------------------------------------
Reads data from a device.  The data read is stored in the specified Buffer.  This operation returns when the transfer terminates.

This operation applies to the VISA INSTR session type.

Prototype:
ViStatus viRead (ViSession Instrument_Handle,
                 unsigned char Buffer[], ViUInt32 Count,
                 ViPUInt32 Return_Count);

viClose () --------------------------------------------------------------------------
Closes the specified device I/O session or resource manager session.  This operation deallocates all system resources allocated to the Session Handle.  The same operation is also used to close handles to other types of VISA objects.

Notice that if a resource manager session is closed, all VISA sessions opened with the corresponding resource manager session are also closed.  Therefore, an application should usually close resource manager sessions only when it is about to exit.

This operation applies to all VISA object types.

Prototype:
ViStatus viClose (ViSession Session_Handle);

명관범

2005.03.31 08:19:41
*.97.115.108

감사합니다.
행복한 하루 되세요
List of Articles
번호 제목 글쓴이 날짜 조회 수
공지 이제부터 질문은 LabWindows/CVI 카페를 이용하면 더 좋겠습니다 운영자 2020-11-11 1235
공지 파일(특히 그림파일)을 올리실 때의 유의사항 운영자 2004-07-16 100157
709 [re] 친절한 답변 감사드립니다. 한가지만 더... [1] Mag 2005-05-04 1460
708 cviauto.dll 경로 error [2] 최해옥 2005-04-20 1495
707 ram read/write [2] 민경기 2005-04-19 1511
706 코드 생성시 원하는 패널에 관한 코드만 생성하는 방법은요? 최해옥 2005-04-19 1530
705 [re] 새로 생성한 컨트롤의 콜백 함수만을 생성하려면... file 허창원 2005-04-20 1981
704 일정시간에 실행시키는 방법?? 한지애 2005-04-18 1528
703 [re] 매일 같은 시각에 특정 함수를 실행하려면... file [1] 허창원 2005-04-18 1646
702 혹시..칼라컨트롤(Color Numeric)을 테이블 안에 넣어 보신적이 있나요? file [2] 야리싸내 2005-04-12 7073
701 영문 xp 사용시 발생한 에러 메세지에 관한 질문입니다. [3] 조내수 2005-04-06 1881
700 초보적인 질문입니다. cvi 반복 실행 어떻게 하죠?? [1] 왕초보 2005-04-06 1525
699 label printer 출력방법 질문입니다. [1] 김영범 2005-03-30 1896
698 VISA 아랫글에 대한 질문 입니다. [1] 명관범 2005-03-30 1589
697 [re] VISA 이벤트에 대한 내용 입니다. file 홍동기 2005-03-31 1853
» [re] 몇 VISA 함수의 도움말 [1] 허창원 2005-03-30 2553
695 ring control의 비활성화 박화규 2005-03-30 1674
694 [re] Control의 활성화/비활성화는 이렇게... 허창원 2005-03-30 1474
693 GIF 파일 컨트롤 홍동기 2005-03-29 1520
692 프린터포트 제어 가능여부? 배준호 2005-03-10 1491
691 [re] 프린터 포트 입출력 하시려면 허창원 2005-03-10 1530
690 serial 통신 monitoring [5] 서치영 2005-02-25 1607