3.1.2.VB

Select the ‘VB’ folder that corresponds to your driver installation (section 3.1.1). You'll find here a full illustration in VB 5.0 (named "EncPciTest") that demonstrates how to use the various functions to communicate with the card. There are two versions: one using the ActiveX control, the other using the DLL. The DLL-based version includes an Eic325PciDll.bas file that contains the Declare’s of all the DLL functions. There are no such Declare’s in the ActiveX control-based version, as the definitions are included in the control itself. At application start the Active property is set to 1, and in the end to 0. The EncPciTest program illustrates all the functions available. It's recommended for any user, not only the VB programmer, to run it. Most of the program is straightforward. Here are some highlights to explain the non- trivial aspects:

To check primary communication with the card, use the "LEDs" frame. The two LEDs on the card should follow your selection.

By definition, the program intends to illustrate the basic functions in order to instruct the programmer code his application. However, to get some better feeling, there's the "Loop" mode that "Clicks" cyclically:

In the Position Counter frame:

ALL in the Req. (=Request) column

A, B, C, D in the Read column

In the I/O frame:

Read in the Chip #1 square

Read in the Chip #2 square

The Active Chip frame:

The required chip is selected automatically upon running any operation. The significance of explicit chip selection by this frame is first to illustrate this operation to the programmer and second to determine on which chip the "Test Active Chip", if clicked, would operate.

The I/O frame is a bit confusing:

The Hardware General Inputs are reflected by the card in its software OUTPUTS.

The Voltage Failure card's software output allows the user to check if there is a short-circuit between the output voltage source and the encoders (the thermal resettable fuse in the card will resume normal operation after the short is ended). Voltage Failure = 1 indicates a short, and the user should be instructed in this case to detach the 44 pin connector, then re-check.

The EventFlags appear in two separate outputs:

Software Outputs

Hardware Outputs

Clicking "Read" reads card's software outputs of the –

Hardware General Inputs

Voltage Failure

Software EventFlags

11

Page 13
Image 13
Omega Engineering EN-EIC-325-PCI manual