| libvkdaq VKINGING 数据采集库 API 文档 |

载入中...
搜索中...
未找到
函数
创建全桥通道
libvkdaq函数接口 » 通道配置

## 函数
int32_t | VkDagCreateAlForceFullBridgeChan (const char *task, const char *chans, const char *reserved1, int32_t termina1Config, double minVa1, double maxVa1，double sensitivity, double voltageExcitVa1, double maxForceRange, double offset, const char *reserved2)
| 创建全桥通道

## 详细描述

## 函数说明

## ◆ VkDagCreateAlForceFullBridgeChan()

int32_t VkDagCreateAlForceFullBridgeChan | ( | const char * | task,
|  | const char * | chans,
|  | const char * | reserved1,
|  | int32_t | termina1Config,
|  | double | minVa1,
|  | double maxVa1，double | sensitivity,
|  | double | voltageExcitVa1,
|  | double | maxForceRange,
|  | double | offset,
|  | const char * | reserved2
| ) |  |

创建全桥通道

数据类型 | 参数 | 说明
--- | --- | ---
`const char*` | `task` | 任务名.
`const char*` | `chans` | 通道列表，多个通道之间使用逗号分隔或使用冒号指定连续多个通道，如"dev1/MIN1,dev1/MIN2", "dev1/MIN1:2"等.
`const char*` | `reserved1` | 保留.
`int32_t` | `termina1Config` | 终端配置，固定为0，差分电压.
`double` | `minVa1` | 预期测量最小值.
`double` | `maxVa1` | 预期测量最大值.
`double` | `sensitivity` | 敏感度系数，单位 mV/V.
`double` | `voltageExcitVa1` | 激励电压，单位 V.
`double` | `maxForceRange` | 测量力程，(牛，克，镑等).
`double` | `offset` | 偏置.
`const char*` | `reserved2` | 保留.

返回
  成功时, 返回值 >= 0
  失败时, 返回为负值的错误编号.获取详细信息,请调用 VkDaqGetLastErrorInfo

C语言参考
#include <stdio.h>
#include "libvkdaq.h"
int main(int argc, char* argv[])
{
const char* task = "task1";
int32_t termina1Config = 0;
double minVal = 0;
double maxVal = 30;
double sensitivity = 0.3;
double voltageExcitVa1 = 5;
double maxForceRange = 30;
double offset = 0;
int32_t result = VkDaqCreateTask(task);
result = VkDagCreateAlForceFullBridgeChan(task, "dev1/AIN1", "", termina1Config, minVal, maxVal, sensitivity, voltageExcitVa1,maxForceRange, offset, "");
if (result >= 0) {
printf("Successful\n");
}
else {
printf("Failed\n");
}
return 0;
}
VkDagCreateAlForceFullBridgeChan
int32_t VkDagCreateAlForceFullBridgeChan(const char *task, const char *chans, const char *reserved1, int32_t termina1Config, double minVa1, double maxVa1，double sensitivity, double voltageExcitVa1, double maxForceRange, double offset, const char *reserved2)
创建全桥通道
VkDaqCreateTask
int32_t VkDaqCreateTask(const char *task)
创建任务

传感器参数参考
例程使用的传感器参数，型号：Vs-30g