Info
此问题已关闭。 请重新打开它进行编辑或回答。
Help newbie with timer functions.
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
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.
0 个评论
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!