07-09-2014 01:41 PM
Hello,
I would like to design a user interface where the user can define the analog voltage level of a specific analog channel for a certain amount of time. Essentially, I need a 2D array where the columns represent each channel on the PCI 6711 board (Ao 0:3) and the rows represent a specific amount of time for each row to last. I'm assuming there would need to be another 1D verical array with integers representing the number of clock ticks each row will last for. I can't seem to find any example code where this is implemented, so examples or suggestions would be grealty appreciated. I have included a picture of a different program that performs this and I would like to mimic this setup.
Solved! Go to Solution.
07-09-2014 09:34 PM
The simple way to control the output level is by using the "In Range and Coerce" function, where you can control the minimum and maximum levels. You may have to build a timer where you check the time depending on an array of values one by one and at the same time set the min and max values. So whenever the timer reaches the specified time, you can go to the next element in the array and set the min and max values.
07-10-2014 02:25 AM
07-10-2014 08:39 AM
I think i prefer the for loop method as i have built a similar program for digital output. I seem to be having an issue with the buffer for some reason. When running this program (attached), it immediately says;
Generation cannot be started, because the selected buffer size is too small.
Increase the buffer size.
Selected Buffer Size: 1
Minimum Required Buffer Size: 2
i'm not quite sure how to adjust this.
Also i was a little confused by the line where you said to index the time column and wire it to a delay, I wasn't sure if you meant to run it through its own index array or use it as the index of the array subset.
07-10-2014 09:42 AM
07-10-2014 09:57 AM
Should the delay be inside the for loop?
07-10-2014 10:19 AM
07-10-2014 10:25 AM
07-10-2014 11:08 AM
Admittedly, I got pretty lost when trying to correctly manipulate this array. I thought adding a second 1D array to determine time might work. I think this new setup is closer, but for some reason the array it makes is a vertical 1D array with 60 rows.
07-10-2014 11:58 AM