< | Help Index | >
|
Automation |
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.
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.
|
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 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.
|
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.
|
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.
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.
Example 1 Timing Diagram
The Mistral begins by scanning for shorts, LED's and permanent connections. The output "Scanning for shorts, LED's and permanent connections" goes active.
"Scanning for switches" goes active indicating the Mistral has completed scanning for shorts, etc. and has begun looking for switch presses.
The controller should recognize that "Scanning for switches" has gone active and lower the plunger for S1, the first switch in the sequence.
After the amount of time programmed into the controller passes, S1 should be released.
"Scanning for switches" is still active so the controller should press S2.
The controller releases S2. The switch resistance measured by the Mistral was bad so the Mistral asserts "Keypad Failed".
The controller lowers the plunger for S3.
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.
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.
Example 2 Timing Diagram
The Mistral begins by scanning for shorts, LED's and permanent connections. The output "Scanning for shorts, LED's and permanent connections" goes active.
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.
The Mistral makes "Next Switch Down" inactive. The controller should raise the plunger for S1.
The Mistral asserts "Next Switch Down" again. This means that the Mistral has decided S1 is good. The controller should press S2.
The Mistral makes "Next Switch Down" inactive. The controller should raise the plunger for S2.
"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.
The Mistral makes "Same Switch Down" inactive. The controller should raise the plunger for S2.
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.
The Mistral makes "Same Switch Down" inactive. The controller should raise the plunger for S2.
"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.
The Mistral makes "Next Switch Down" inactive. The controller should raise the plunger for S3.
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 | >