LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Set Cursor Position Continuously

The 1024 X 768 is my monitor's screen resolution. If you want to cover the whole monitor surface, you have to specify the screen size of the monitor which you will use...
0 Kudos
Message 11 of 14
(1,272 Views)

@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!

 

Setcursor.JPG


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.


"Should be" isn't "Is" -Jay
0 Kudos
Message 12 of 14
(1,263 Views)

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.

 

0 Kudos
Message 13 of 14
(1,231 Views)

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.

0 Kudos
Message 14 of 14
(1,217 Views)