Home
Support
如何将Active X的Variant数据转换成一个可以被LABVIEW使用的数据类型?
如何将Active X的Variant数据转换成一个可以被LABVIEW使用的数据类型?
问题: 请问如何将Active X的Variant数据转换为一个可以被LABVIEW使用的数据类型?我如何知道哪种LABVIEW数据类型对Active X Variant数据是有效的?
解答: 视乎你使用的是哪个版本的LabVIEW,有两种不同的VI可以实现:LabVIEW 6.x中的
Variant To Data和LABVIEW 5.x 中的的
To G Data。这两个VI把Active X的Variant数据转换成了可以被LABVIEW使用的数据类型。注意“G”是指“Graphical”程序,而这里所指的就是“LabVIEW”程序。
LabVIEW 6.x
- 使用Functions » Communication » ActiveX函数选板里的Variant To Data函数。
- 给type端连接一个数据类型伪体(dummy data type)(具体值不论)。
- 输出端必须和数据类型伪体的类型一致。
- 要获得关于对Variant数据有效的LabVIEW数据类型,可以右击程序框图上的Variant To Data函数图标,从弹出的快捷菜单里选择Help。参看type输入端的说明。
LabVIEW 5.x:
- 使用Functions » Communication » ActiveX函数选板里的Variant To Data函数。
- 给type端连接一个数据类型伪体(dummy data type)(具体值不论)。
- 输出端G Data必须和数据类型伪体的类型一致。
- To G Data函数的在线帮助中有一个“Table of Valid G Data Types for ActiveX Variant Data”链接。要确定哪些数据类型是相配的,你必须参考你要调用的第三方ActiveX方法的文档。
- 要获取“Table of Valid G Data Types for ActiveX Variant Data”,应该右击程序框图上的To G Data函数图标,从弹出的快捷菜单里选择Help。type输入端的说明中包含一个连到“Table of Valid G Data Types for ActiveX Variant Data”的链接。
相关链接:
附件:
报告日期: 03/03/1998
最近更新: 02/09/2004
文档编号: DIRECT-3S8RM7
Other Support Options
Ask the NI Community
Collaborate with other users in our discussion forums
Request Support from an Engineer
A valid service agreement may be required, and support options vary by country.