News:

SMF - Just Installed!

Main Menu

UDC Rotary model3D in script code

Started by nato76, March 29, 2024, 10:15:55 AM

Previous topic - Next topic

nato76

Hello friends!

I made UDC with rotate model3D in Graph Code.
But I don't now how make it in Script Code.
Can anyone help?
I am attaching the udc file and picture with Graph Code.


Thank you for your help. :)

EasyPLC_Master

Hi Nato!

This is the code:

public void Main()
{

if(UC.GetOutput("On"))
{
float speed = UC.GetAOutput("Velocity");
Motor2.AnimationRotations(new Vector3(0, speed, 0));
if(speed > 0)
UC.SetInput("FbOn", true);
else
UC.SetInput("FbOn", false);
}
else
UC.SetInput("FbOn", false);


}
public void Physics()
{

}

public void Finish()
{
 
}

nato76

Hi EasyPLC_Master!

Thank you very much :)

Regards.