Is it possible to retrieve getPreviousSection.WorkOffset ?

Is it possible to retrieve getPreviousSection.WorkOffset ?

ryankheather
Enthusiast Enthusiast
520 Views
3 Replies
Message 1 of 4

Is it possible to retrieve getPreviousSection.WorkOffset ?

ryankheather
Enthusiast
Enthusiast

I am using multiple work offsets on a 5axis heidenhain machine with a multi sided fixture. 

 

My issue is that plane spatial is not always called after the new work offset is called meaning the machine does not rotate to the new side of the fixture. I have got around this but at the cost of now the machine returning to the home position after every operation regardless of whether the work offset has changed or not.

 

I would like to compare the current section work offset with the previous section offset and from this have it decide whether to post the plane spatial. This should also allow more control of when the machine returns to the home position.

 

getPreviousSection.WorkOffset currently returns me "undefined" is there any way to retrieve this information?
0 Likes
521 Views
3 Replies
Replies (3)
Message 2 of 4

FTKnur
Collaborator
Collaborator

Hi @ryankheather,

 

Do you have a multi-part fixture?

Are you working with preset table or with the cam-pattern?

 

 

thats in the original heidenhain post:

 

  var newWorkOffset = isFirstSection() ||
    (getPreviousSection().workOffset != currentSection.workOffset); // work offset changes

 

If you use preset or pattern this doesn't work 😕

0 Likes
Message 3 of 4

ryankheather
Enthusiast
Enthusiast

Hi @FTKnur 

 

Yes multi-part fixture spread around 4 sides, I am working with the preset table as these are final op so want to make sure everything is positioned correctly.

 

Nice one, I'll have a look for that. 

 

The work offsets are changing correctly, its just not calling the spatial move again, I'm guessing as far as the post is concerned the plane position has already been set correctly as its just re running the same op again. But with the new work offset.

This isn't working for me is because my work offset is 180Deg rotated in the preset table. So I need the post to always re-set the plane after a new work offset is called, if the offset is different to the one in the last section, if not it is un-necessary unless the plane is actually changing. 

 

Ill have another go at this later and report back 👍

0 Likes
Message 4 of 4

FTKnur
Collaborator
Collaborator

Hey @ryankheather,

 

I solved this problem long time ago ...

 

		if (currentSection.workOffset > 0 && (getPreviousSection().workOffset != currentSection.workOffset)){
		     // reset and retract
		} else {
		     // reset all to zero
		}

...

define new WCS

...

 

I reset all after every operation and set it completely new. Only difference is retract or not between the operations. Its easier to jump to the correct operation without making mistakes.

0 Likes