천객만래 [千客萬來] (It has an interminable succession of visitors)

NI-DAQmx 설치시 함께 설치되는 

MAX(Measuremnet & Automation Explorer) 버전 정보



Driver VersionMAX Version
NI-DAQ 7.0MAX 3.0
NI-DAQ 7.0.1MAX 3.0.1
NI-DAQ 7.1MAX 3.0.2
NI-DAQ 7.2MAX 3.1
NI-DAQ 7.3MAX 3.1
NI-DAQ 7.4MAX 3.1.1
Traditional NI-DAQ (Legacy) 7.4.1MAX 4.0
Traditional NI-DAQ (Legacy) 7.4.4MAX 4.2
NI-DAQmx 7.5MAX 3.1.1
NI-DAQmx 8.0MAX 4.0
NI-DAQmx 8.0.1MAX 4.0
NI-DAQmx 8.1MAX 4.0
NI-DAQmx 8.3MAX 4.1
NI-DAQmx 8.3.1MAX 4.1
NI-DAQmx 8.5MAX 4.2
NI-DAQmx 8.6MAX 4.3
NI-DAQmx 8.6.1MAX 4.3
NI-DAQmx 8.7.1MAX 4.4.1
NI-DAQmx 8.7.2MAX 4.4.1
NI-DAQmx 8.8MAX 4.5
NI-DAQmx 8.9MAX 4.5
NI-DAQmx 8.9.5MAX 4.6
NI-DAQmx 9.0MAX 4.6.1
NI-DAQmx 9.0.1MAX 4.6.1
NI-DAQmx 9.0.2MAX 4.6.1
NI-DAQmx 9.1MAX 4.6.2
NI-DAQmx 9.1.1MAX 4.6.2
NI-DAQmx 9.1.5MAX 4.7
NI-DAQmx 9.1.6MAX 4.7
NI-DAQmx 9.1.7MAX 4.7
NI-DAQmx 9.2MAX 4.7.1
NI-DAQmx 9.2.1MAX 4.7.1
NI-DAQmx 9.2.2MAX 4.7.1
NI-DAQmx 9.2.3MAX 4.7.4
NI-DAQmx 9.3MAX 4.8
NI-DAQmx 9.4MAX 5.0
NI-DAQmx 9.5MAX 5.1
NI-DAQmx 9.5.1MAX 5.1
NI-DAQmx 9.5.5MAX 5.3.1
NI-DAQmx 9.6MAX 5.3.1
NI-DAQmx 9.6.1MAX 5.3.1
NI-DAQmx 9.7MAX 5.4
NI-DAQmx 9.7.5MAX 5.5
NI-DAQmx 9.8MAX 5.5
NI-DAQmx 9.9MAX 5.6
NI-DAQmx 14.0MAX 14.0
NI-DAQmx 14.1MAX 14.0
NI-DAQmx 14.2MAX 14.0
NI-DAQmx 14.5MAX 14.5
NI-DAQmx 14.5.1MAX 14.5
NI-DAQmx 15.0MAX 15.0

Note: The higher versions of MAX will always support the lower versions of NI-DAQmx.




Posted by SB패밀리

NI DAQ 에서 Digital 신호 전송시 Timing 설정



아래의 예제는 NI DAQ에서 제공하는 C 예제이다.

Digital Output 신호를 전송하기 위한 예제인데

여기에서 

DAQmxCreateDOChan()

//...

DAQmxWriteDigitalLines() 


의 두 함수를 사용하는데 있어서. 

DAQ 디바이스에서 DO신호처리시에는 sample에 대한 timeout clock을 필요로 하지 않고

on demand 형식으로 전송하고 있다.


만약 DAQmxCreateDOChan()함수를 사용하여 아래와 같은 에러가 발생하였다면


DAQmx Error: Requested value is not a supported value for this property. The property value may be invalide because it conflicts with another property.

Property: DAQmx_SampTimingType

Requested Valeu: DAQmx_Val_SampClk

You Can Select: DAQmx_Val_OnDemand

 

Task Name: _unnamedTask<0>

 

Status Code: -200077



WriteDigChan.c 소스를 참조하자.

아, 그리고 한가지더... starttask는 autostart로 옵션을 줘야한다는 것을 잊지 말자.





/*********************************************************************

*

* ANSI C Example program:

*    WriteDigChan.c

*

* Example Category:

*    DO

*

* Description:

*    This example demonstrates how to write values to a digital

*    output channel.

*

* Instructions for Running:

*    1. Select the digital lines on the DAQ device to be written.

*    2. Select a value to write.

*    Note: The array is sized for 8 lines, if using a different

*          amount of lines, change the number of elements in the

*          array to equal the number of lines chosen.

*

* Steps:

*    1. Create a task.

*    2. Create a Digital Output channel. Use one channel for all

*       lines.

*    3. Call the Start function to start the task.

*    4. Write the digital Boolean array data. This write function

*       writes a single sample of digital data on demand, so no

*       timeout is necessary.

*    5. Call the Clear Task function to clear the Task.

*    6. Display an error if any.

*

* I/O Connections Overview:

*    Make sure your signal output terminals match the Lines I/O

*    Control. In this case wire the item to receive the signal to the

*    first eight digital lines on your DAQ Device.

*

*********************************************************************/


#include <stdio.h>

#include <NIDAQmx.h>


#define DAQmxErrChk(functionCall) if( DAQmxFailed(error=(functionCall)) ) goto Error; else


int main(void)

{

int32       error=0;

TaskHandle  taskHandle=0;

uInt8       data[8]={0,1,0,1,1,1,1,1};

char        errBuff[2048]={'\0'};


/*********************************************/

// DAQmx Configure Code

/*********************************************/

DAQmxErrChk (DAQmxCreateTask("",&taskHandle));

DAQmxErrChk (DAQmxCreateDOChan(taskHandle,"Dev1/port0/line0:7","",DAQmx_Val_ChanForAllLines));


/*********************************************/

// DAQmx Start Code

/*********************************************/

DAQmxErrChk (DAQmxStartTask(taskHandle));


/*********************************************/

// DAQmx Write Code

/*********************************************/

DAQmxErrChk (DAQmxWriteDigitalLines(taskHandle,1,1,10.0,DAQmx_Val_GroupByChannel,data,NULL,NULL));


Error:

if( DAQmxFailed(error) )

DAQmxGetExtendedErrorInfo(errBuff,2048);

if( taskHandle!=0 ) {

/*********************************************/

// DAQmx Stop Code

/*********************************************/

DAQmxStopTask(taskHandle);

DAQmxClearTask(taskHandle);

}

if( DAQmxFailed(error) )

printf("DAQmx Error: %s\n",errBuff);

printf("End of program, press Enter key to quit\n");

getchar();

return 0;

}


Posted by SB패밀리