The GXCNT package supplies a separate ATEasy driver for the PXI counters. The ATEasy driver uses the same GXCNT.DLL to program the board for all development environments. In addition, there is an example project that contains a program and a system file pre-configured with the ATEasy driver. Use the property dialog to change the driver shortcut property in the System Drivers sub-module and change the PCI slot number to reflect your current installation before running the example.
The ATEasy driver plain-languages commands are easier to use than using the DLL functions directly. The driver commands will generate an exception if the function call fails. That allows the ATEasy application to trap errors without directly checking the status code returned by the DLL function. The driver commands check the status parameter after each function call.
The ATEasy driver contains commands that are similar to the DLL functions in name and parameters, with the following exceptions:
The driver handles the nHandle parameter automatically. ATEasy handles board instances as driver logical names i.e. CNT1, CNT2 for GC2200/GTX2200. Direct access to the parameter is possible using the property operator (the “dot” operator) once the parameter is set public in the ATEasy driver.
The driver handles the nStatus parameter automatically. The Get Status command in the ATEasy Driver provides access to the board’s status. After calling a DLL function, the ATEasy driver will check the returned status and will call the CheckError procedure. An error status generates an exception that can be easily trapped by the application using the OnError module event or using the try-catch statement. ATEasy will notify the user or developer with an error dialog if the condition is not handled by other ATEasy code. Direct access to the parameter is possible using the property operator (the “dot” operator) once the parameter is set public in the ATEasy driver.
Some ATEasy drivers contain additional commands to permit easier access to the board features. For example, parameters for a function may be omitted by using a command item instead of typing the parameter value. The plain-language commands are self-documenting. Their syntax is similar to an English language statement. In addition, you can use the commands from the code editor context menu or by using the ATEasy’s code completion feature instead of typing them directly.