Labview中CLN函数配置问题

2019-07-17 23:05发布

labview编程过程中,需要通过CLN调用C语言中的DLL函数,函数定义如下:
--------------------------------------------------------------------------------------------------------short CVICDECL PMS_read_data(shortmod_no, unsigned long * points_read, unsigned short from, unsigned short to,unsigned long * A_buf, unsigned long * B_buf);--------------------------------------------------------------------------------------------------------Input parameters:     mod_no                     module number (0 - 7)     * points_read            pointer to variable which will beset with number of read points     from                          1st address to read (0- 65535)     to                               last address to read ( from  - 65535)     * A_buf                    pointer to data buffer to befilled with channel A data     * B_buf                     pointer to data buffer tobe filled with channel B dataReturn value:                 0  no errors, <0     error code (see pms_def.h)在利用C语言编程调用PMS_read_data函数前对A_buf和B_buf的定义为:unsigned long  *A_buf, *B_buf,且需要给A_buf和B_buf开辟空间(因为A_buf和B_buf中需要存十几个数):A_buf=(unsigned long *)calloc(block_length,  sizeof(unsigned long));
B_buf=(unsigned long *)calloc(block_length,  sizeof(unsigned long));然后才能调用:PMS_read_data(mod_no, &points_read, start_pt, stop_pt, A_buf, B_buf);那么当我用CLN调用PMS_read_data函数时,A_buf和B_buf和配置参数该如何设置?在数据类型选项中应该选择数值型?还是应该选择数组型呢?请给位大神指导

QQ截图20160526202651.png
QQ截图20160526201622.png
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
1条回答
pptpptppt
1楼-- · 2019-07-18 03:30
问题已解决,函数具体配置如下图所示
2.PNG
4.PNG

一周热门 更多>