01-16-2014 07:09 AM
Hello,
I have been working on my Game of Life 3D and was wondering if anyone would have a look and give me any feedback, positive or negative. I feel like it has gone well so far and any feedback would be greatly appreciated.
Still wondering if anyone else has had a go at anything like this before?
The SubVI's are needed to run the program and basic information is given on how to run it, if more explanation is needed then just ask and will be happy to add more detail into getting it working.
Thank in advanced, Myron
01-16-2014 11:50 AM
I see several problems.
1) Your button selection scheme doesn't appear to work correctly. Also, why are you comparing your buttons to a true? The button itself is either true or false, you don't need the comparison operator in there.
2) Check the mechanical action of all the buttons. Continuous and Pause shoud have a Latch action instead of a Switch action.
3) The block diagram of your Life or Death VI is so messy it's impossible to tell where the wires are going. Clean it up. I don't think it's wired the way you intended it to be. Get rid of all the duplicate +1 and -1 primitives.
4) In both the Life or Death VI and the 3D Array to 3x1D arrays VI you are checking to see if a double is equal to 1. Due to rounding errors this comparison will usually be false when it should be true. Instead, round to nearest then convert to an I32 and compare to and I32 value of 1.
That should get you started.
01-16-2014 01:12 PM
Hey,
Thanks for the feedback, I didn't realise about the buttons, I am pretty sure that they work as they should, sometimes it doesn't read a click on the continious when it is paused, I think that is due to it scanning the rest of the program.
I have tried to sort the wires out for the Life and Death SubVI, I am unsure how better to organise it, I could add diagrams of which cells is which if necessary:)
I didn't realise about the rounding of numbers that LabVIEW does, I am relatively new, thanks
With the button comparision I was unsure how else to recognise if the button has been pressed, that is why I had that comparator which would compare if the button is pressed and if so assign a number to the case structure to run a certain case, which would correspond to the button pressed.
Thanks again, if there are any other stupid mistakes I have done I would be very happy to take feedback, I have included the changes,
Thanks, Myron
01-16-2014 01:21 PM
Look at this for better organization of your block diagram.
01-16-2014 02:00 PM
Wow... Thanks, so much better!
I guess I need to learn how to tidy my programs up better:P
01-16-2014 02:31 PM
Let's think about how you want the controls to operate. Here's my thoughts:
The Continuous button is not needed.
Once the program starts the Volume of Cube and Living Percentage controls should be disabled and grayed because they don't work.
Does this fit with what you were thinking?
01-16-2014 03:08 PM
Yeah, that makes more sense and easier... Thanks!
01-16-2014 03:10 PM
Please post your revised VIs when you're done with them. No hurry, I'd just like to see how your changes look.
01-16-2014 03:26 PM
I have made the changes to the button and they work well, but I am unsure how to hide the volume and percentage controls after the program is ran:/
Also, is there anything else you think I should add any features or anything else?
Thanks for all the help!:)
01-16-2014 04:22 PM
To disable and gray a control/indicator right-click on the control and select Create|Property Node|Disabled. Drop the Property Node on the block diagram, right-click on the node, and chose Change All to Write. Now right-click on the property and select Create|Constant. You can use the same constant for both property nodes. Make sure you wire the error cluster out of to the structures so you know when the controls are disabled and don't forget to enable the again when the VI stops.
You should also move your delay out of the case structures and just have it in the loop.
You didn't fully understand about comparing doubles.