< | Help Index | >

Automation


Automating The Mistral

In some cases it may be desirable to control the Mistral using something besides the keyboard or mouse. You may also have another system that needs to know when the Mistral is looking for a switch to be pressed or whether a keypad tested good or bad. In these situations the Mistral software can communicate with external hardware or another test system using a digital input/output card installed in the computer.

Selecting And Installing A Digital I/O Card

The Mistral supports cards manufactured by Measurement Computing. We are currently recommending the following cards, although any Measurement Computing card with digital inputs and/or outputs should work. You will need to select a card that interfaces with the equipment you plan to use.

PCI Bus
PCI-PDIS08   8 relay outputs, 8 isolated inputs
ISA Bus
CIO-PDIS08   8 relay outputs, 8 isolated inputs
CIO-RELAY08   8 relay outputs
CIO-DIO24   8 TTL outputs, 8 TTL inputs

Install the card following the instructions provided Measurement Computing. You will need to run the Instacal software included with the board before it will be recognized by the Mistral software.

Setting Up Automation

Before using automation, the Mistral needs to know which I/O card you are using and how the external hardware will work. Select "Mistral Options..." from the "File" menu to open the Mistral Options window and choose the Automation tab. Note the "Mistral Options..." menu item will not be available if there is an edit mode password and it was not entered when the program was launched or you are in the middle of testing keypads.

Mistral Options Automation Tab
I/O Card

Select the card installed or "(None)" to disable automation. If your card does not appear in the list or the list is disabled, make sure the card is installed correctly and has been added to the system by running the Instacal program provided by Measurement Computing.

Fail Keypad immediately if a short, bad LED or bad permanent connection is detected

If this is checked testing of the Keypad will end immediately when the failure is found. Testing of switches will be skipped.

Fail Keypad immediately if a bad switch is detected

If this is checked testing of the Keypad will end immediately as soon as a bad switch is detected. If the Mistral is controlling switch press timing and Retry is enabled, the Mistral will retest the switch the requested number of time before the switch is considered "bad".

Automation Mode

This section allows you to select two modes of controlling switch presses.

Mistral controls switch press/release timing (uses Next Switch output)

This is the fastest mode of automated testing since the Mistral will make the Next Switch Down output inactive as soon as it has measured the switch resistance.

If this option is selected, the external hardware will need to sequence through the switches on the Keypad in response to the Next Switch Down output. Each time Next Switch Down goes active the next switch on the Keypad should be pressed, until all switches have been pressed. Each should be held down until the Next Switch signal goes inactive.

Retry failed switches X times (uses Same Switch output)

If this is checked, the Mistral will assert Same Switch Down if the last switch pressed when Next Switch Down was active was found to be bad. The external hardware will re-press the same switch just pressed (instead of advancing to the next switch) until Same Switch Down goes inactive. The number of times to Retry can be set by choosing from the list.

External hardware controls switch press/release timing

If this option is selected, the external hardware should sequentially press all of the switches on the Keypad when "Scanning for switches" output goes active. It will be up to the external hardware to hold each switch down until the Mistral detects it and to allow enough time between switch presses.

Maximum time without switch press detected before fail

If no switch press is detected for the time indicated, the testing of the Keypad stops. The Keypad will have failed since the Mistral was still looking for a switch press. This feature ends the test if a switch is not detected when pressed.

Maximum time switch can be down

If a switch is pressed continuously for the time indicated the testing of the Keypad stops and the part is failed. This will end the test for stuck switches.

In addition to setting up the automation features in the Mistral Options window, you will need to enable automation in each Keypad file. See Edit Info window for information on enabling automation for a Keypad File.

Output Signals

Output signals are on the first port of cards with multiple I/O ports (usually Port A).

For relay output cards the common (C) pin is connected to the normally open (N.O.) pin when the output is "active". For cards with TTL outputs, the output is high when active.

0 - Keypad Passed

Active when test is complete and Keypad was good.

1 - Keypad Failed

Active as soon as Mistral sees something wrong with a Keypad. Goes inactive if the error condition goes away during the test.

2 - Test Complete

Test is done and Mistral is ready for the next Keypad. Keypad Passed and Keypad Failed indicate the result of the test.

3 - Scanning for shorts, LED's and permanent connections

Active when doing initial Keypad test.

4 - Scanning for switches

Active when waiting for switch presses.

5 - Next Switch Down

If the Mistral is selected to control switch timing in Mistral Options, hardware should press the next switch on the Keypad when this is active. The switch should be held down until Next Switch Down goes inactive.

6 - Same Switch Down

If enabled in Mistral Options, hardware should press the same switch that was just pressed when this is active. The switch should be held down until Same Switch Down goes inactive. This is activated if a switch is bad or not detected after Next Switch Down. The number of times this happens each time a switch fails is set in Mistral Options.

7 - Not Used

 

Input Signals

For cards with multiple I/O ports, inputs will be on the second port (usually Port B). On cards with TTL level inputs, inputs are active high (5VDC) and all unused inputs must be tied to ground. For cards with isolated inputs, an input is active when voltage is applied and unused inputs can be left unconnected. All inputs that duplicate program buttons do not work unless the corresponding button is enabled.

0 - Test First Keypad/Test Next Keypad (Production Testing) or Test Life Cycle Keypad (Life Cycle Testing)

Functions the same as clicking on the button on the screen.

1 - Retry Test

Functions the same as clicking on the button on the screen.

2 - Pass

Functions the same as clicking on the button on the screen.

3 - Fail

Functions the same as clicking on the button on the screen.

4 - End Job (Production Testing) or End Life Cycle Test (Life Cycle Testing)

Functions the same as clicking on the button on the screen.

5 - Enter

Functions just like pressing the Enter key or space bar on the keyboard.

