ÇнÀ¸ñÇ¥    1

ÇнÀÁÖÁ¦    1

¿¹½À³»¿ë    1

½Ç½À¹æ¹ý    1

°ú    Á¦    1

Áß¿äÇÔ¼ö    1

¾Æ³ª·Î±× Ãâ·Â

ÇнÀ¸ñÇ¥

¾Æ³ª·Î±× Ãâ·ÂÀ» ¾Ë¾Æ º¸°í ÀÀ¿ëÇÑ´Ù.

ÇнÀÁÖÁ¦

6024E º¸µå¿¡´Â ACH0~15 ±îÁö 16°³ÀÇ ¾Æ³ª·Î±× Ãâ·Â Æ÷Æ®°¡ ÀÖ´Ù. À̸¦ Á¦¾î ÇÏ´Â ÇÔ¼ö¸¦ ¾Ë¾Æº¸°í ÀÀ¿ëÇÑ´Ù.

¿¹½À³»¿ë

1.        ACH0~15, AIGND Æ÷Æ®¸¦ ¾Ë¾Æº»´Ù.

2.        AO_VWrite(iDevice, iChan, dVoltage1); ÇÔ¼ö¿Í ±× º¯¼ö¸¦ ¾Ë¾Æº»´Ù.

3.        »ï»ö LED·Î ¸¸µç Á¦Ç°À» »ìÆì º»´Ù.

http://www.led.com/   http://www.led.co.kr/

    http://www.sign-board.com/     http://jeiladcom.co.kr/   http://www.seoulsemicon.co.kr/

 http://www.kwangled.co.kr/

½Ç½À¹æ¹ý

¸ñ    Â÷

¾Æ·¡ ±×¸²Àº »ï»ö LEDÀÌ´Ù. ºÎ°úµÇ´Â Àü¾Ð¿¡ µû¶ó ³ì»ö°ú Àû»öÀÇ È¥ÇÕµÈ »öÀÌ ¹ß»ýÇÑ´Ù.

1:³ì»ö 2:Á¢Áö 3:Àû»ö

 

1. ¾Æ³ª·Î±× Àü¾ÐÀÇ Ãâ·Â

´ÙÀ½Àº Űº¸µå¸¦ Çѹø Ä¡¸é 2.5V(dVoltage1)°¡ Ãâ·ÂÇÏ°í ¶ÇÇѹø Ä¡¸é 0V(dVoltage2)°¡ Ãâ·ÂµÇ´Â ÇÁ·Î±×·¥ÀÌ´Ù.

¿¹Á¦1

#include "stdafx.h"

#include "nidaqex.h"

 

int main(int argc, char* argv[])

{

i16 iDevice = 1;

    i16 iChan = 0;

    f64 dVoltage1 = 2.5;

    f64 dVoltage2 = 0.0;

   

    /* 'dVoltage1' Ãâ·Â */

    printf(" ¾Æ¹«Å°³ª Ä¡¸é %lf volt°¡ Ãâ·Â µË´Ï´Ù.\n", dVoltage1);

NIDAQWaitForKey(0.0);

AO_VWrite(iDevice, iChan, dVoltage1);

 

    /* 'dVoltage2' Ãâ·Â */

    printf(" ¾Æ¹«Å°³ª Ä¡¸é %lf volt°¡ Ãâ·Â µË´Ï´Ù.\n", dVoltage2);

NIDAQWaitForKey(0.0);

AO_VWrite(iDevice, iChan, dVoltage2);

 

return 0;

}

2. ¿¬¼ÓÀûÀÎ ¾Æ³ª·Î±× Ãâ·Â

´ÙÀ½Àº 0~5V±îÁö ÀÚµ¿À¸·Î Ãâ·ÂÇÏ´Â ÇÁ·Î±×·¥ÀÌ´Ù. À̸¦ ¿À½Ç·Î½ºÄÚÇÁ·Î È®ÀÎ ÇϽÿÀ.

¿¹Á¦2

#include "stdafx.h"

#include "nidaqex.h"

 

int main(int argc, char* argv[])

{

i16 iDevice = 1;

    i16 iChan = 0;

    f64 dVoltage = 0.0;

   

    for(dVoltage=0.; dVoltage<=5;dVoltage=dVoltage+0.2) {

              printf(" %lf volt°¡ Ãâ·Â µË´Ï´Ù.\n", dVoltage);

              AO_VWrite(iDevice, iChan, dVoltage);

              NIDAQDelay(0.5);

}

    return 0;

}

2. ¾Æ³ª·Î±× Ãâ·Â°ú »ï»öLED µ¿ÀÛ

