Homing in positive direction and assign value

Moderators: TomKerekes, dynomotion

Post Reply
Mateusz
Posts: 17
Joined: Thu Jun 06, 2019 8:36 pm

Homing in positive direction and assign value

Post by Mateusz » Fri Jun 11, 2021 8:01 pm

Hello Tom,

On the machine I have already mounted Home switches on very end of axis in positive direction, machine homing in positive direction and should assign a value lets say equal to work range.
I can not understand what I'm doing wrong in modified code below, I replaced a Zero(axis) with Pos(axis)=variable command but It just wont compile.

Regards
Mateusz
Attachments
SimpleHomeIndexFunctionTest.c
(841 Bytes) Downloaded 2 times
SimpleHomeIndexFunction.c
(2.23 KiB) Downloaded 3 times

User avatar
TomKerekes
Posts: 1426
Joined: Mon Dec 04, 2017 1:49 am

Re: Homing in positive direction and assign value

Post by TomKerekes » Fri Jun 11, 2021 8:12 pm

Instead of:

Code: Select all

	Pos(axis)=homepos;  //Assign declared position
The syntax is:

Code: Select all

	chan[axis].Position=homepos;  //Assign declared position
HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply