06-17-2024 09:17 AM - edited 06-17-2024 09:20 AM
Hello sir,
I ask for help, previously I have made 2 programs using Lab View
1. calculate RPM (DAQ Assistance)
2. mass reading (VISA)
Unfortunately, I calculated that both use different microcontrollers. RPM with USB-6008, Mass with Arduino
Now my plan is to combine the 2 programs, previously the programs ran if opened separately, but I am having difficulty combining them, can anyone help me deal with this problem?
Please help
Thank you very much,
caption:
*Top code is the mass reading code using loadcell, hx711, and arduino
*Bottom image code calculates RPM with proximity and USB-6008
06-17-2024 09:41 AM - edited 06-17-2024 09:41 AM
The two loops run in parallel, if you want them to stop together with one stop button, you need to add a functionality called Queue Messages to exchange messages between the two loops. One option is to use master/slave design pattern where one loop is the master and the second is the slave.
The stop button is on the master loop, when the first one stops, the second receives the message and stops too.
06-17-2024 09:52 AM
06-17-2024 09:52 AM
06-17-2024 10:42 AM
@Hanif25 wrote:
will this work on 2 controllers running simultaneously?
Yes, if you write the code correctly. There are a number of problems, however with your code.
Bob Schor
06-17-2024 12:44 PM
Re- @Bob_Schor
Okay sir, now I'm starting to understand why this code can't run simultaneously
Sorry, I'm still using the default name, and it's true, I'm still unfamiliar with LabView
Yes sir, I will start trying to remove the scrip, thank you for the knowledge