LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with a graph

Hello,

 

I would like to move two Thorlabs NRT100 motors (via a Thorlabs BSC203 controller). The user needs to enter the settings (speed, acceleration, distance) and click on the go switch to begin the experiment. The program works very well but I would like to save the position on a graph. At the end of the program I just have two points (the two last positions of my motors). If somebody knows why, it could really help me.

 

Please find attached my VI.

 

Thank you for your help.

0 Kudos
Message 1 of 4
(2,247 Views)

The way your loop is set up (using a shift register), only the final value gets passed to the graph, so it only displays those last positions.

 

What you should do is have another tunnel out of the while loop that performs indexing. (See example here: http://digital.ni.com/public.nsf/allkb/95FEE9F5B252507E862562BA00007657) That should solve your problem.

 

However, if you want something that updates after every point, you could change it to a chart and put in inside the while loop. (See example in above link, as well) But I'm not exactly sure what you want here.

0 Kudos
Message 2 of 4
(2,231 Views)

Note that those while loops will only execute 1 time.  The stop terminal is ORed with a boolean wire that comes in from outside the while loop.  The source of that wire is numerous frames away (do you really need the sequence structure?  from what I see you don't.) that is coming from another while loop's stop button, which must always be True in order for that first while loop to end.

0 Kudos
Message 3 of 4
(2,220 Views)

Thank you a lot. I wasn't so clear but you answered to my question. Thank you.

0 Kudos
Message 4 of 4
(2,205 Views)