Measurement Studio for Visual Basic SupportComponentWorks 3.0 FeaturesThe new features for ComponentWorks 3.0 include:
The DAQ controls include enhancements to support named digital channels, the 6533 family of devices, the 660x family of counter/timer devices, and continuous buffered counter operations. CWDIO Now Supports Named Digital Channels In the ComponentWorks property pages, you can now enter a comma separated list of channel names in Channel String. Or, if you want to specify channels programatically, use a comma separated list of channel names with the ChannelString property. Use National Instruments Measurement & Automation Explorer to specify all parameters concerning a digital channel such as a port or specific line, direction, and inversion. You then assign a simple name to the channel. Using this name, you can easily specify your channel in the CWDIO control. This greatly simplifies operations and development in systems where you configure a larger amount of hardware once and then write a number of different applications to the same physical system. You can read or write single channel objects or all configured channels the same way you would read or write to hardware ports or lines: 'Read from all channels CWDIO1.SingleRead 'Read from the first channel name CWDIO1.Channels(1).SingleRead Set the channel string to "" and select a valid device to access the hardware ports on the board. You can use the ChannelString property to enter SCXI channel string. Although the SCXIChannelString property will still work for specifying SCXI Digital Modules, use the more flexible ChannelString property in your new programs. New Features for the 6533 Family of Devices The CWDIO object has a WiredORMap property that specifies whether each line in the port is tri-state enabled or not. If a bit is 0 in the line map, the line is pulled up by a pull-up resistor. If a bit is 1, the line is not pulled up, therefore allowing a tri-state output. Set WiredORMap to -1 to make all the lines in a port tri-state enabled. Set WiredORMap to 0 to make all the lines in a port pulled up. The WiredORMap property is initially 0. Note: If you are using channel names or devices other than a 6533, WiredORMap is not used and is ignored. CWDI and CWDO handshaking controls have the following new properties: AckReqExchange and ClockReverse. New Support for the 660x Family of Counter/Timer Devices All devices with NI-TIO counter timer chips are now recognized, and they will perform counting and pulse generation operations. Position and TwoEdgeSeparation measurements are now supported. New properties: General Properties for the 660x Family of Devices PrescaleFactor, StartTrigger, SynchronousCounting GateFilter, SourceFilter, AuxLineFilter, OutFilter TwoEdgeSeparation Measurement Properties AuxLineSource, AuxLineSignal, and AuxLinePolarity Position Measurement Properties EncoderType, ZIndexActive, ZIndexValue, ZIndexReloadPhase Note: Refer to the 6601/6602 User Manual for information about these new measurement types. New Support for Continuous Buffered Counter Measurements New properties: BufferMode, BufferSize, UseDefaultBufferSize NI-DAQ Issues Before using the ComponentWorks DAQ controls, you must configure your DAQ hardware using National Instruments Measurement & Automation Explorer. You must have NI-DAQ 6.5 or later to take advantage of the new DAQ enhancements. You can download the newest version from the National Instruments Web site at www.ni.com. User Interface Enhancements Integrated DataSocket Connectivity ComponentWorks User Interface controls have built-in direct connectivity to OPC and live Internet data sources. The User Interface controls take advantage of integrated DataSocket technology to connect to data sources, and you can make these connections through interactive property pages--without programming. All user interface controls contain a new Bindings property page that allows you to directly connect any property of the control to a variety of data sources, such as OPC items or items on a DataSocket server through integrated DataSocket connectivity. You can connect the property in either read mode (reading the property from a data source) or write mode (writing the property value to a data target). You can graphically select the data item to connect to and even test your bindings from the property page, or you can create these bindings programmatically with the new CWBindings property. CWBindingStatusUpdated and CWBindingDataUpdated are new events to help you monitor and control data connections. Use CWBindingStatusUpdated to closely monitor the status of your data connection, and CWBindingDataUpdated to alter the values of the data as it changes. Dynamic Color Substitution to Metafiles You can perform dynamic color substitution in Windows metafiles when the metafile is the background image (or the on and off image for the CWButton control) for the CWButton, CWKnob, CWSlide, and CWGraph controls. After loading the metafile image, use the Color, Substitute, SubstituteColor, and Tolerance properties to dynamically substitute the color specified by Color with the color specified by SubstituteColor. Use the FlipH and FlipV properties to flip the image horizontally or vertically. Note: The FlipH and FlipV properties are not supported on Win9x machines. 3D Graph Enhancements The 3D Graph control has two new enhancements: Use the CWGraph3D.ClipData property to clip data to the axis range. HiddenLine and SurfaceLine plot styles draw faster. GPIB and Serial Enhancements The CWGPIB control has the following new properties: The CWSerial control has the following new properties: The CWSerial control has the following new methods: DataSocket Enhancements DataSocket has a simple interface through which it can now connect to and browse OPC servers, such as National Instruments FieldPoint, to help you easily connect your applications to PLCs, RTUs, or other external devices or modules. You can graphically browse for data items on DataSocket servers from remote machines. Note: To enable graphical browsing of OPC, DataSocket, and file servers in your Visual Basic programs, use the SelectURL method. Use the CWData.GetAttributeNames method to view the attributes on a CWData object. DataSocket now supports write access to FTP data targets. IVI Controls ComponentWorks offers two new ActiveX controls--CWIviScope and CWIviDMM--to provide a more VB-friendly programming interface than using just instrument driver DLLs. These IVI controls feature The controls offer 3 different user interface modes: Invisible at Runtime, Display Only, and Allow Control. In the Invisible at Runtime mode, the control has the same programmatic interface as the other modes, but the control does not have any display at runtime. In Display Only mode, the control is displayed as an instrument display, showing current instrument settings and readings; it will not, however, allow for user control of the instrument (other than those things done programmatically by the developer). In Allow Control mode, the control acts as a complete soft front panel. It allows for both instrument display and also instrument control through familiar knobs and buttons. Use the UIStyle property to programmatically set the interface style or select the display style interactively in the property pages as you design your program. All of the instrument settings are stored as properties on the CWIvi controls. Any changes made to a property are held local to the control until the Configure method is called, at which time the properties are "locked in" to the instrument driver and instrument hardware. Most often, you will set the instrument configuration during design through the property pages, and call Configure during runtime before calling any other methods, such as Read. If you need to change the instrument configuration, set the associated properties and call Configure again. The CWIvi controls manage all session handles, so you don't need to call Init or CloseSession. Another new control--CWIviTools--provides application helper functions, direct attribute access, and other utility functions. IVI Issues The ComponentWorks IVI controls use version 2.0 of the IVI class specifications. Most existing instrument drivers have not yet been converted to the new specification, but should be during or shortly after this release. If you have an instrument that uses an existing IVI instrument driver, it will likely not work with these controls. When you first access the instrument driver, it will alert you if you are using an invalid specific driver. This release includes one instrument driver for each of the 2 supported classes: for the DMM, the HP34420a; for the scope, the HP 456xx. If you do not have one of these instruments, you can still use the instrument drivers in simulation mode, which is enabled by default in National Instruments Measurement & Automation Explorer. Borland Delphi and C++ Builder do not support the ComponentWorks IVI ActiveX controls because the controls were developed in Visual Basic (that is, Delphi and C++ Builder do not support ActiveX controls developed with Visual Basic). Instrument Driver Factory The Instrument Driver Factory (IDF) is a wizard that automates LabWindows/CVI to create instrument driver DLLs from C source code. You can launch the IDF as a standalone application or as an add-in in Visual Basic, but you must have LabWindows/CVI installed on your computer. To use the generated DLLs in Visual Basic, add a project reference to them. They come complete with context-sensitive WinHelp files. Context-Sensitive Help in Property Pages The ComponentWorks User Interface, 3D Graph, Data Acquisition, GPIB, Serial, and VISA property pages now offer context-sensitive help. If you need help setting properties in any of these property pages, right click on the property or option and select What's This? for information about the property or option, valid values, and related properties or options. Alternatively, you can press the ? icon in the upper-right corner of the property pages and click on any property or option for the same pop-up information. |
