question

Aries Vash avatar image
0 Likes"
Aries Vash asked Carter Walch commented

Photo-Eye Condition on Block

Hi, I would like to ask for some help regarding the condition to write for the photo-eye.

What I would like to do is to block the item and stop the motor if the current quantity in the queue reaches 3 boxes.

1691066046029.png

1691066127626.png

Photo-eye testing.fsm

FlexSim 19.2.4
photo eyeconveyor motoronblock
1691066046029.png (29.1 KiB)
1691066127626.png (215.2 KiB)
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

·
Carter Walch avatar image
1 Like"
Carter Walch answered Carter Walch commented

Hi @Aries Vash ,

You just need to change your condition so it's checking if the Queue content is equal to 3. A condition must return true or false. This stops the motor of the conveyor when Queue content is 3 and then it continues after items are processed1691071976256.png

1691071932659.png


1691071932659.png (57.3 KiB)
1691071976256.png (8.9 KiB)
· 2
5 |100000

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

Aries Vash avatar image Aries Vash commented ·
wow thanks, really got confused there I've tried content(Model.find("Queue1")) = 3 and I get error, never thought that it should be ==, may i have a question whats the difference between = & == ?
2 Likes 2 ·
Carter Walch avatar image Carter Walch Aries Vash commented ·
No worries. Single equal sign (=) is used for assigning values to a variable. Double equal sign (==) is used whenever we are testing a condition, we must use == because it returns a true or false
1 Like 1 ·

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.