Operator's Manual Model SM4020 20 Channels Relay Multiplexer Model SM4022 20 Channels Instrumentation Relay Multiplexer Model SM4040 40 Channels Relay Multiplexer Model SM4042 40 Channels Instrumentation Relay Multiplexer Signametrics Corporation March, 2006
CAUTION In no event shall Signametrics or its Representatives be liable for any consequential damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other loss) arising out of the use of or inability to use Signametrics’ products, even if Signametrics has been advised of the possibility of such damages.
TABLE OF CONTENTS 1.0 INTRODUCTION .................................................................................................................................................5 1.1 SAFETY CONSIDERATIONS ..........................................................................................................................5 1.2 MINIMUM REQUIREMENTS .........................................................................................................................5 1.3 DESCRIPTION ...............
5.2 USING THE SM4040 DRIVER WITH C++ OR SIMILAR SOFTWARE .............................................................27 5.2.1 Multiple Card Operations under Windows............................................................................28 5.3 VISUAL BASIC FRONT PANEL APPLICATION .............................................................................................29 5.3.1 Visual Basic Simple Application ............................................................................................
1.0 Introduction Congratulations! You have purchased a Personal Computer (PC) Plug-in instrument with analog and systems performance that rivals the best, all-in-one box, instruments. The SM4040 series relay scanner/multiplexer are easy to setup and use, have sophisticated analog and digital circuitry to provide very repeatable switching. Please take a few moments and review this manual before installing and using this instrument. This manual describes the SM4020, SM4022, SM4040, and SM4042 Scanners.
1.3 Description The SM4020 and SM4022 are 20 channel models arranged in two groups of 10:1 differential channels. The SM4040 and SM4042 are 40 channel models arranged in four groups of 10:1 differential channels. The “2” suffix indicates an instrumentation quality scanning structure, while the “0” indicates standard general purpose scanning structure. The Instrumentation models are necessary in applications requiring precision and low leakage.
1.4 Configurations In addition to the channel switching relays, the SM4000 series includes two sets of relays used for configuring of the scanner. The configuration switches facilitate inter-group connections and the Tree relays provide isolation of each of the group’s buses from their respective channel relays. These relays are automatically switched on the fly when the scanner receives configuration commands or changes are required while selecting channels from various groups.
2.0 Specifications and Feature Table Function SM4020 SM4022 SM4040 SM4042 Standard Instrumentation Standard Instrumentation Scanner Scanner Scanner Scanner Number of differential channels 20 40 20 40 Number of 10:1 groups two four two four Scanning Arrangement Two groups of 10:1 differential Four groups of 10:1 differential Thermal EMF offset (µV) 25 1.5 25 1.
Figure 2-1. Trigger input equivalent circuit. 2.2 Trigger Output Output Characteristics • Output Circuit Open collector of a NPN transistor (nominal 0.4V saturation voltage) in series with 1kΩ resistor. • Collector Emiter Voltage < 30 V • Output Current < 4 mA • Reverse Voltage < 7V • Isolation Optically Isolated from all other circuitry. Common line with Trigger Input. Figure 2-2. Trigger Output Optical Isolator NPN circuit. 2.
3.2 Installing the Software It is best to first plug the Relay Scanner into the PC chassis, and follow the instructions on the screen for ‘New Hardware Found’. . The first time you power up your computer with the Scanner installed, your computer will detect the new Scanner and prompt you for a driver. The driver your computer requires is on Disk 1 (SM4040.inf). Guide the computer to search for device driver on Disk1. Next run ‘setup’ provided in Disk1.
1B 1A 2C 2B 2A 3C 3B 3A 4C 4B 4A 5C 5B 5A 6C 6B 6A 7C 7B 7A 8C 8B 8A 9C 9B 9A 10C 10B 10A 11C 11B 11A 12C 12B 12A 13C 13B 13A 14C 14B 14A 15C 15B 15A 16C 16B 16A Ch10Hi Ch17Lo Ch18Lo Ch1Hi Ch2Hi Ch18Hi Ch4Lo Ch2Lo Ch19Hi Ch1Lo Ch6Lo Ch19Lo Ch4Hi Ch11Lo Ch5Hi Ch8Hi Ch7Lo Ch16Lo Ch12Hi Ch7Hi Ch12Lo Ch9Lo Ch13Hi Ch5Lo Ch13Lo Ch14Hi Ch3Hi Ch8Lo Ch9Hi Ch6Hi Ch10Lo Ch15Hi Ch20Hi Ch16Hi Ch14Lo Ch21Lo Ch22Hi Ch21Hi Ch20Lo Ch23Hi Ch23Lo Ch24Hi Ch22Lo Ch24Lo Ch26Hi Ch3Lo Ch25Hi Channel 10 High Channel 17 Low Channe
ChxHi, ChxLo - These are the channel positive and negative terminals for all group channels, respectively. It starts with Ch1Hi/Lo and ends with Ch20Hi/Lo with the 20 Channel scanners and Ch40Hi/Lo for the 40 Channel models. Depending on the Scanner configuration, these lines are routed to the bus terminals AHi/Lo, BHi/Lo, CHi/Lo, or DHi/Lo. AHi, ALo - These are the A-bus positive and negative terminals respectively.
Common - This is the return line for the +5V supply. Since TRIG_com and Common are isolated from each other, they must be connected as in Figure 3-3 if the +5V is used to power TRIG_com. This supply return is isolated from the rest of the signals in the DIN 96 connector. Figure 3-3. Trigger out may use the +5V supply provided for generating CMOS logic output. 3.
3.6 Using the Control Panel Figure 3-2. The Control Panel for the SM4040. The three main groups include the relays buttons, the configuration selection options, and the main menu. Note: All of the controls described below correspond to their respective software function, which can be invoked within your control software or as objects in a visual programming environment.
Configuration Option Checks - This section of the main panel allows the selection of one out of all of the possible pre defined configurations. On power up, the configuration is set to Disabled. Possible selections include Disabled, TwoWire, FourWire, SixWire, Universal, TwoGroups, and FourGroups. Edit Menu - This menu item has three selections, setting all parameters to their default value, opening the Edit Scanner Parameter sub-panel, and opening the Scan List Editor sub-panels.
4.1.1 Two Wire Multiplexing In the TwoWire multiplexed configuration, the SM4000 family first opens all channels, then it connects the Hi and Lo terminals of the selected channel, to the Hi and Lo terminals of the A-bus. The SM4020 and SM4022 route Ch1 through Ch20, and the SM2040 and SM2042 can route Ch1 to Ch40 to the A-bus. Selecting Ch1 will result in Ch1Hi connected to A-bus Hi and Ch1Lo connected to A-bus Lo. When making very low level DCV measurements (<1 mV), you should use copper wires.
Figure 4-2. To perform 4-Wire resistance measurement with the SM4042, connect Ch1 and Ch21 to a resistor, maintaining correct polarity. 4.1.3 Six Wire Multiplexing In SixWire configuration, the SM4040 and SM4042 simultaneously connect one channel to the A-bus, one to the Bbus and one to the C-bus. Selecting a channel automatically closes three channel relays. For instance, selecting channel 2 results in the opening of all currently closed channel relays, followed by the closure of Ch2, Ch12, and Ch22.
bus, forming one group, and, Ch11 through Ch20 to the B-bus, forming the second group. The SM4040 and SM4042 route Ch1 to Ch20 to the A-bus forming the first group, and Ch21 through Ch40 to the C-bus, forming the second group. 4.1.5 Four Groups Configuration In the FourGroup configuration, the SM4040 and SM4042 provide four independent multiplexing groups. The groups function as independent two wire multiplexers.
the SCANSetTriggerOut() function. In the following diagram, TRIG_out level corresponds to the circuit in figure 3.3. Figure 4-4. The trigger input maybe set for polarity and be enabled or disabled. 4.2.2 Trigger Input The trigger input line, TRIG_in, maybe set for a positive or negative polarity using the SCANTriggerInState() command. Under normal operation, the TRIG_in line has no effect on the operation of the scanner.
SCANAbort() command to the Scanner. Use the SCANOpenAllChannel() function if you wish to open the last selected channel at the end of the scan. Figure 4-7. Positive edge Triggered AutoScan is a hardware initiated automatic scanning process. 4.2.5 Triggered Scan Operation This operation requires that the Scanner be in one of the following configurations: TwoWire, FourWire, SixWire, TwoGroups, and FourGroups. The Triggered Scan operation is a hardware driven scanning process.
Figure 4-9. Single Step operation requires a SCANSetupStep() then SCANStep() command. 4.2.7 Scan List Operations The Scan List table resides on board the scanner. It contains 192 locations, allowing a scan made up of up to 192 channels. Two DLL functions provide means to write and read to this table. The table contains channel numbers associated with the scanner channels. The SM4040 and SM4042 may contain entries with values between 1 and 40, representing the available channel numbers.
4.2.9 Cleaning Relays Contacts Using the SCANCleanRelays() function, the Scanner can clean each relay contact. It does this using a specially designed on-board stimulus source along with a series of vibrations. This operation causes deposits of contaminants such as polymer deposits as well as oxides to be removed. It also solves a common relay problem involving thin film of insolationg deposits, which accumualte particularly on relays which have not been used for a while.
measured using the SCANTestConfigRelay() function and the channel relays using the SCANTestChannelRelay() function. Set the Actuation time using SCANSetActuationTime () and read it with the SCANGetActuationTime() function. The SM4000 family of Scanners have a special active Release (drop-out time) circuit, which forces all relays to release much faster than operate. For this reason, the Actuation time also includes the release of a currently closed channel, in a break before make multiplexing.
the Scanner is ready to accept a new command, and in the case of channel selection, the selected channel is closed and settled. If SCANReady() returns TRUE, it should not be used again until the next polled command is issued. The following is a list of all polled functions: SCANSelectChannelCmd(), SCANAutoScan(), SCANTrigAutoScan(), SCANTrigScan(), SCANStepCmd() and SCANCleanRelays(). 4.
SCANTriggerOutState(iScan, Enabled, PosEdge) ‘ Set trigger output to Positive edge.
is connected to the Ahi and Clo of the SM4042. The next table provide the setting for a few singleended connections to examplify this application.
File Description SM4040.LIB The Windows import library. Install in a directory pointed to by your LIB environment variable. SM4040.DEF SM2040 driver DLL module definition file. SM4040.DLL The 32 bit driver DLL. This should be installed either in your working directory, in the Windows system directory, or in a directory on your PATH. The installation program installs this file in your Windows system directory (usually C:\WINDOWS\SYSTEM for Win98/95 or at C:\WINNT\SYSTEM32 for Windows NT). SM4040.
Install the SM4040.H and ScanUser.H header files in a directory that will be searched by your C/C++ compiler for header files. These header files are known to work with Microsoft Visual C++™.To compile using Borland, you will need to convert the SM4040.DEF and SM4040.LIB using ImpDef.exe and ImpLib.exe, provided with the compiler. Install SM4040.LIB in a directory that will be searched by the linker for import libraries. The SM2040 software must be installed prior to running any executable code.
* * Copy both SM4040.DLL and SM4040.LIB to the project directory. * ***********************************************************************/ // #define WINAPI __stdcall #include #include #ifdef _Windows #define _WINDOWS #endif #include “SM4040.H” // functions declarations and error codes. #include “ScanUser.H” // All functions, range and rate info and function declarations.
Global Const SixWire = &H1E ' Since the DLL is written in "C", where TRUE = 1 and FALSE = 0 ' and VB has -1 for True, use YES and NO instead of True and False Global Const YES = 1 Global Const NO = 0 ‘Error handling code: Public Sub ShowFault(status As Long) Dim errtext As String * 48 Dim errcode As Long Dim start As Single If status < 0 Then errcode = SCANErrString(status, errtext, 48) SimplePanel.TextLine.
After initialization, the Windows DLL default modes and parameters on your Scanner are set up as follows: • • • • Configuration is set to Disabled Trigger output is disabled Actuation time is set to 10ms Step time is set to 100ms 5.5 Using the SM4040 DLL with LabWindows/CVI® When using the SM4040 DLL with LabWindows/CVI, you should read the LabWin.txt file included with the software diskette.
SCANAutoScan H/W access Command ; Polled Command ; Description Initiate AutoScan operation. #include “SM4040.H” int SCANAutoScan(int iScan, int iPoints) Remarks Run Auto Scan procedure from the Scanner's stored ScanList. This operation is carried out by the scanner’s on-board processor. It uses the Scan List table and timing parameters to perform a complete scan sequence. If necessary, the scan may be terminated by sending the SCANAbort() command.
SCANCleanRelays H/W access Command ; Polled Command ; Description Clean all relays. #include “SM4040.H” int SCANCleanRelays(int iScan) Remarks This function Cleans all relays. The test connector must be present to clean all contacts. This function verifies that the test connector is present. Cleaning takes about 13 seconds for the SM404X and a bit less for the SM402X.
SCANClosePCI H/W access Command ; Polled Command ; Description Close the PCI bus for the specified Scanner. Not for user applications. int SCANClosePCI(int nScan) Remarks This function is limited for servicing the Scanner. It has no use in normal operation. See also SCANOpenPCI() function. Parameter Type/Description nScan int Identifies the Scanner number Return Value Integer error code. Value Meaning SCAN_OKAY Operation successfully completed.
SCANErrString H/W access Command Polled Command Description Return the string describing the error. #include “SM4040.H” int SCANErrString(int iErrorCode, LPSTR lpszError, int iBuffLength) Remarks This function returns a string containing the error description, which corresponds to the integer error, code iErrorCode. The error string is placed at lpszError. Parameter Type/Description iErrorCode int Error code.
SCANGetActuationTime H/W access Command Polled Command Description Return the currently set actuation time. #include “SM4040.H” int SCANGetActuationTime(int iScan, double FAR *lpdAct) Remarks This function returns a double floating value that is the currently set relay actuation time for the selected scanner. Parameter Type/Description iScan int Identifies the Scanner. Scanners are numbered starting with zero. lpdAct double FAR * Pointer where t-Actuation value is to be saved.
Value Meaning SCAN_OKAY Operation was successful. Negative number Error code Example int bus, slot; // Find on which bus, and slot the DMM is at SCANGetCalDate(3, &bus, &slot); // SCANNER#3 SCANGetConfig H/W access Command ; Polled Command Description Read the current configuration of the scanner. int SCANGetConfig(int iScan) Remarks This function reads the current configuration settings from the Scanner hardware. The configurations are defined in the ScanUser.H file.
Positive Value Version Negative Value Error code Example firmware_ver = SCANGetGrdVer(0); SCANGetHwVer H/W access Command Polled Command Description Get the hardware version of the Scanner. #include “SM4040.H” int SCANGetHwVer(int iScan) Remarks This function returns the Scanner hardware version. A returned value of 0 corresponds to Rev_, 1 corresponds to Rev_A, 2 to Rev_B etc. Parameter Type/Description iScan int Identifies the Scanner. Scanners are numbered starting with zero.
Positive Value Scanner ID code Negative Value Error code Example int id = SCANGetID(0); SCANGetManDate H/W access Command Polled Command Description Get Manufacturing date stamp from the Scanner hardware #include “SM4040.H” int SCANGetManDate(int iScan, int *month, int *day, int *year) Remarks This function returns the Scanner’s manufacturing date, which is read from the hardware. The month, day and year are returned as integers.
Iscan int Identifies the Scanner. Scanners are numbered starting with zero. LpdMax double FAR * Pointer where the Max value is to be saved. Return Value Integer error code.. Value Meaning SCAN_OKAY Operation successfully completed. Negative Value Error code Example int ScanLst[192]; ScanLst[3] = SCANGetScanList(0, 3); //Get the 4th entry SCANGetShortedChannel H/W access Command ; Polled Command Description Returns the channel number of the shorted channel. #include “SM4040.
int SCANGetStepTime(int iScan, double FAR *lpdTstep) Remarks This function returns a double floating value that is the currently set step time. Parameter Type/Description iScan int Identifies the Scanner. Scanners are numbered starting with zero. lpdTstep double FAR * Pointer where the Step time value is to be saved. Return Value Integer error code.. Value Meaning SCAN_OKAY Operation successfully completed.
int SCANGetType(int iScan) Remarks This function returns the Scanner type. Parameter Type/Description iScan int Identifies the Scanner. Scanners are numbered starting with zero. Return Value Scanner type Integer or an error code.
Description Initialize the scanner. #include "sm4040.h" int SCANInit(int iScan) Remarks This function must be the first function to be executed. It opens the driver for the specified Scanner. The first one being 0, the second 1, etc. It also initializes the hardware and software and sets the scanner to Disabled configuration. Parameter Type/Description iScan int Identifies the Scanner. Scanners are numbered starting with zero. Return Value The return value is one of the following constants.
Description Open all channel relays. #include “SM4040.H” int SCANOpenAllChannels(int iScan) Remarks This function opens all channel relays. It does not effect the configuration of the Scanner. It may be used following one of the scanning operations, to make sure all channels are left open. Or it can be used any time when it is necessary to open all channels. It is not operational while in Disabled or Universal configurations Parameter Type/Description iScan int Identifies the Scanner.
Remarks Following the completion of long or complex polled commands, the scanner indicates it is ready to accept a new command by issuing a task complete message. XXXXX Functions requiring the use of the SCANReady() command include; SCANSelectChannelCmd(), SCANAutoScan(), SCANTrigAutoScan(), SCANTrigScan(), and SCANCleanRelays(). The SCANReady() function checks returns TRUE if ready, and FALSE otherwise.
Value Meaning SCAN_OKAY Operation successfully completed. Negative Value Error code Example SCANSelectChannel(0, 3); DMMRead(0, @val); // Select a channel // measure input at Channel 3 SCANSelectChannelCmd H/W access Command ; Polled Command ; Description Polled select channel command. #include “SM4040.H” int SCANSelectChannelCmd(int iScan, int iChan) Remarks This is the polled version of the SCANSelectChannel function. It opens all channels in a group, then closes channel number iChan.
Description Set relay actuation time value #include “SM4040.H” int SCANSetActuationTime(int iScan, double dActuate) Remarks This function sets the actuation time value to the scanner. The actuation time is the time it takes the scanner to select and deselect all relays. The default actuation time is set to 10mS. The allowed range is from 0.25ms to 800ms. The resolution is about 0.25ms. Parameter Type/Description iScan int Identifies the Scanner. Numbered starting with zero.
Example SCAN_OKAY Operation successfully completed. Negative Value Error code SCANSetChannelRelay(0,OPEN,10); // Open channel 10 relay for(I=1; I<=9; I++) // Close 1,2..,9 SCANSetChannelRelay(0, CLOSE,i); SCANSetConfig H/W access Command ; Polled Command Description Set the Scanner configuration to one of the predefined modes. #include “SM4040.H” #include “ScanUser.H” int SCANSetConfig(int iScan, int iConfiguration) Remarks This function sets the Scanner to one of the available configurations.
CtoC, DtoD, and DtoC. The CtoA, DtoA, CtoC, DtoD, and DtoC are only available with the SM4040 and SM4042. It takes t-Actuation to execute this command. Parameter Type/Description iScan int Identifies the Scanner being addressed iState int Indicates if relay is to be opened or closed. [OPEN | CLOSE] iRelay int Identify the configuration/tree relay to act on Return Value Integer error code. Value Meaning SCAN_OKAY Operation successfully completed.
Example double reading; int I; for(i=0; i<40;i++) SCANSetScanList(0, i-1, i); // Set locations // 0 to 39 to channels 1 through 40 SCANAutoScan(0,40); // execute a 40 point auto scan sequence of // Ch1, Ch2, Ch3…Ch40 SCANSetStepTime H/W access Command ; Polled Command Description Set auto scan step time #include “SM4040.H” int SCANSetStepTime(int iScan, double dStep) Remarks This function sets the scanner’s Step time value. The Step time effects the various autoscanning operations.
iLevel Return Value Example int Level indicator. 0 – low, 1 – high. The return value is one of the following constants. Value Meaning SCAN_OKAY Operation successfully completed. Negative Value Error code status = SCANSetTriggerOut(0,1); //Set trigger line to high level SCANSetupStep H/W access Command ; Polled Command Description Set the Scanner for Stepped scanning operation. #include “SM4040.
and enable state. The ScanList must be pre-loaded prior to issuing this command. Make sure the number of SCANStep commands being issued does not exceed the loaded contents of the scan list. Up to 192 points can be selected in this operation mode. Parameter Type/Description iScan int Identifies the Scanner being addressed. Return Value The return value is one of the following constants. Value Meaning SCAN_OKAY Operation successfully completed.
SCANTerminate H/W access Command ; Polled Command Description Terminate Scanner’s operation, and removes it from PCI configuration. #include “SM4040.H” int SCANTerminate(int iScan) Remarks This function opens all relays of the selected Scanner, then removes it from the PCI structure. To use this Scanner again, it is necessary to either, exit the thread, or reinitialize it. It is not necessary to use this function since exiting the thread will automatically terminate the scanner.
iChan Return Value int Identifies the Channel relay to be tested. The return value is one of the following constants. Value Meaning SCAN_OKAY Operation successfully completed. Negative Value Error code Example SCANTestChanIntegrity(0,1); // test Chan1 relay SCANTestChannelRelay H/W access Command ; Polled Command Description Test a channel relay. #include “SMX4032.H” #include “ScanUser.
Description Set the RTD parameters. #include “SM4040.H” #include “ScanUser.H” int SCANTestConfigRelay(int iScan, int iConf, double * lpdBounce) Remarks This function tests a single configuration or tree relay. Its diagnostics include excessive bounce and open and short failures. If no failure, the Actuation time of the relay, including bounce time, is stored at a location pointed to by dtActuate.
iPoints Return Value Example int Indicates the number of points in the scan. The return value is one of the following constants. Value Meaning SCAN_OKAY Function succeeded. Negative Value Error code SCANTriggerOutState(0,ENABLED, POSITIVE); //positive edge CANTrigAutoScan(0, 20); // set off 20 point scan. SCANTriggerInState H/W access Command ; Polled Command Description Set trigger input state. #include “SM4040.H” #include “ScanUser.
Remarks This function sets the scanner’s trigger output line state and polarity. Default is DISABLED and POSITIVE. If iState is set to ENABLED, the trigger output is enabled, which reflects in its activity during channel selection and during scanning operations. With iEdge set to POSITIVE, the trigger output polarity will be positive, which means that a positive edge on the trigger output line indicates a channel selection ready. See definitions in ScanUser.H file.
Return Value The return value is one of the following constants. Value Example Signametrics Meaning SCAN_OKAY Operation successfully completed.
6.0 Accessories Several accessories are available for the SM4000 relay Scanners, which may be purchased directly from Signametrics or one of its distributors or representatives. Please see the ‘Accessories’ section on our web-site for the current accessories available: http://www.signametrics.com The following 96 position Female connectors are sourced from a large number of manufactureres, and are all DIN41612 Type "C" • Signametrics SM40 - Terminal Block.
` Signametrics 60