Giter VIP home page Giter VIP logo

opensml's Introduction

OpenSML

Open Sources SoftMotion Light For CiA402 Servo Drivers

Tips:
Here you can found .library file for codesys and beckhoff, you can just import and test it, Thanks elconfa.
There is suggest to read keba servoone usermanual to get more information about cia402.
And if you have any questions please feel free to push your issues.

Why

codesys is the best plc programming platform. With the Raspberry Pi, you can get an advanced plc programming environment at a very low price.

However, the softmotion license was canceled in the latest version of codesys for raspberry pi. (> 3.5.14.40, which means Raspberry Pi 4 must pay to get a softmotion license)

The motion control used by most customers is very simple and does not involve interpolation motion.

This project aims to provide the open source cia402 motion library for codesys or twincat users.

Target

In theory, an interpolation procedure can be made, similar to CNC. I am still working hard for this, but time is not guaranteed.

How

I only use ST (Struct text language) programming and add as many comments as possible.

Example for MC_Power:

Power_X(Axis:=Axis_X,xEnable:=Enable);

Example for Home And Absolute Position Move:

CASE iState OF
	0:
		Power_X(Axis:=Axis_X,xEnable:=xStart);
		IF Power_X.xDone THEN
			iState:=10;
		END_IF;
	10:
		Home_X(Axis:=Axis_X , xEnable:=xHomeEnable);
		IF Home_X.xDone THEN
			iState:=20;
		END_IF
	20:
		ProfilePosition_X(
			Axis:=Axis_X , 
			xEnable:=xMoveEnable , 
			xExecute:=xMoveExecute , 
			xContinueMove:=FALSE , 
			xRelativeMode:=FALSE , 
			diTargetPosition:=diTarget , 
			udiProfileVelocity:=udiVel);
END_CASE

Example for Cyclic synchronous Velocity Mode:

Power_X(Axis:=Axis_X,xEnable:=Enable);
SyncVelocity_X(
	Axis:=Axis_X ,
	xEnable:=EnableMove ,
	diTargetVelocity:=diTargetVel ,
	rAcceleration:=10000 ,
	rDeceleration:=10000 ,
	diCycleTime:=1000 ,
	xError=>Error);

TODO

FuncBlock Status Name
Struct OpenSML_Axis
Power OpenSML_Power
Reset (use OpenSML_Power)
Home OpenSML_Home
Halt OpenSML_Stop
MoveAbsolute OpenSML_ProfilePosition
MoveVelocity OpenSML_ProfileVelocity
MoveRelative OpenSML_ProfilePosition
Stop OpenSML_Stop
Jog 🚧 -
TouchProbe 🚧 -
Cyclic Sync Velocity Mode OpenSML_SyncVelocity

opensml's People

Contributors

feecat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.