Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to do a check in my macro that either a radius tool or end mill is selected but I only seem to be able to get it to work when querying one of the two things but when I want it to query both of these things it doesn't seem to work as expected.
Code that doesn't work:
STRING $Tooltypes = entity('tool','').type
WHILE NOT ($Tooltypes == "tip_radiused") OR ($Tooltypes == "end_mill") {
MESSAGE ERROR 'Wrong tool type selected'
MACRO PAUSE "Please activate suitable slot drill" +CRLF+ "for predrill machining"
$Tooltypes = entity('tool','').type
}
Also code that doesn't work:
STRING $Tooltypes = entity('tool','').type
WHILE NOT ($Tooltypes == "tip_radiused") OR NOT ($Tooltypes == "end_mill") {
MESSAGE ERROR 'Wrong tool type selected'
MACRO PAUSE "Please activate suitable slot drill" +CRLF+ "for predrill machining"
$Tooltypes = entity('tool','').type
}
Code that does work:
STRING $Tooltypes = entity('tool','').type
WHILE NOT ($Tooltypes == "tip_radiused") {
MESSAGE ERROR 'Wrong tool type selected'
MACRO PAUSE "Please activate suitable slot drill" +CRLF+ "for predrill machining"
$Tooltypes = entity('tool','').type
}
Also code that works:
STRING $Tooltypes = entity('tool','').type
WHILE NOT ($Tooltypes == "end_mill") {
MESSAGE ERROR 'Wrong tool type selected'
MACRO PAUSE "Please activate suitable slot drill" +CRLF+ "for predrill machining"
$Tooltypes = entity('tool','').type
}
If someone can let me know how to fix this or an alternative way of doing this it would be much appreciated.
Solved! Go to Solution.