| libvkdaq VKINGING DAQ Library API Reference |

Loading...
Searching...
No Matches
Functions
Create DAC channel
libvkdaq Function interface » Channel configuration

## Functions
int32_t | VkDaqCreateAOVoltageChan (const char *task, const char *chans, const char *reserved1, double minVal, double maxVal, int32_t units, const char *reserved2)
| Create DAC channel.

## Detailed Description

## Function Documentation

## ◆ VkDaqCreateAOVoltageChan()

int32_t VkDaqCreateAOVoltageChan | ( | const char * | task,
|  | const char * | chans,
|  | const char * | reserved1,
|  | double | minVal,
|  | double | maxVal,
|  | int32_t | units,
|  | const char * | reserved2
| ) |  |

Create DAC channel.

data type | parameter | describe
--- | --- | ---
`const char*` | `task` | Task name.
`const char*` | `chans` | Channel list, Use commas to separate multiple channels or use colons to specify multiple channels in a row., such as "dev1/AOUT1,dev1/AOUT2", "dev1/AOUT1:2", etc.
`const char*` | `reserved1` | Reserved.
`double` | `minVal` | Minimum voltage value.
`double` | `maxVal` | Maximum voltage value.
`const char*` | `source` | Voltage unit.
`const char*` | `reserved2` | Reserved.

Returns
  On success, return value >= 0.
  On failure, returns a negative error number.For detail, please Call VkDaqGetLastErrorInfo

C language reference
#include <stdio.h>
#include "libvkdaq.h"
int main(int argc, char* argv[])
{
const char* task = "task1";
const char* source = "VirtualCounter";
int32_t maxVal = 4294967295;
int32_t result = VkDaqCreateTask(task);
result = VkDaqCreateAOVoltageChan(task, "dev1/AOUT1", "", -9, 9, VkDaq_Val_Volts, "");
if (result >= 0) {
printf("Successful\n");
}
else {
printf("Failed\n");
}
return 0;
}
VkDaqCreateAOVoltageChan
int32_t VkDaqCreateAOVoltageChan(const char *task, const char *chans, const char *reserved1, double minVal, double maxVal, int32_t units, const char *reserved2)
Create DAC channel.
VkDaqCreateTask
int32_t VkDaqCreateTask(const char *task)
Create task.