question

AboElfadl avatar image
0 Likes"
AboElfadl asked AboElfadl commented

Motor Stop and resume based on two photo eyes

I want to stop the motot "motor 1" if both photo eyes are blocked, otherwise the mototr is moving and resumed with no problem.
If both photo eyes (PE1 and PE2) are blocked, stop "motor 1." Resume its operation when at least one of the photo eyes is no longer blocked.

1699366300493.pngMotor Desicion based on photo eye.fsm


FlexSim 23.2.2
photo eyeconveyor motormotors
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Jacob W2 avatar image
1 Like"
Jacob W2 answered AboElfadl commented

Hi @AboElfadl,

I have made a small edit to your model that allows the photo eyes to turn the motor on and off. I first connected the two photo eyes together using a center port connection, and then connected each photo eye to the motor. I then added a on block and an on clear trigger to each of the photo eyes. On the on block trigger I added an if statement that checks to see if both photo eyes are in the blocked state, if both are blocked, then I stop the motor. If they are not both blocked, then nothing happens.

The on clear trigger just resumes the motor once either of the photo eyes are no longer blocked. I also was noticing that you are getting a lot of exceptions and I was able to get rid of those by deleting the triggers on the Robot.

Motor control_JW.fsm


· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

AboElfadl avatar image AboElfadl commented ·
Thank you very much Mr. Jacob @Jacob W2


0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.