Running 2 commands at same time
조회 수: 12 (최근 30일)
이전 댓글 표시
I am working on a data acquisition program. Within that program, i need the following functionality:
1- start recording data on a raspberry pi
2- send a command that triggers an output voltage from the pi, some time after starting recording (say 0.25 sec).
I spoke with a matlab engineer who was totally unfamiliar with what I wanted to do. I don't really care about the order. If issuing a command first that tells the pi to generate a trigger signal is easier that is easy to adjust the delay time, but the actual trigger has to start after the data collection starts. I'm not really running 2 scripts just 2 commands and I'd like them to be able to run non-sequentially, or parallel.
I don't really even know enough to ask Mathworks the right question. Any guideance would be helpful.
댓글 수: 0
채택된 답변
MathWorks MATLAB Hardware Team
2024년 7월 2일
Hi,
Your wokflow is possible by using targetHardware function,
Please feel free to contact our technical support if you need further assistance.
Thanks,
MATLAB Hardware Team
MathWorks
댓글 수: 0
추가 답변 (2개)
SACHIN KHANDELWAL
2024년 6월 26일
You might want to use the 'parpool' and 'parfeval' functions in MATLAB. These functions allow you to create a parallel pool for your computations, so you can run tasks simultaneously.
For more details, you can check out the MathWorks documentation on these functions.
If you need to wait for a while, you can use the 'pause' function.
Hope this is helpful!
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Support Package for Raspberry Pi Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!