TwinCat examples for how to use TcMC2.lib functions to control motor/linear rail?

beoborg

Member
Join Date
Oct 2012
Location
Tampere
Posts
1
I have Linear Rail/Step motor connected to my Beckhoff through EtherCat. I am just started to program this PLC systems. My project right now is to move "item" vertically, which is attached to this Linear Rail (Stepper motor)
http://www.isel-germany.de/products/product.php?lang=en&ID=p302

I have found couple examples from Beckhoffs infosys TcMC2.lib page. The first one "TwinCAT NC Sample PTP Move" is quite good, and using that I have tested my beckhoff system using same step motor, which is inside that linear rail.
http://infosys.beckhoff.com/english.php?content=../content/1033/tcplclibmc2/html/description/tcplclibmc_sampleprogram.htm&id=14149

I have tried to find more examples, but now luck. I am quite lost and stuck,
what to do next. Especially how can I be sure that my "item" does not move out side the rail borders? My device should have its "home" place upper end of the rail, and then it has 32 different locations where it should go when needed..

questions:

What kind of TcMC2.lib functions should I use in my situation?
I have now used MC_MoveAbsolute function, what might be the best in my case. There is 32 static locations and home. Maybe some struct/table, where should I put those positions

How accurate are those axis position values? After I have got my "item" to home place, can I use static position values, to drive The "item" there.

When program starts, how can I determine the outer limits of the rail?
There should be some kind of switches inside the rail, I think... Do I need to drive my "item" end to end first to determine outer limits, or is there something helpful in TcMC2.lib

How does the MC_Home function works?

P.S Does anyone know where to find more PLC examples for Twincat/Beckhoff
 

Similar Topics

Hi, i'm really struggling to get any decent examples of the above. Can anyone help??
Replies
3
Views
10,451
Hi! I am trying to run the 'SimpleSample' (https://infosys.beckhoff.com/content/1033/TF5100_TC3_NC_I/Resources/3438746891/.zip ) to understand the...
Replies
2
Views
98
I am developing a library in twincat and one of the function uses IID_ITcVnAccess_TcVnPoint2_DINT and the definition of this type is defined in...
Replies
0
Views
69
Sorry if this has been asked before, and apologies if this seems like a trivial issue, but I am new to Beckhoff and have been banging my head...
Replies
2
Views
142
Hi everyone, This is my first time posting, so please forgive any omissions or mistakes. I am attempting to control the velocity of a stepper...
Replies
18
Views
958
Back
Top Bottom