LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Shared Variable Help

Hey,

I need some help with shared variables. Here is what I'm trying to do. I run a vi on the computer that uses a camera to track certain objects. I would like this program to send the position of the object to another vi that is running at the same time on the speedy-33. The speedy-33 takes the position and rotates the robot towards the object. The problem I have is communicating the position from the computer to the speedy-33.

From what I've read, I think I'm supposed to do this with shared variables. On the computer target,  I created a library with an integer variable (to hold the x position of the object). I set this variable in the computer vi using the shared variable. All of this is in a while loop. On the speedy-33 VI, I've connected a control to the shared variable. When I run the program everything works as intended so far. When the object's x value changes the control on the speedy-33 front panel changes appropriately. However, when I try to drag the variable onto the speedy-33's block diagram from the project explorer I get a bunch of errors. The first is "My Computer\Variables.lvlib\xpos: Not supported for current target." Since it appears this isn't supported for the speedy-33 how am I supposed to transfer the data?

Hope all that makes sense.
Thanks
0 Kudos
Message 1 of 3
(2,735 Views)

@Squirell wrote:
Hope all that makes sense.

Well, I for one got lost somewhere in there. Didn't you say that you already had the shared variable in both the computer VI and the Speedy-33?

It may be a good idea to take a look at the Shared Variable Client-Server example, and perhaps test it to see if it, at least, can work on your setup.

I for one gave up on shared variables (flow control was just too much trouble) and am using "functional globals" instead. http://zone.ni.com/devzone/cda/epd/p/id/4364 was particularly helpful.

Message Edited by kehander on 02-20-2007 12:46 PM

0 Kudos
Message 2 of 3
(2,726 Views)
Yeah looking at that post again it doesn't make too much sense but the example you mentioned looks like it will be sufficent to get things working. If I need more I guess I'll come back and try to clarify

Thanks a lot
0 Kudos
Message 3 of 3
(2,714 Views)