LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

any tips on programming craps in labview?

Solved!
Go to solution

Figuring out how to make the dice work is difficult enough, but I'm no LabVIEW expert. The goal is to make a working craps game with a case structure. One case for each of the 6 dice, plus a 7th case for default. Everything has to be in a while loop with a timer and a master stop button. There has to be a button for the user to start a new game anytime. A numeric display and logic should be used to determine the score of the dice. Any pointers???

0 Kudos
Message 1 of 7
(4,232 Views)
Solution
Accepted by topic author TheBatman

Dice.png

 

Above is shown how te case structure has to be connected. I hope you can find rest out yourself because this pretty much basic.

If you still don't know, do a free Labview cursus.

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
0 Kudos
Message 2 of 7
(4,203 Views)

Change the multiplier to 6 and round toward -inf, else you'll get strange results. 🙂

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 7
(4,190 Views)

You mean like this?

dice2.png

What is the reason of the strange results?

Is the round to nearest not workign properly?

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
0 Kudos
Message 4 of 7
(4,188 Views)

Hi Koen,

 

Christian Altenbach has this explained somewhere else (a lot of times) before...

 

It's about probability of your RND values: when rounding to next you get different probability for values at the "edge" compared to values in the "center"!

 

Example:

Multiplying RND values with 5 results in values between 0 and 5. Rounding those values "to next" will give "1"-"4" more often then "0"/"5" as the range [0-0.5] is smaller than the range [0.5-1.5]...

Using RoundDownwards will always use the same range [0-1], [1-2], ... for rounding and so will have the same probability for each dice!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 7
(4,179 Views)

Oh, now I see it...

It's just common sense Smiley Very Happy

Thank you for yours explanation

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
0 Kudos
Message 6 of 7
(4,176 Views)

Thank you to everyone who provided input here. Your help is greatly appreciated and will definitely do me some good.

0 Kudos
Message 7 of 7
(4,141 Views)