From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

please help me- getting data from mouse

hi everyone,

 i can drew the arbitrary line on the xy graph, and i want to catch the data from points. but i do not know how to get these data. i try it but i only get 1 data on time. my target is catched these data and caculated them to export the steeper motors for position control.
cuold you tell me how to get these data from points which are created by drag the mouse. please help me,

here is attachment file,\\toolpathgenerator\tam.vi
0 Kudos
Message 1 of 7
(2,722 Views)

Your shift registers have every x and y point that is part of the curve. The problem is that you append a new pair constantly and not just when the coordinates change. That's why you think you only get one value. If you had searched through all of the array indexes, you would have seen the different values. Here's a quick mod that only appends new data when the coordinates change.

p.s. It was a pretty dumb idea to post an llb with that 'tam.vi' included. You used LabVIEW 8.2b23 to create it and that is an illegal copy.

0 Kudos
Message 2 of 7
(2,706 Views)
Thanks,
thanks for your advises in the copy right.
for your above attachment, i did not know how to get the values of  mouse coordinate from the x and y array when it is test running.

best regards,
Tung

0 Kudos
Message 3 of 7
(2,696 Views)
If you want the coordinates while the VI is running, just move the indicators inside the while loop and wire them to the two different shift registers.
0 Kudos
Message 4 of 7
(2,694 Views)
Thanks Dennis,

i found this problem,
thanks so much,

Ut
0 Kudos
Message 5 of 7
(2,685 Views)
i wrote the programme for 2 stepper motor as attachment file below. they are run. but when the "start" button is ON then the "emergency stop" is not effects.
for "emergency stop" functions, i used 4 limit contactors. if one of them is "on" then the programme will be stop.
but in fact, when the system is running, i can not stop if one of the limit contacor is on.
 
cuold you please help me to do with this problem.
 
thanks
0 Kudos
Message 6 of 7
(2,644 Views)
You've got way too many local variables in your main and subVI for me to soend a lot of time trying to figure out what is goiung on but once the front panel Start goes true, the Emergency Stop VI will not be called until the code inside the case statement finishes. That means that the subVI in the case statement has to finish as well. Your emergency stop should be in a separate while loop and it would also have to pass information to the subVI and to the for loop inside the case statement. The problem with that is a for loop cannot be stopped early. You should replace all for loops with a while loop. Have the emergency stop subVI set a notifier, write to a queue, or even a globabl variable.
0 Kudos
Message 7 of 7
(2,615 Views)