6 - End Test

If the Mistral is in the process of testing a keypad, activating this input causes the test to be stopped. Test Complete will be asserted and Pass or Fail indicated.

7 - Not Used

 

Automatic Test Termination

When switch timing is being controlled by external hardware, testing of a Keypad can end automatically for several reasons.

When the Mistral is controlling switch timing, testing of a Keypad will end automatically for the following reasons.

For both modes of operation the test can also be stopped immediately if a short, LED or permanent connection error or a bad switch is found by checking the corresponding item in the Mistral Options.

Examples

Setting up your own automation system requires an external PLC or other controller that will monitor and respond to signals from the I/O card. Several examples may help illustrate how this communication could work.

Example 1: External hardware controls switch press/release timing - The keypad you are testing has three switches labeled S1, S2 and S3. Your test hardware's controller is connected to three pneumatic plungers. The controller will begin pressing switches when "Scanning for switches" goes active. It will press each switch once by activating the corresponding plunger for a preprogrammed amount of time and then move on to the next switch in the sequence.

Set the Automation Mode to "External hardware controls switch press/release timing" in Mistral Options.

The timing diagram below shows the state of the output signals during the test of one Keypad. A description of what is happening at each of the numbered times follows.

Timing Example

Example 1 Timing Diagram

  1. The Mistral begins by scanning for shorts, LED's and permanent connections. The output "Scanning for shorts, LED's and permanent connections" goes active.

  2. "Scanning for switches" goes active indicating the Mistral has completed scanning for shorts, etc. and has begun looking for switch presses.

  3. The controller should recognize that "Scanning for switches" has gone active and lower the plunger for S1, the first switch in the sequence.

  4. After the amount of time programmed into the controller passes, S1 should be released.

  5. "Scanning for switches" is still active so the controller should press S2.

  6. The controller releases S2. The switch resistance measured by the Mistral was bad so the Mistral asserts "Keypad Failed".

  7. The controller lowers the plunger for S3.

  8. The controller releases S3. At this point the controller must wait for "Scanning for switches" to go inactive. It should not start the sequence over again. This is because if a switch was defective and the Mistral did not detect it when pressed, the controller will need to wait for the Mistral to time out before it will recognize the test is complete.

  9. The Mistral has detected that each switch has been pressed at least once so the test is complete. It makes "Scanning for switches" inactive and "Test Complete" active. Note that since one of the switches failed, "Keypad Failed" is still asserted. These two signals will remain active until the "Test Next Keypad" button is pressed, either using the mouse or keyboard or through the "Test First Keypad/Test Next Keypad" automation input.

Note that if you set up your Mistral to fail a Keypad as soon as a bad switch is detected, the test could stop in the middle at which time "Scanning for switches" would go inactive. Your controller should stop pressing switches and wait for "Scanning for switches" signal to go active again. If "Switches must be pressed in sequence" is checked in the Edit Info window your controller should reset to the first switch each time the "Scanning for switches" signal to goes active.

Example 2: Mistral controls switch press/release timing - The keypad you are testing has three switches labeled S1, S2 and S3. Your test hardware's controller is connected to three pneumatic plungers. You want to test as rapidly as possible so your controller will monitor "Next Switch Down" and "Same Switch Down".

Set the Automation Mode in Mistral Options to "Mistral controls switch press/release timing" and check "Retry failed switches", setting the number of Retries to 2.

The timing diagram below shows the state of the output signals during the test of one Keypad. A description of what is happening at each of the numbered times follows.

Timing Example

Example 2 Timing Diagram

  1. The Mistral begins by scanning for shorts, LED's and permanent connections. The output "Scanning for shorts, LED's and permanent connections" goes active.

  2. The Mistral has completed scanning for shorts, etc. and has begun scanning for switches ("Scanning for switches" is active) and asserts "Next Switch Down". The controller should lower the plunger for one of the switches, say S1. Note it doesn't matter which switch is pressed first as long as they are all pressed in sequence.

  3. The Mistral makes "Next Switch Down" inactive. The controller should raise the plunger for S1.

  4. The Mistral asserts "Next Switch Down" again. This means that the Mistral has decided S1 is good. The controller should press S2.

  5. The Mistral makes "Next Switch Down" inactive. The controller should raise the plunger for S2.

  6. "Same Switch Down" is asserted. This means the Mistral did not get a good value for S2. The controller should lower the plunger for S2 again.

  7. The Mistral makes "Same Switch Down" inactive. The controller should raise the plunger for S2.

  8. The Mistral asserts "Same Switch Down" again. This means the Mistral did not get a good value for S2 the second time it was tried and it would like to try it one more time. The controller should lower the plunger for S2 again.

  9. The Mistral makes "Same Switch Down" inactive. The controller should raise the plunger for S2.

  10. "Next Switch Down" goes active. Since "Keypad Failed" was not asserted and this was the last time this switch would be tried the Mistral must have got a good result for S2. The controller should press S3.

  11. The Mistral makes "Next Switch Down" inactive. The controller should raise the plunger for S3.

  12. The Mistral is done scanning for switches ("Scanning for switches" inactive) and has completed testing the Keypad ("Test Complete" is active). Since all the switches passed, "Keypad Passed" has been asserted.

Note that if you set up your Mistral to fail a Keypad as soon as a bad switch is detected, the test could stop in the middle of testing. Again your controller program doesn't need to care as long as "Switches must be pressed in sequence" is not checked in the Edit Info window. Just make sure that if the last switch you pressed was S3 and you see "Next Switch Down" go active, you lower the plunger on S1. If "Switches must be pressed in sequence" is checked in the Edit Info window, your controller should reset to the first switch each time the "Scanning for switches" signal to goes active.


< | Help Index | >