Scope
DAQmx::CDAQmxDigitalOutTask Class Reference

#include <DAQmxTask.h>

Inherits DAQmx::CDAQmxTask.

Public Member Functions

void CreateDOChannel (const std::wstring &_devicelines, const std::wstring &_channelname=L"")
 
int32 WriteDigitalU8 (const uInt8 *_data, int32 _sampsperchan, bool _autostart=false, float64 _timeout=2, bool32 _layout=DAQmx_Val_GroupByChannel)
 
int32_t WriteDigitalLines (const uInt8 *_data, int32 _sampsperchan, bool _autostart=false, float64 _timeout=2, bool32 _layout=DAQmx_Val_GroupByChannel)
 
- Public Member Functions inherited from DAQmx::CDAQmxTask
 ~CDAQmxTask (void)
 
void CreateTask (const std::wstring &_name=L"")
 
bool Created () const
 
void ConfigureImplicitTiming (const int32 &_mode, const int32 &_samplesperchan)
 
void ConfigureSampleTiming (const std::wstring &_src, const float64 &_rate, const int32 &_samplesperchan, const int32 &_samplingtype=DAQmx_Val_ContSamps, const int32 &_actedge=DAQmx_Val_Rising)
 
void ConfigureReferenceClock (const std::wstring &_src, const float64 &_rate)
 
void ConfigureDigStartTrigger (const std::wstring &_src, const int32 &_trigedge=DAQmx_Val_Rising)
 
void Start (void)
 
void Stop (void)
 
void Clear (void)
 
bool IsTaskDone (void)
 
int32_t WaitUntilDone (const float64 &_waittime)
 
void ExportSignal (int32 _signal, const std::wstring &_terminal)
 
void SetWriteOffset (int32 posreltofirst)
 
void SetRegeneration (const bool &_regenerate)
 

Additional Inherited Members

- Protected Attributes inherited from DAQmx::CDAQmxTask
TaskHandle task_handle
 

Detailed Description

Wraps a DAQmx Digital Output task.

Definition at line 224 of file DAQmxTask.h.

Member Function Documentation

void DAQmx::CDAQmxDigitalOutTask::CreateDOChannel ( const std::wstring &  _devicelines,
const std::wstring &  _channelname = L"" 
)

Creates a digital output channel.

The task uses one channel for each line.

Parameters
[in]_devicelinesstring with the device output lines to use
[in]_channelnamename of the task

Definition at line 270 of file DAQmxTask.cpp.

int32 DAQmx::CDAQmxDigitalOutTask::WriteDigitalU8 ( const uInt8 *  _data,
int32  _sampsperchan,
bool  _autostart = false,
float64  _timeout = 2,
bool32  _layout = DAQmx_Val_GroupByChannel 
)

Writes to an 8 bit digital output port, lowest bit is line0, highest bit is line7.

Parameters
[in]_datapointer to a uint8 array
[in]_sampsperchannumber of samples per channel to be written.
[in]_autostarttrue if task should be automatically started after write to buffer
[in]_timeouthow long to wait for the write to the buffer to happen, in seconds
[in]_layoutdata layout to use
  • DAQmx_Val_GroupByChannel by channel (AAAAABBBBBCCCCC)
  • DAQmx_Val_GroupByScanNumber by sample (ABCABCABCABCABC)

Definition at line 284 of file DAQmxTask.cpp.

int32_t DAQmx::CDAQmxDigitalOutTask::WriteDigitalLines ( const uInt8 *  _data,
int32  _sampsperchan,
bool  _autostart = false,
float64  _timeout = 2,
bool32  _layout = DAQmx_Val_GroupByChannel 
)

Writes to up to 8 digital lines (in one port, I suppose), depending on which lines are configured into the channel.

Parameters
[in]_datapointer to a uint8 array
[in]_sampsperchannumber of samples per channel to be written.
[in]_autostarttrue if task should be automatically started after write to buffer
[in]_timeouthow long to wait for the write to the buffer to happen, in seconds
[in]_layoutdata layout to use
  • DAQmx_Val_GroupByChannel by channel (AAAAABBBBBCCCCC)
  • DAQmx_Val_GroupByScanNumber by sample (ABCABCABCABCABC)

Definition at line 296 of file DAQmxTask.cpp.


The documentation for this class was generated from the following files: