Using a Sealevel Digital I/O Card With VEE:
It is very easy to use any Sealevel Digital I/O card with VEE. Install the card as per the
directions in SeaIO.hlp or your manual, and use the "SeaIO Devices" in the
control panel to find out what the *card number is for the device that is installed.
First lets add the ActiveIO control to the activex controls area. Click on Device option
on the bar and then click ActiveX Control References. Selected the ActiveIO ActiveX
Control Module and then click ok. Now that it is added to menu we can select it by
clicking on the Device/ActiveX Controls menu then selecting ActiveIo_Device. Now place the
control in the work area. If you select the device menu then click on Function &
Object Browser it will bring up a dialog box where you may select members from the list on
the right. This is how we will control our ActiveIo_Device. Lets select the deviceNumber
property and place on the work area. In the text area of this box add this to the end of
the line " = X". X will be the integer value of the *card you want to control.
Lets go back to the Function & Object Browser and this time select the readbit method
and add it to the work area. We will need two data constants to use as inputs to the
readbit object. Click the Data option on the main menu and then select the Constant
option. Add two Int32 to the work area. Connect one to each of the input pins on the
readbit object. The top int32 will be the number of the bit to read and the bottom will be
the mode to read in.
See you manual for more information on modes.
For the demonstration lets change the value of the int32 boxes to one. Now we need a way
to view the data we are going to read. Lets add a AlphaNumeric control to view the data.
Click on display the select the alphanumeric control and add it to the work area. Now
connect the result output terminal of the readbit method to the input terminal on the
alphanumeric control. Let add a start button to control the program. Click on the flow
option on the main menu and select start and add it to the work area. Connect the bottom
pin on the start button to the top pin on the readbit object. Now click the start button
to check the programs operation. You should read a one or zero for the bit number. If you
receive an error message make sure you are using the correct card number and re-read to
make sure you didn't forget a step.
|