Hello Guest it is September 22, 2023, 05:08:50 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Student

Pages: 1
Hi everbody,

i'm tryining to code my own homing-script.
After homing my axes should move out of the home-switches.
But i can't get it to work - I'm very new to LUA!!!

It seems that my axes get never homed...
so i have written this script to test if axis-x is homed.
But after pressing the button RefAll-Home the axes move to the homing-switches, but the axes are never homed!

Code: [Select]
local homed_x;
local rc;
local inst;

inst= mc.mcGetInstance();
homed_x, rc = mc.mcMotorIsHomed(inst, 0)

if (homed_x == true) then
   rc = mc.mcCntlSetLastError(inst, 'homed')
   rc = mc.mcCntlSetLastError(inst, 'not homed')

Sorry for my bad english!

Pages: 1