LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Solar System vi - Adding Multiple Earths

I am currently undertaking a project and I am looking to implement a 3D display similar to that in the solarsystem.vi.

 

I am looking to add multiple objects related to one object (e.g multiple earths at different positions from the sun). I have tried using a FOR loop but I am not sure what it should be placed around.

 

Any help would be much appreciated.

 

Thanks

0 Kudos
Message 1 of 8
(3,488 Views)

Here are some thoughts if I understand correctly what you want to achieve....

1. If you want lets say 3 earth to be positioned at different location you can create 3 earth objects and accordingly place or move the object (similar to shown in Timeout event case of solarsystem.vi).

2. If you want lets say 3 earth to appear at different position one at a time then use one earth object and again place or move the object as needed.

 

Not sure of the for loop you mentioned until ofcourse I am missing the complete point?

*************************************************
CLD
*************************************************
0 Kudos
Message 2 of 8
(3,466 Views)

Hi,

 

My reason for trying to implement a FOR loop is that for my project I have to create a 3D visual representation of a

number of robots moving around on a grid. Hence there will be a number of robot objects created that will be related to the floor object (Hence various earths related to the sun)

 

The number of robots will be changing according to how many are connected to the system, so this is why i was trying to use a FOR, say FOR n robots connected N robots will appear on the screen at various positions.

 

I currently have one robot appearing on the screen but I struggling to get more.

 

Hope makes it a bit clearer.

 

Thanks

0 Kudos
Message 3 of 8
(3,436 Views)

ok so first you should check how many robots are connected. If there are 3 robots connected then run the loop for 3 times, which I am sure you know. For the placement of the loop you will have to place it around where the earth object is created. Enable looping (or use shift register) to keep all instance of object created and then the while loop should process each instance of the object created.

*************************************************
CLD
*************************************************
0 Kudos
Message 4 of 8
(3,400 Views)

Hi,

 

I think that is what I have tried here but it doesn't seem to be operating in the correct manner.

 

Cheers

 

 

 

 

0 Kudos
Message 5 of 8
(3,384 Views)

The previously attached vi is an attempt at what I am untimately trying to achieve and is perhaps more complicated than needs to be posted. In that VI i have attempted to create multiple objects at various positions and have them rotating and moving to the top right of the grid.

 

This vi displays one robot on the grid in the centre. What I am trying to achieve is a number of robots positioned at varioius coordinates on the grid (Attempting for five at the current time - but this value will be changing, hence the FOR loop.)

 

This might be of more help to post.

 

Thanks

 

 

0 Kudos
Message 6 of 8
(3,369 Views)

Hi Pat,

 

How are you getting on with this?

 

At the time of writing you were only able to get one object on the display. (I have followed your instructions and have managed to do this also).

 

From what I understand you are essentially trying to get numerous robots positioned at various co-ordinates?

 

Is it expected that these will be moving?

 

 

Kind Regards

Michael
NIUK Application Engineer
0 Kudos
Message 7 of 8
(3,296 Views)

Hi,

 

Yeah managed to solve this using a FOR loop. I have attached the VI to show. The robot.vi just imports a CAD file which can be changed to a simple box and both the floor and robots have jpegs wrapped around them which I have not uploaded.

 

Is this the most efficient way to tackle this problem? 

 

 

Cheers

0 Kudos
Message 8 of 8
(3,279 Views)