We've converted one of our production CNC machines from Siemens to Centroid and would like to see if we can figure out this Aliases feature.
Our production machine has several fixtures that we have a 3 proximity switch "bit" array we use to detect which fixture is in the machine and it runs the appropriate "Subprogram". If no sensor pickup the pattern file we want to run we run a "No_Program" routine to display a message and turn off off and open the doors etc..
I can likely change some logic around and will have to since there is no FOR function but, I'm trying to compare strings that should be contained within the Text Aliases. I get a "undefined variable" error on this. Tried lots of formats to compare these Strings; () [] == EQ
IF [<Subprogram>] == [<No_Program>] THEN GOTO 100 ELSE GOTO 9000
Thanks,
RobJ
DEFINE <Program> Text Aliases questions
Moderator: cnckeith
-
- Posts: 78
- Joined: Sun Nov 18, 2018 7:22 am
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: Yes
- Oak CNC controller: No
- CNC Control System Serial Number: CNC12-m39-104028
- DC3IOB: No
- CNC12: Yes
- CNC11: Yes
- CPU10 or CPU7: No
- Location: Western NY
DEFINE <Program> Text Aliases questions
- Attachments
-
- Text Aliases.txt
- (5.35 KiB) Downloaded 1 time
Rob Jackson
RJ Technical Services
RJ Technical Services
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
Re: DEFINE <Program> Text Aliases questions
I think the comparison operators (such as ==) only work with numeric variables, not with string variables.
Can you restructure your code to use program numbers instead of names?
For example:
will run the program file O1234.cnc as a subprogram.
Can you restructure your code to use program numbers instead of names?
For example:
Code: Select all
M98 P1234
(Note: Liking will "up vote" a post in the search results helping others find good information faster)