hi classical available syntaxes are " IF [ V1 EQ 1 ] N1 " or " IF [ V1 EQ 1 ] GOTO N1 " ; is not possible to combine IF + CALL
if you wish, check this out : https://www.cnczone.com/forums/okuma/304038-syntax.html
try this :
Code:IF [ V1 NE 1 ] NJUMP CALL OTHRD TPI = 18 ZSTRT = 0 ZEND = 0.735 NJUMP or use brakets, so to avoid executing that operation " ( CALL OTHRD TPI = 18 ZSTRT = 0 ZEND = 0.735 ) " or use "block skip" : " / CALL OTHRD TPI = 18 ZSTRT = 0 ZEND = 0.735 " * there are other methods
you may use also local variables to generate boolean behaviour; for example these 2 statements will both work : " CALL OSUB " and " CALL OSUB LV01 = whatever "
Code:OSUB ... IF LV01 N1 ( check if local variable exists ) ... RTS
why using "if" to call a threading operation ?IF [ V1 EQ 1 ] CALL OTHRD
where is the clearance ? also, use max 4 chars ...ZSTRT=0
are you sure that is ok to use a boolean behaviour for a threading operation ?I am writing this as boolean 0= Off 1=ON type of program
code versatility is a good thing to do; if you can describe more what you are after, i may suggest an approachThis is so we can only turn on what we need on our more basic stuff
sometimes i also have to enable / disable some operations, and i try to do it as fast as possible, thus with minimal edit time and with minimal code length
at this moment, i don't know what you are after
put some soubroutines on the machine, and teach the operators how to edit & run them; in the end, you wish for them to edit the parameters and create a chain of operations, and not to enable/disable individual operations, listed inside a rigid code
lack of optimization ( including macros and cnc panel programers : conversational / g-code, etc ) will definitely lead to cam overwork : there are things that a cam can't deliver, or are requiring to much time to be generated by a cam; this may lead to downtime and more employees / cncI am currently working on a main/sub program combo to do all the basic stuff to help take the load off of our very overworked mastercam programmer
kindly