Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Help newbie with timer functions.

1 回表示 (過去 30 日間)
Jordan Jenkins
Jordan Jenkins 2019 年 7 月 4 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hi Guys, I’m currently working on a project to identify RGB components (Legos) on a moving conveyor using a webcam, and hence sort them into corresponding bins using pneumatic cylinders. The image analysis section is working well, and positively identifies the colour of the Legos every time.
I am currently controlling the cylinders through an Arduino and some low trigger relays.
The issue I have is,at this moment I’m using pause commands to delay the actuation of the cylinders until the Lego block has moved from the camera to the push location on the conveyor, this creates an issue as the code pauses for the duration of the pause command and no more Lego blocks can be added to the conveyor until the code continues.
can I fix this with a timer? is there a way to queue the cylinder commands?
kind regards,
Jordan.

回答 (1 件)

Sai Bhargav Avula
Sai Bhargav Avula 2019 年 7 月 29 日
temporalCount() function gives you the elapsed time in milli seconds in each state. Using this the execution of commands can be organized in the state flow. Refer to the following link for better understanding of temporalCount().
You can refer to the below link to check other MATLAB functions that can allow you to organize the command execution.

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by