05-13-2012 08:26 PM
I have a fairly simple program to test DAC IC's. Currently I'm able to communicate to the IC via I2C protocol and I'm able to adjust the analog output by sending a 1-D Array of unsigned 8 bits (0-255). My goal now is to make this an automated program. The problem I'm facing is incrementing the array data by 1 bit until I reach 255, at this point the program will jump out of the for loop and increment the device ID establish communications with new device and and repeat test for incrementing bits from 0-255.
05-13-2012 08:29 PM
Post your VI.
You should be able to add +1 to the value in your array to increment it by one bit.
05-14-2012 10:20 AM
I attached my vi...I'm trying to change the Data write controller to automatically update from 0-255
05-14-2012 10:50 AM
You have several issues:
05-14-2012 01:44 PM
05-14-2012 01:58 PM
You can use a couple of For Loops with autoindexing enabled to build the arrays based on the i iteration terminal.
05-14-2012 03:35 PM
smercurio_fc and Raven Fan,
I appreciate your help, I got it working!
Now the next step for me is to plot the analog output on a graph but have it save the previous reading so at the end of the for loops the graph will look like stair steps similar to what I've attached. Any ideas on how to do this? The Y-axis will represent the amplitude and the X-axis will represent the bit value. I'm testing an 8 bit DAC so that gives me 256 bits to test. Any suggestions?
Again thanks for the help.
05-14-2012 03:45 PM
By the way, there is no need to add 0 to a number. You wind up with the same number!
If you want to keep the history of past data points, you want a waveform chart, not a waveform graph.
If you want it to look stair-stepped, that is one of the porperties you can set for the plot on the chart. Right click the chart and select properties.