News:

SMF - Just Installed!

Main Menu

Elevator thesis project

Started by wilnyh, April 29, 2025, 02:17:04 PM

Previous topic - Next topic

wilnyh

Hello! I am making an elevator in the machine simulator program, it is supposed to work as a simulation model for educational purpose. The students are then supposed to program it with a PLC. The thing I am struggling with now is that I want to be able to regulate the speed of the elevator cabin. I want the movement of the cabin to be an analog output, so that if the value is for example 10, it will move with a certain speed upwards, -10 downwards and so on. I have been able to connect the movement to an analog output, but I do not know how to make it go both up and down and regulate the speed on the same output.

So to summarise, how do I make an analog output make the elevator go up, down and regulate the speed?


You cannot view this attachment.
Picture of the elevator.

EasyPLC_Master

You can do it in multiple ways.
One could be to use a Static Component and use the AnimationMove function, use the desired analog output as parameter for speed.

-void AnimationMove(string direction, float speed, float dest): Moves the component from the current position to the 'dest' position, at 'speed', in the direction pased as string "X" or "Y" or "Z". This function doesn't apply physics. The function must be called by trigger not by level.

wilnyh

Thank you for your answer.
My bad, I forgot to mention that the elevator cabin is in fact a static element and that it does move as I want. It is now connected to 3 different analog outputs, Level 1, Level 2 and Level 3. But I would like it to be only 1 analog output. So that the value of the analog output decides if the cabin moves up or down and the speed. Now it doesn't matter what value I put in, it only moves at the same speed to the same destination. 

EasyPLC_Master

Yes, using the indicated script code, graph code or controller function, you can use only one analog output to manage the position and other to set the speed.

The first function argument is the axis (Y in this case), the second the value of the analog output for the position and the third the value of the analog output for speed.