It is very easy
to use any SeaIO Digital I/O card with Iconics. Install the card as per the directions in
SeaIO.hlp or your manual, and use the "SeaIO Devices" in the control panel or
the property page to find out what the port number the card is installed as.
Port Control
Startup AlarmWorX32 and create a new workspace. In the right hand corner click on the OLE
button and bring up the insert object dialog box. In this dialog box select the
ActiveIo_PortDisplay Control and click the ok button to add the control to the workspace.
Now that we have added the control to the workspace there is a new icon in the lower right
hand corner. This is the ActiveIo_PortDisplay control icon. You can now add as many to the
workspace by simple clicking this icon. Right click on a clean area of workspace and
select view code. You should see a function block like the example below.
Private Sub Document_Open( )
End Sub
We configure the control to the specific card and port here. Lets start with the
deviceNumber. Enter the line of code to the Documents_Open function. Replace X with the
card number and Y with the port number of the device to be controlled or monitored.
ActiveIo_PortDisplay1.deviceNumber = X
ActiveIo_PortDisplay1.port = Y
Next we need to set up how the control is to look. If the port being used is an input we
will display lights to view if the input has been triggered but if the port is an output
we will display switches to control the outputs. For inputs add this line of code.
ActiveIo_PortDisplay1.ShowLights
For outputs add this line of code.
ActiveIo_PortDisplay1.ShowSwitches
Here are some Examples of what it should look like.
Example 1: Card number 5 monitoring port 6 that is an input.
Private Sub Document_Open( )
ActiveIo_PortDisplay1.deviceNumber = 5
ActiveIo_PortDisplay1.port = 6
ActiveIo_PortDisplay1.ShowLights
End Sub
Example 2: Card number 3 monitoring port 1 that is an output.
Private Sub Document_Open( )
ActiveIo_PortDisplay1.deviceNumber = 3
ActiveIo_PortDisplay1.port = 1
ActiveIo_PortDisplay1.ShowSwitches
End Sub
Now we are ready to test the program. Click on the AlarmWorX32 icon in the taskbar and
select the "Enter Runtime" option on the menu bar. Test the control depending on
how you configured the device. For more information see the SeaIO_PortControl example.
Device Control
The device control is similar to the port display. The device control
has no graphical interface. This is great for apps where you want to use the card but
there is no need for a user interface. The device control also offers more options than
the port control. The setup is very similar to the port display. For more information see
the SeaIO_DeviceControl example.