# LabVIEW

cancel
Showing results for
Did you mean:

## labview about random number and calculation algorithm

i have met the problem on the 2 labview program

1.

Build a VI that generates a random number between 1 and 49.

Divides the random number by a number specified in the front panel.

If the inputted number is zero, the VI program should turn on a LED in the front-panel to indicate a divide by zero error.

2.

Build a VI that functions like a calculation algorithm.

The Front Panel should have digital controls to input two numbers and a digital indicator to display the result of the operation (Add, Subtract, Divide, or Multiply) that the VI performson the two numbers. Use a slide control to specify the operation to be performed.

By using the format into string function, open and close file function, it will generate random numbers and save data to a spreadsheet file.

It should be recorded date, time, temperature values (real time and average) and comments elements into spreadsheet format of that data logger.

would anyone could help?

Message 1 of 4
(676 Views)

## Re: labview about random number and calculation algorithm

Of course we are very happy to help!

• Is there anything specific you need help with?
• Were you able to place all the mentioned controls and indicators on the front panel?
• Did you find the random number function?
• Did you find the divide primitive?
• Did you find the =0 primitive?
• Did you find the file IO functions?
• etc.

Where did you get stuck? Show us how far you got (attach your VI) and we will point you in the right direction. There are also learning resources listed at the top of the forum. Good luck!

Message 2 of 4
(668 Views)

## Re: labview about random number and calculation algorithm

Christian:

Deja vu assignments circa 2009 🙂

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 3 of 4
(632 Views)

## Re: labview about random number and calculation algorithm

@AnalogKid2DigitalMan wrote:

Christian:

Deja vu assignments circa 2009 🙂

-AK2DM

Oh, but so many new ways to do it with a LabVIEW Base license now!

I64s, Advanced Math functions in Base, Random Range poly added to the Numeric palette.....

"Should be" isn't "Is" -Jay
Message 4 of 4
(583 Views)