Use DAQmx Counter Input to Trigger VISA Serial Acquisition

제품 및 환경

이 섹션은 예제 생성에 사용된 제품과 OS를 표시합니다.

아래의 제품을 비롯한 NI 소프트웨어를 다운로드하시려면 ni.com/downloads를 방문하십시오.

    하드웨어

  • Data Acquisition (DAQ)
  • Other

    소프트웨어

  • LabVIEW

    드라이버

  • NI DAQmx
  • NI VISA

코드 및 문서

첨부파일

모두 다운로드

Overview

This example uses a counter input to trigger a serial acquisition. When the counter detects a digital event, the specified string command is written to the serial port and a serial read is executed.

Description

Serial commands are typically software-timed, sent every iteration of a loop.  By importing a sample clock, the serial commands can be synchronized with external acquisitions based on hardware timing.  Each time the external sample clock strikes, an event is registered and each event triggers a serial acquisition.

Requirements

Software

  • LabVIEW 8.6 or compatible
  • NI-VISA driver compatible with the version of LabVIEW
  • NI-DAQmx 8.7.2 or compatible

Hardware

Steps to Implement or Execute Code

  1. Configure the physical channel, source of events, and VISA resource on the front panel
  2. Configure the serial parameters on the front panel to match the serial parameters of your device
  3. Specify the VISA command to be written in the string to write control on the front panel
  4. Run the VI
  5. Observe the  events received, bytes read, and the read string on the front panel

Additional Information or References


Block Diagram

GenEventExtSerial.png

**This document has been updated to meet the current required format for the NI Code Exchange.**

A_Ryan
AES
National Instruments

NI 커뮤니티에 있는 예제 코드 교환의 예제 코드는 MIT 라이센스로 라이센스가 부여됩니다.

의견
Todd S.
NI Employee (retired)
날짜

Great stuff!

Todd S.
LabVIEW Community Manager
National Instruments
기여자