MATLAB Answers

0

Help newbie with timer functions.

Asked by Jordan Jenkins on 4 Jul 2019
Latest activity Answered by Sai Bhargav Avula on 29 Jul 2019
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 Comments

Sign in to comment.

1 Answer

Answer by Sai Bhargav Avula on 29 Jul 2019

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 Comments

Sign in to comment.