File information: | |
File name: | kpcipio_DirectIO_VEE.pdf [preview kpcipio DirectIO VEE] |
Size: | 499 kB |
Extension: | |
Mfg: | Keithley |
Model: | kpcipio DirectIO VEE 🔎 |
Original: | kpcipio DirectIO VEE 🔎 |
Descr: | Keithley KPCI kpcipio_DirectIO_VEE.pdf |
Group: | Electronics > Other |
Uploaded: | 19-11-2019 |
User: | Anonymous |
Multipart: | No multipart |
Information about the files in archive: | ||
Decompress result: | OK | |
Extracted files: | 1 | |
File name kpcipio_DirectIO_VEE.pdf Using the Direct I/O COM API of DriverLINX with Agilent VEE 5.0 DriverLINX drivers for digital I/O boards provides two programming interfaces: 1. Service Request API for hardware independence with other KPCI or PIO boards 2. Direct I/O COM API for simple, fast interaction with the registers of the digital I/O hardware Below is a step by step guide for use of the Direct I/O COM object API. The completed project is also available as an example program in the download center. Step 1: Make sure VEE is set for Standard compatibility mode (in Default Preferences) for support of ActiveX. Then, include a reference to the object: Select ActiveX Automation (not Control) References from the Device menu. The dialog below will be displayed. Scroll down the alphabetical list and place a check in the box for the Keithley KPCI-PIO Direct I/O Library. Step 2: Declare an ActiveX Automation Variable. This will allow VEE to perform type checking later in the code. It does not create an instance of the object. From the menus, select Data|Variable|Declare Variable. The name can be anything that makes sense to you; below it is set to DirectIO. Set the type to object. Check the Specify Object Type box. Notice the object has two classes: KPCIPIO and IHardware. KPCIPIO provides an 8255 interface: a control register and one register for each of three 8-bit digital ports. The IHardware class provides 32-bit register access to the KPCI-PIOxx card. The balance of this application note will refer to the KPCIPIO class only. Select the KPCIPIO class (not the IHardware class). Step 3: Create an object. Click the function and object browser icon to bring up the dialog below. Highlight the three areas shown: Built-in Functions, ActiveX Automation, CreateObject member. Then click the Create Formula button. This will place a function object into the VEE project, however, to use this function to create our object we need to know the object name. A text constant is used to pass KPCIPIO.1 which is the object name of the Direct I/O COM object (from the Windows registry) for the KPCI-PIO24 and KPCI-PIO96 boards. The result terminal of this function will be used will all subsequent function blocks that call a method of the object. Step 4: Use the methods of the object. Again, click the function and object browser icon to bring up the dialog below. Highlight the four areas shown: ActiveX Objects, KPCIPIO class and the OpenDevice member. Then click the Create Formula button. The screen shot below shows the OpenDevice function block in the VEE project. The output of the CreateObject function is wired to this function. This OpenDevice method also requires a device number parameter. This device number corresponds to the device number assigned in the DriverLINX Configuration Panel. Device Number can be any value between 0 and 5 (default is 0). To complete the program, the read and write methods of the object would be used to configure the ports for input or output direction and to |
Date | User | Rating | Comment |