04-10-2011 06:38 PM - edited 04-10-2011 06:43 PM
Hi,
I am trying a LabView program where 20 numbers are generated in one VI which is then remotely displayed in another VI. Well I got the numbers to generate on the remote VI but when I move the cursors to go over the controlling VI (vi_ref0_s11) where the graph is displaying the 20 random numbers it doesn't simultaneously move (the yellow horzontal line on the other VI (the cursor_remote). How do I fix this ?
Included are the two VI's. First run the vi_ref0_s11 and then it will prompt you to open the other VI which is cursor_remote_vi. Thanks.
I would appreciate it if someone fixed it and uploaded the VI's with the correct program runing.
04-10-2011 08:07 PM
If I understand you correctly, you want the cursor on one graph to show up on the other.
If that's the case, then you have to program it that way.
You asked for the value of the array.
You received the value of the array.
If you want to get the value of the cursor, then you have to transmit it from one side to the other.
If you want to do it via the GET CTRL VALUE (which is deprecated in LV2010, BTW), you'll have to run a loop on the sending side which fetches the cursor X_VALUE property and puts it into a control. Then the receiving side can see it.
TIP: If you want the value of the graph, just ask for the value of the GRAPH control. You'll get the same data, and you don't need to display it twice.
TIP: Give your CPU a break. Put a WAIT in the loop on the receiving side. Since you're doing nothing but showing a loop counter, it doesn't matter if you run at less than 15 MHz (That's what the loop is running at on my machine).
TIP: Save yourself some time and put a STATIC VI REFERENCE on the receiving side, instead of the dialog asking for the VI to run. Place the reference on the diagram, then drag the VI to the reference box. That way it'll know which VI to run and you don't have to tell it every time.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
04-10-2011 08:22 PM
I am not sure exactly what you want.
In vi_ref0... you get the Array value one time then you sit in a greedy loop waiting for the stop button to be pressed. What do you expect to happen?
When you move the cursors, are you moving them with the Coords controls on -cursor_remote or are you dragging them with the mouse? Because the Cursor.Position property node is written every 50 ms any attempt to manually drag the cursor is overwritten.
There are no cursors on vi_ref0... so it is not clear what you expect.
Due to the way dataflow works sometimes the Crtl Val.get is invoked before the Array indicator is updated. This results in no data being displayed in vi_ref0...
Lynn