Tagged: component modeling
29/04/2019 at 08:17 #14018
I wanna to model a two-way variable and signal-controlled conveyor,but I failure.Who has a good idea？
Thanks in advance.
You need to login in order to like this post: click here29/04/2019 at 11:01 #14037
You can do it with two way path behaviour, boolean signal and python script which changes the path direction on signal events.
Check the attached example. There you can change the conveyor direction by manually setting the signal “Direction” True/False on the signal panel.
Note that the attached line components should also be able to work as both inputs and outputs. In the example the feeder cannot do that so if you change the flow direction backwards the box cannot proceed back to the feeder. But you could put a Shuttle Conveyor for example in between the feeder and the two way conveyor and create a routing rule on it so that it can transfer those boxes back to a different location.
You need to login in order to like this post: click here30/04/2019 at 13:00 #1406430/04/2019 at 13:19 #14078
Well I don’t know how you want to integrate it. But I can give you some pointers:
Python1234567891011121314151617def OnRun():sig.signal(True) #signal-controlledcomp = getComponent()sensorSignal = comp.findBehaviour('SensorSignal')startStopSignal = comp.findBehaviour('StartStop')while True: #Change this to while True: if OnRun -loop is neededtriggerCondition(lambda: getTrigger() == sensorSignal and sensorSignal.Value)part = sensorSignal.Value# Create your logic here# ....# ....sig.signal(False)delay(3)sig.signal(True)
- OnRun method on the script is called when simulation starts. On your example that method contains few handle assignments and “while False” -loop. Change that to “while True” to enable the eternal loop (as script comment suggests).
- Inside the while loop triggerCondition method is basically a gate through which the script execution goes when a part arrives at the sensor. Also part handle is assigned on the next line. After this you can write some custom logic that should happen after part is at the sensor.
- For example the modification below make the direction of the conveyor change when part arrives at the sensor. Then there is a 3 second delay after which direction is changed back to normal thus creating a perpetual motion machine 🙂
BTW nice little line you built on the example layout.
You need to login in order to like this post: click here10/05/2019 at 08:02 #14265
Thank you for your help. 😀
In addition,could you give me some advice in these problems:
1. Create a component which behavior like Lifter. It has 3 ports:Port_1 transports IN&OUT,Port_2 only transports OUT,Port_3 only transports IN.
2. Whether it’s a Lifter or a Crossing Conveyor, I don’t want to change the direction of the part as it runs. I want the parts to keep the same direction as they are.
In this simulation:
What i expected:
Please check the attachments.
You need to login in order to like this post: click here10/05/2019 at 08:50 #14271
- I think you can use Lifter component as a starting point for your custom model. Just copy your custom geometry into the lifter component and delete or hide its original geometries. Then you may need to modify some behavior and frame locations but the logic should be pretty much similar. Finally save component as new component (Modeling/Save as) so that it gets a new VCID.
- To keep the orientation when part transitions from a path to another you can check the “RetainOffset” property. That works for your example layout for component “TwoWay_Conveyor #4” and its “TwoWayPath” behavior. For the lifter the “RetainOffset” property you need to check is in the “FlowProxy” behavior. After enabling those your layout should work so that parts keep their orientation.
You need to login in order to like this post: click here10/05/2019 at 11:19 #14283
Nice.Question 2 has been resolved. 😉
As for question 1, I actually tried to replace the geometry inside the Lifter. Due to the weak Python foundation, the logic of the flow has not been realized, especially from the port3 input, port1 output. I will keep trying.
You need to login in order to like this post: click here
You must be logged in to reply to this topic.