找回密码
 注册
搜索
查看: 2085|回复: 10

[ARM资料] USB转SDI-12总线上位机测试程序及相关资料

[复制链接]
发表于 2014-9-3 16:59:32 | 显示全部楼层 |阅读模式
利用纬图的Ginkgo USB-SDI12适配器可以很容易的实现对SDI-12总线设备进行控制,下面就以实际程序来简单说明下。
C/C++程序如下:

1.        // SDI12_Test.cpp : Defines the entry point for the console application.
2.        //
3.       
4.        #include "stdafx.h"
5.        #include "ControlSDI.h"
6.       
7.       
8.        int _tmain(int argc, _TCHAR* argv[])
9.        {
10.                int ret,i;
11.                uint8_t        read_buffer[512]={0};
12.                uint8_t        respond_buffer[512]={0};
13.                //扫描已经连接的设备
14.                ret = SDI_ScanDevice(1);
15.                if(ret <= 0){
16.                        printf("No device connect!\n");
17.                        return ret;
18.                }
19.            //打开设备
20.            ret = SDI_OpenDevice(SDI_USBSDI, 0, 0);
21.            if (ret != ERR_SUCCESS){
22.                printf("Open device error!\n");
23.                return ret;
24.            }
25.                //初始化SDI12模块
26.                ret = SDI_InitSDI(SDI_USBSDI, 0, 1);
27.            if (ret != ERR_SUCCESS){
28.                printf("Initialize SDI-12 error!\n");
29.                return ret;
30.            }
31.                //发送命令
32.                printf("Please input SDI-12 command(end of '!')!\n");
33.                while(1){
34.                        memset(read_buffer,0,sizeof(read_buffer));
35.                        scanf("%s",read_buffer);
36.                        ret = SDI_SendCmd(SDI_USBSDI,0,1,read_buffer,respond_buffer);
37.                        if(ret == ERR_SUCCESS){
38.                                printf("%s",(char *)respond_buffer);
39.                        }else{
40.                                printf("Excute command error!\n");
41.                        }
42.                }
43.                return 0;
44.        }
45.       
46.       
使用Ginkgo USB-SDI12适配器基本步骤为:
扫描设备->打开设备->初始化设备->读写数据

程序运行效果如下:


其中以‘!’结尾的是我们输入的控制命令字符串,下面一行是设备返回的字符串。


程序工程源码(vs2010):
SDI-12总线协议英文版:
SDI-12总线协议中文版:

USB转SDI-12总线上位机测试程序及相关资料
http://www.viewtool.com/bbs/forum.php?mod=viewthread&tid=5114&fromuid=18207


www.viewtool.com
 楼主| 发表于 2014-9-13 17:49:37 | 显示全部楼层
USB转SDI-12总线上位机测试程序及相关资料
点评回复

使用道具 举报

 楼主| 发表于 2014-9-23 16:28:11 | 显示全部楼层
USB转SDI-12总线上位机测试程序及相关资料
点评回复

使用道具 举报

 楼主| 发表于 2014-10-9 16:38:25 | 显示全部楼层
USB转SDI-12总线上位机测试程序及相关资料
点评回复

使用道具 举报

 楼主| 发表于 2014-10-24 16:25:00 | 显示全部楼层
USB转SDI-12总线上位机测试程序及相关资料
点评回复

使用道具 举报

 楼主| 发表于 2014-11-3 15:59:49 | 显示全部楼层
[em01] [em01] [em01]
点评回复

使用道具 举报

 楼主| 发表于 2014-11-10 11:59:01 | 显示全部楼层
利用纬图的Ginkgo USB-SDI12适配器可以很容易的实现对SDI-12总线设备进行控制

www.viewtool.com
点评回复

使用道具 举报

 楼主| 发表于 2014-11-20 11:34:30 | 显示全部楼层
Ginkgo USB-SDI12适配器

viewtool.taobao.com
点评回复

使用道具 举报

 楼主| 发表于 2014-12-16 15:51:01 | 显示全部楼层
                   顶一个
点评回复

使用道具 举报

 楼主| 发表于 2015-1-19 14:55:22 | 显示全部楼层
[em27][em22][em22]
点评回复

使用道具 举报

 楼主| 发表于 2017-11-20 13:28:23 | 显示全部楼层
[em02][em02][em02]
点评回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-5-19 10:31 , Processed in 0.050552 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表