Hardware Reference
In-Depth Information
Figure 12.14 Relay driver (a high output from a port line enables
the load)
Hence the system has potential for controlling up to 32 devices using four
identical interface modules.
Each channel output from the interface module is connected to a relay driver
(see Figure 12.14). This circuit is capable of switching a load of up to 10 A at
115 V AC. A status LED is included for test purposes.
Software
The application uses a simple Visual Basic routine (see below). The user inter-
face is designed so that the operator can set the delay on any channel to any
time between 0 and 30 s using a simple slider control. Each channel is fit-
ted with a virtual LED indicator so that the operator knows which loads have
become active. In addition, a further status field shows the elapsed time (see
Figure 12.15). This application makes extensive use of the Visual Basic Timer
(Chapter 6 contains more information on Visual Basic programming).
'============================================================
' Name: seqcon2
' Purpose: controls switching sequence on channels
1to8
' Library calls: requires inpout32.bas for I/O
' Hardware: parallel port with relay modules
'============================================================
Dim Port1 As Integer
Dim Port2 As Integer
Dim Port3 As Integer
Dim OutData As Integer
Dim ETime As Integer
Private Sub Start_Click()
Timer1.Enabled = True
Timer2.Enabled = True
Timer3.Enabled = True
Timer4.Enabled = True
Search WWH ::




Custom Search