LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Maze simulation

Solved!
Go to solution

Hi,

 

i've made a simulation of a robot (the red dot) which finds its way trough a maze.

I think it takes the most time to create the picture so i added an option to make it refresh less.

The drawing of the picture has no output other than the picture itself.

Is there a way to do this in parallel, so the program can go on with the other calculations, while the picture is made?

 

The file 'simulatie' is the main file, which needs the others (sub-vi's)

 

Ragnar

 

(Is there a way to customize the appearance of wires, so the main data lines are different than the other wires?)

Download All
0 Kudos
Message 1 of 5
(3,182 Views)

What are typical default values to run it? The current defaults don't produce anything interesting.

 

0 Kudos
Message 2 of 5
(3,166 Views)

They do (at my pc), but you have to run it more than once, cause the discision whether there is a wall or not is random (p=50% at default)

0 Kudos
Message 3 of 5
(3,160 Views)
Solution
Accepted by topic author Raggie

Dear Raggie,

 

you can consider the producer consumer design pattern. Just create a queue with your data type (see attached picture) and for case true write to queue; case false do nothing. Do the picture calculations in your consumer loop; no timing needed since it just waits for an element, so it is synchronized with your producer loop.

You can not change the appearance of wires, however it is good practice to keep your main data wires (and also references) in a straight line, label those wires as well.

 

Best regards,

Martijn S
Applications Engineer
NI Netherlands
0 Kudos
Message 4 of 5
(3,043 Views)

thank you

0 Kudos
Message 5 of 5
(3,012 Views)