AC Relay Wildcard Users Guide
This document describes using the AC Solid State Relay WildCard™. It provides instructions for the Wildcard's connection and software, as well as a full schematic.
The AC Solid State Relay Wildcard controls up to four, 5 amp AC loads. It features 8 screw terminal connectors so you can connect to a wide variety of instruments. Up to eight AC Relay Wildcards can stack onto a Mosaic embedded controller or you can mix and match any of the growing family of Wildcards. This wildcard is the perfect instrumentation choice when your application requires the control of standard 120V or 240VAC mains electricity. The following sections show you how to use the AC Relay Wildcard’s hardware and software.
|AC Relay Wildcard Specifications|
|Channels:||Four independent, optically isolated solid state AC relays (SSRS)|
|Voltage:||Controls 12 to 280 VAC at 47 to 63 Hz|
|Current:||Switches from 0.06 up to 5 amps continuously|
|Max. Surge Current:||250 A at 16.6 msec. (one AC cycle)|
|Isolation:||Optically isolated to 4000 Vrms|
|Switching Mode:||Zero voltage switching|
|Turn On/Off Times:||Max turn on/off time of ½ AC cycle|
|Connections:||8 easy-to-connect-to screw terminals|
|SSR Used:||Crydom PX240D5 AC solid state relay|
|Current:||mA from 5V|
|Size :||2" x 2.5" x 1.10"1) (50.8mm x 63.5mm x 28mm)|
The AC Relay Wildcard provides easy control of external AC devices. Each AC Relay provides:
- Drive 12 to 280 VAC loads operating at 47 to 63 Hz and up to 5 Amps.
- Opto isolated control to 4000 Vrms.
- Zero current – zero voltage switching.
- Max turn on/off time of ½ of the AC Cycle.
The next sections show you how to connect the AC Relay Wildcard to the Wildcard Bus on a Mosaic controller and how to configure the module for operation in your instrumnet.
Connecting to the Wildcard bus of any Mosaic controller
To attach the AC Relay Wildcard to your controller:
With the power OFF, connect the Wildcard Bus header of the AC Relay Wildcard to Wildcard Port 0 or Wildcard Port 1 on your controller or the Wildcard Carrier Board (These may also be called Module Port 0 or 1). The Wildcard Bus on the AC Relay Wildcard is located opposite from the screw terminals. If you are using a Wildcard Carrier Board, connect it to the QED Board as outlined in the "Wildcard Carrier Board Users Guide". The standoffs on your controller should line up with the Wildcard's corner mounting holes.
Selecting the Wildcard Address
Once you have attached the AC Relay Wildcard to the controller board, you must set its address with jumper shunts at jumper positions J1 and J2.
The Wildcard's address selection jumpers, J1 and J2, set a unique address of the Wildcard port. Each wildcard port on Mosaic Controllers accommodates up to four attache Wildcards. Wildcard Port 0 provides access to Wildcard addresses 0 to 3 while Wildcard Port 1 may host Wildcards at addresses 4 through 7. Two Wildcards mounted on the same port should not have the same address (jumper settings). These are the addresses corresponding to the possible jumper settings:
|Address Jumper Settings|
|Wildcard Port||Wildcard Address||Installed Jumper Shunts|
|0||3||J1 and J2|
|1||7||J1 and J2|
|Note:<block indent>Address 0 isn't available on the Handheld or QScreen controllers. Instead, use addresses 1 through 7.</block>|
Once you have attached and addressed the Wildcard, you can use its software drivers to control AC loads.
You control the AC SSRs on the Wildcard using very simple software – essentially just simple reads and writes to particular addresses of the microcontroller's memory. In the following software description we show you how the Wildcards are addressed, then how the relays are controlled, and finally present a software example that initializes and controls the AC relays.
Initializing the Wildcards
The functions IOSetBits, and IOClearBits, IOStoreChar, and IOFetchChar communicate with the AC Relay Wildcard. Each function requires an offset address and a Wildcard address. These functions are contained in the file
QED_QCard_IO.4th for V4.xx kernels, and they are automatically included in the V6.xx kernel. This file
QED_QCard_IO.4th can be found in:
The AC Relays on the AC Relay Wildcard are controlled by an onboard Xilinx CPLD (Complex Programmable Logic Device). The AC Relay control lines on the CPLD must be initialized as outputs (on power up, they come up as inputs). To initialize the Wildcard, execute Init_AC_Relay, as shown in the demo programs.
Qfter the Wildcard has been initialized, use
Control_AC_Relay to turn the solid-state relays OFF or ON, and use
Read_AC_Relay_Status to read in the relays' status. The control lines are all active low – to turn a relay ON, you write a 0 to its control line.
C demo program controls the AC relays
You can find a C language demo program in your installation directory, and it is also provided here for reference.
Forth language demo program
You can also find a Forth language demo program in your installation directory, or online here.
Download the demo to your board, then type:
to run it with the AC wildcard installed on port 0.
Now you are ready to start using your AC Relay Wildcard. All of the software routines listed in this document are also on the distribution CD that accompanies each module.