¾Æ·¡´Â 0¿¡¼­ 5V±îÁö 0.2V °£°ÝÀ¸·Î µ¿ÀÛÇÏ°Ô ÇÑ ÇÁ·Î±×·¥ÀÌ´Ù. À̸¦ ÇØ¼®ÇÏ°í »ï»öLED¸¦ ¿¬°áÇÏ¿© ±× »öÀ» °üÂû ÇϽÿÀ.

¿¹Á¦3

#include "stdafx.h"

#include "nidaqex.h"

 

int main(int argc, char* argv[])

{

i16 iDevice = 1;

    i16 iChan1 = 0, iChan2 = 1;

    f64 dVoltage1 = 0.0, dVoltage2 = 0.0;

   

    // ´ÙÀ½ Ãâ·ÂÀ» ¿À½Ç·Î½ºÄÚÇÁ·Î È®ÀÎ ÇϽÿÀ.

    /* First output 'dVoltage1' volts. */

    for(dVoltage1=1.8; dVoltage1<=5;dVoltage1=dVoltage1+0.2) {

              for(dVoltage2=1.8; dVoltage2<=5;dVoltage2=dVoltage2+0.2) {

           printf(" %lf %lf volt°¡ Ãâ·Â µË´Ï´Ù.\n", dVoltage1, dVoltage2);

                 AO_VWrite(iDevice, iChan1, dVoltage1);

                 AO_VWrite(iDevice, iChan2, dVoltage2);

                 NIDAQDelay(0.1);

              }

}

 

    return 0;

}

óÀ½

°ú    Á¦

¿¹Á¦3À» ÀÀ¿ëÇÏ¿© 2°³ÀÇ ³ëºê¸¦ ¸¸µé°í À̸¦ ³ì»ö°ú Àû»ö ´ÜÀÚ¿¡ ¿¬°áÇÏ¿© »öÀÇ Á¶ÇÕÀ» ¸¸µå½Ã¿À.

Áß¿äÇÔ¼ö

status = AO_VWrite (deviceNumber, chan, voltage)

 

Purpose

 

Accepts a floating-point voltage or current value, scales it to the proper binary number, and writes that number to an analog output or current channel to change the output voltage or current.

 

Parameters

 

Direction  Name      Type        Description

Input       deviceNumber        i16          assigned by Measurement & Automation Explorer

chan       i16          analog output channel number

voltage    f64          floating-point value to be scaled and written

Parameter Discussion

 

chan is the analog output channel number.

 

Range:    0 or 1 for the AO-2DC, Lab and 1200 Series analog output, and MIO devices.

 

0 through 5 for AT-AO-6.

0 through 9 for AT-AO-10.

0 through 49 for the VXI-AO-48XDC.

0 through 15 for 6704 voltage channels.

16 through 31 for 6704 current channels.

0 through 3 for PCI-6711.

0 through 7 for PCI-6713 and DAQCard-6715.

 

voltage is the floating-point value to be scaled and written to the analog output channel. The range depends on the type of device, on the jumpered output polarity, and on whether you apply an external voltage reference.

 

Default ranges (bipolar, internal voltage reference):

MIO device and 671X device:  -10 to +10 V.

AT-AO-6/10:           -10 to +10 V.

Lab and 1200 Series analog output devices:        -5 to +5 V.

Default ranges (unipolar, internal voltage reference):

 

AO-2DC device:      0 to +10 V.

 

If you set the output type to current by calling AO_Change_Parameter, the floating-point value indicates the current in amps, for an AO-2DC device, or milliamps for the VXI-AO-48XDC.

 

Default ranges (unipolar, internal voltage reference):

 

AO-2DC device:      0 to 0.02 A.

VXI-AO-48XDC:      0 to 20.47 mA.

 

Default range for the 6704 devices:

 

Voltage Channels   -10.24 to +10.24 V.

Current Channels    0 to 24.47 mA.

 

Using This Function

 

AO_VWrite scales voltage to a binary value and writes that value to the DAC in the analog output channel. If the analog output channel is configured for immediate update, the output voltage or current changes immediately. Otherwise, the output voltage or current changes when NI-DAQ issues an update command or pulse.

 

If you have changed the output polarity for the analog output channel from the factory setting of bipolar to unipolar, you must call AO_Configure with this information for AO_VWrite to correctly scale the floating-point value to the binary value.

 

You can use AO_VWrite to calibrate the VXI-AO-48XDC. On this device, AO_VWrite writes to channel number 48 affect the voltage or current offset calibration, depending on the output type of this channel as set by the calibration. Additionally, it writes to channel number 49 affect the voltage or current gain calibration, again depending on the output type as set by the AO_Change_Parameter function.