0% found this document useful (0 votes)
347 views

Problems:: Universidad Santo Tomás

The document contains two problems related to simulation and signal generation for an instrumentation and automation course. The first problem involves simulating a dice rolling game and tracking the number of attempts until the dice sum matches the gambler's number. The second problem generates the Fibonacci sequence using shift registers and displays the numbers with a 1 second period, and generates a configurable amplitude sinusoidal signal to control colored LED indicators based on the signal value.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
347 views

Problems:: Universidad Santo Tomás

The document contains two problems related to simulation and signal generation for an instrumentation and automation course. The first problem involves simulating a dice rolling game and tracking the number of attempts until the dice sum matches the gambler's number. The second problem generates the Fibonacci sequence using shift registers and displays the numbers with a 1 second period, and generates a configurable amplitude sinusoidal signal to control colored LED indicators based on the signal value.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

UNIVERSIDAD SANTO TOMÁS

FACULTAD DE INGENIERÍA MECÁNICA


Asignatura: INSTRUMENTACION Y AUTOMATIZACION
Autor 1 (S.E.Vargas); Autor 2 (J.D.
Rodríguez);Autor3,(J,E.Torres)

Problems:
1. Simulate the dice roll game. If the sum of the two dices does not match with a number placed by the
gambler on a numeric control, then throw the dices again. Show the sum of the two dices graphically
and count the numbers of attempts until the two numbers match. Finally, calculate the profits if the
player receives 5 USD at the start of the game and each dice roll cost him 1 USD.

Tips: and from the numeric functions pallet.


UNIVERSIDAD SANTO TOMÁS
FACULTAD DE INGENIERÍA MECÁNICA
Asignatura: INSTRUMENTACION Y AUTOMATIZACION
Autor 1 (S.E.Vargas); Autor 2 (J.D.
Rodríguez);Autor3,(J,E.Torres)

2.The Fibonacci sequence is described by:


F0 = 0
F1 = 1

Fn = Fn −1 + Fn − 2
UNIVERSIDAD SANTO TOMÁS
FACULTAD DE INGENIERÍA MECÁNICA
Asignatura: INSTRUMENTACION Y AUTOMATIZACION
Autor 1 (S.E.Vargas); Autor 2 (J.D.
Rodríguez);Autor3,(J,E.Torres)

Using shift registers on a While Loop, generate the Fibonacci numbers with a period of 1 second.
2. Generate a sinusoidal signal with fixed period of 2 seconds and configurable amplitude from 1 to 10.
Add green, yellow and red leds to indicate the actual value. If the signal instantaneous value is from
0 to 3, the green light should turn on. If the value is greater than 3 but lower than seven, the yellow
light will turn on. Finally, if the value is equal or greater than seven, the red light will turn on. Use
the Case structure.

You might also like