stopping conveyors and having multiple transport surfaces
Hey I started working on this university project of creating a digital twin of physical model in lab. But I have run into some problems so the idea here is that the MU has to move to the position in front of gantry drive and then has to comeback on the same conveyor. While coming back, the turn table which is between two conveyors has to turn while also stoping TS which it has. My problems are...
1) Stopping the conveyor with drive sequence at a specific destination and for a chosen conveyor is not working.(professional licence not available for us yet!) I have used PLC signals and sensors, I can start the conveyor drives but cannot stop them.
2) Giving kinematic to conveyors is not working for me hence I have given all drive behaviours directly on CAD. Is there something I have missed for this not working?
3) And I still do not understand the movement of rotating turn table while two separate transport surfaces moving and stopping MU whenever needed. I cannot seem to be able to do them simultaneously. I have seen and tried to use parent drive but it did not work. I have also seen many videos and read manual in website multiple times but giving multiple(linear & rotational) drives and stopping them is still not possible for me.
4) is it possible to rotate the turn table only when coming back and not while moving forward? if yes, any hints to how would be great.
Thank you in advance! Moving MU
Customer support service by UserEcho
Any help with any of the above problems from community members too is absolutely welcome.
to your questions:
You can attach a DriveSimple behavior model to the Drive (see here https://doc.realvirtual.io/components-and-scripts/motion/drive-behavior#drive-simple) and connect a PLCOutputBool to Forward. If the PLCOutput will be TRUE the drive/conveyor will move and if it is FALSE the drive/conveyor will stop. Please also check the demo scene here - you will see there an example: https://doc.realvirtual.io/basics/demo-model
I think you mean for example rotating conveyors. You need to use ParentDrive function (see here https://doc.realvirtual.io/components-and-scripts/motion/transportsurface#transport-surfaces-and-unity-physics). You find examples for that in the demo scene TurningAndLiftingTransportSurface which can be found here: Assets/game4automation/Scenes/TurningAndLiftingTransportSurface.unity
see also 2) for making a system like in the video shown move you need to use C# Scripting or Playmaker or LogicSteps (only in Professional) and you consider the ParentDrive thing which is mentioned in 2)
I don't understand the question but you can decide how to rotate the turntable by moving it forward and backward. You could also use for a turntable this https://doc.realvirtual.io/components-and-scripts/motion/drive-behavior#drive_cylinder and by one or two PLCOutputBool you could move the turntable forward and backwards whenever you like. DriveSequence is not able to do complex things. Here you really need to use Sripting or Playmaker.
Hope this helps.
Thanks for the response I got answers to Q1 and Q3 I will try them out and it will work.
But What I meant with Q2 was as you see in the video I have uploaded, for all conveyors I have given drives and drive behaviours directly on CAD structure/hierarchy. But for the gantry, I have used kinematics instead of changing the cad structure as you showed in one of the recent tutorials. So I was wondering if it is impossible to give kinematics linking to Conveyors or transport surfaces too?
Q4) What I meant was the MU shown in the video will start from the right end of the scene and stop in front of the gantry which is at the left end. During this motion, the turntable should not rotate (only linear movement of Transport surfaces on TT).
But when the MU is coming back in the same conveyor (after it has been worked on by the gantry drive) the turn table has to rotate so that MUs will be transferred to the conveyor which is placed perpendicular to the turn table (see the video to see perpendicular conveyor) This completes one cycle and then this will repeat to all MUs. So how can I give two different responses (Linear or rotational) from one signal (MU detected --> True) on the conveyor?
As for scripting, I am not from a programming background but I am comfortable with Python. So is it possible to do scripting with Python instead of C#?
Thanks in advance again!
This is where you need scripting because you can't start two different functions with one signal. Usually in PLC programming you are saving the state, e.g. State = "MUEntry" or State = "MUExit".
With Unity you need to learn C# if you want to do complex logics inside of Unity. Or you connect a real PLC - but programming a real PLC is even more complicated than C# inside Unity. So if you know Python it should be straight forward to learn C# basics. There are plenty of C# docs out there.
Now you make certain parts of your logic just run based on the State e.g. (please note this is NOT the full code for your problem, it is just showing the approach).
if (State == "MUEntry")
LinearMovement.Value = true; // Signal for linear Movement
if (State == "MUExit")
RotationMovement.Value = true; // Signal for rotation Movement.
Thanks for the response