Introduction
This example code demonstrates how the NI-ELVIS could be used to create a 4-bit Adder test fixture. The example code has a 4-bit adder designed in software and then with a actual 4-bit adder in hardware the NI-ELVIS can perform tests defined by the user and compare the actual results against the theoretical software values.
Steps to Complete
Open the ELVISmx Digital Test.vi and on the front panel there will be two arrays, A Binary Value and B Binary Value, these are the values that will be used to test the adder. The values should be place from most significant bit to least significant bit, all in binary. For instance, 0001 is '1' and 1000 is '8'. By indexing the array and adding multiple elements to the array many different values can be tested.
Additional Notes
This example was designed for the ELVISmx driver and the NI-ELVIS II. The example was also designed for a 4-bit adder but could be expanded to allow for an 8-bit adder as well.
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.