07-10-2021 02:47 AM - edited 07-10-2021 02:48 AM
Hi, I am a beginner to myRIO and LabVIEW. I am trying to run two ultrasonic sensors simultaneously by modifying the code from here . (Credits to the owner with multiple thanks!)
Below is the main VI file of the coding. However, when I try to run, I found out that only one ultrasonic sensor can run at a time, while the other remain 0.
After multiple times of closing and opening the file, I found out that sometimes the first ultrasonic sensor can work and sometimes the second can work. While one can work, the other remain 0cm.
May I ask how should I modify the code so that I can run both of them simultaneously? Especially how can I modify so that the main VI is able to accept two inputs from the pulse files together?
Thank you very much in advanced!!
07-10-2021 08:54 AM
You can't run the FPGA VI twice in parallel. There is only one FPGA in your myRIO and only one FPGA bitfile can run at the same time. You will have to modify the FPGA VI to handle both sensors in parallel and report their value in their own individual register (front panel control) and then query these two registers in your realtime application.
07-14-2021 03:26 AM
Thank you very much for the reply!
May I ask do you have any other example code on this? Because I am quite new so it sounds a bit complicated for me 😞 I apologize for any inconvenience caused.