Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Help newbie with timer functions.

1 vue (au cours des 30 derniers jours)
Jordan Jenkins
Jordan Jenkins le 4 Juil 2019
Clôturé : MATLAB Answer Bot le 20 Août 2021
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.

Réponses (1)

Sai Bhargav Avula
Sai Bhargav Avula le 29 Juil 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.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by