LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DIO Pass or Fail Tests: LabVIEW would have to determine the expected result or results (1 or 2 of a possible 25) based on the output pattern send out (1 of 65K).

I am trying to come up with a plan to write a LabVIEW VI to do the following test. Can you give me a few ideas how to do this in LabVIEW. I am a new to LabView. I think I how to read and write I/O ports and do comparisons. I need a little guidance on the error checking. In simple terms the test will go like this:

I have 16 digital inputs and 16 outputs.
The 16 outputs are turned on in a specific pattern (i.e. 1001000101011101) and then the 16 inputs (i.e. 1000101111111111) are read in after a time delay. The inputs are checked to see if they match the expected results. If they do it's a pass if not it's a f
ailure. This seems pretty straightforward. And I think I have an idea how to do it. Here's the problem. The inputs are changed sequentially so that all possible combinations are tried. The test needs to determine if the resulting input pattern is correct based on the outputs that were sent out. 16 outputs give 65K possible tests. For each tests there would be 1 or 2 possible results with a total of 25 results for the entire 65K possible tests. LabVIEW would have to determine the expected result or results (1 or 2 of the 25) based on the output pattern send out (1 of 65K). Then it would have to compare the actual input pattern received to see if it's a pass or fail?

Any ideas how I can approach this?
0 Kudos
Message 1 of 4
(2,798 Views)
First, a question: Can't you do this with alternating 1s and 0s, i.e. 1010101010101010 and 0101010101010101? This puts all bits on, and all off, in only two tests.

As for determining the results, when you do DIO in this manner (two ports) you can get a single I32 number as a result. Then, you just do a direct compare to determine if they are equal, and get a boolean result. As for how to figure out your results overall, if you choose to do 65,000 individual tests, all you do is loop the test, put the boolean result for each in an array (using an initialized array of FALSE, and replace array element in your loop) and outside of the loop, AND Array Elements. This will be your overall result.

Feel free to post here or email me if you have further que
stions.
0 Kudos
Message 2 of 4
(2,798 Views)
The 16 outputs are simulating inputs to the device under test, (simulating remote switches and contacts). The object of the test is to test every possible combination to ensure that nothing unexpected happens at the output. The device under test is a logic motor control system and we want to make sure (among other things) that we don’t start or stop the motor when its not suppose to. How can only two tests do that?

I think you are describing how to create an array with the results. But I still don’t know how to determine what the result should be and if it is correct.
I’ve identified 25 possible valid states the motor controller can be in.
I’ve also identified the correct outputs that determine each of the 25 states.
I’ve also
identified the possible valid states you can go to from each (previous) state, You can only get to a valid new state from a previous state if the right combination of inputs is applied (we hope).

If you know what state you are in when start and you know the valid states you can go to and the inputs required to get there, you should be able test the system against that. You verify this by checking the outputs against what they should be. With 65K possible inputs combination, checking them all manually would be quite is a task. Putting this into LabView is my task.
0 Kudos
Message 3 of 4
(2,798 Views)
Well, I think I am confused about what you are trying to do then.

If you are sending out an digital pattern on two ports, it should be a 16bit number, i.e. 0-65535. If I am correct in assuming what you are trying to do (output all 65536 combinations) then all you have to do is combine the ports, and output to them 0-65535 directly, and read back the result. You then compare the result to the sent number, and if they are equal, the test passed, else it fails. This result is put in an array (using the method I described above.) Then, after the test, you AND Array Elements to find if the test overall passed or failed. Seems fairly simple.

If this is in fact what you are trying to do, then all you have to do is write the test. If not, then I would sugg
est a more detailed description of your test.

I hope this helps.
0 Kudos
Message 4 of 4
(2,798 Views)