11-03-2015 11:04 AM
11-03-2015 11:23 AM - edited 11-03-2015 11:25 AM
@Paige5 wrote:
Hi,
Thank you, this is very helpful. Why are you multiplying by 1024 and 768? I assume this is for sampling purposes? Also, I have attached a screenshot here. I want to only read in values from the index array if the value differs from the threshold, but the boolean value will only be 0 or 1. Is there a way to use a comparison function without immediately outputting a boolean value?
I know these are simple questions, but I am doing my best to learn and appreciate your help. Thanks!
So, let's look at this in a "Dataflow" paradigm.
Every 1/4th of a second iterate the inner while loop and reset the cursor position independant of any user interaction. (Read that carefully!) I almost garuntee that that is not what you wanted to code.
Then, IF the event structure exits the inner While Loop, re-read the user input and "Every 1/4th of a second iterate the inner while loop and reset the cursor position independant of any user interaction."
You really need to tell us what you want the user input to be and, how often you wish to update the cursor position.
11-03-2015 06:54 PM
For anyone who needs help with something like this, use the "split data" function to extract your x and y values. You cannot just select the row or column to extract your data, which is what I previously had.
So all you need is the while loop with the daQmx into the splitter, then each split data into the corresponding x/y place in the "set cursor position.vi". You can stop the program by pressing "ctrl" and "." at the same time, so you will be able to control the cursor again.
11-03-2015 10:50 PM - edited 11-03-2015 11:09 PM
Still seems wrong to me, since you acquire 1D data array per channel. You should do some data processing on it, no? Like calculating mean value or max value? If you post your recent VI people can give better advice. Is this a school home work, by the way?
Edit: Or if you need threshold calculation, it should be done on the full X and Y arrays...The recent VI threshold operation does not seem right to me.