LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how could I operate ultrasonic sensor(fpga) and 9V motor(RT) simultaneously?

Hi, i'm new to labview myrio, and i'm doing this for my school final project.

I'm using HC-SR04 ultrasonic sensor to measure time of sonic, and myrio motor with motor adapter.

To measure ultrasonic sensor, i copied some code of fpga VI, and fpag VI looks like this.스크린샷 2023-12-10 185941.png

 

Next in RT VI, i used fpga interface to receive fpga VI's data and used time loop to make ultrasonic sensor check the distance instantly.

Those many orange calculation node is used to convert unit of distance, centimeter. RT VI looks like this.

스크린샷 2023-12-10 190003.png\

and this is front panel of RT VI

스크린샷 2023-12-10 191839.png

When I run RT VI, at first, ultrasonic sensor works well without error! It shows exact centimeter, but motor and led code doesn't work simultaneously.

When distance is lower than 5 cm, ultrasonic sensor stops by T/F stop, and then motor and myrio LED 2 works...

I want to make ultrasonic sensor and motor operate at the same time.

To solve this, what should I do? Do i need to use DMA fifo?

 

0 Kudos
Message 1 of 1
(411 Views)