Page 1 of 1

Subprogram with variables not working

PostPosted: Sat Dec 09, 2023 8:29 pm
by Ruslan
Hi, I just sterted to work with UCCNC(1.2115). I have a simple program with subroutine and variables that do spiral motion but it do not work corectly. It seems that subprogram doesn't know anyting about variables that I use in main program. I have another program similar to first but it works fine because it doesn't use vars in subprograms. I can't solve this problem. Maybe I don't know somethig important. Can anyone give me some info how to work with subprogram containing variables?
Many users say that they don't use hand coding, but I use it every days. I have retrofitted VMC and started to work with industrial cnc controller ADTech 4640 from China. It supports variables in subs and it is very stable system but it doesn't support probing, WCS rotation, mirroring and other useful features. So I decided to change it to UCCNC, but I am not happy because UCCNC has many bugs from version to version.
CILINDER_SPIRAL.NC
(346 Bytes) Downloaded 79 times
-- works fine in Cimco viewer but don't work in UCCNC
SPODPR1.NC
(251 Bytes) Downloaded 83 times
-- WORKS FINE IN Cimco viewer and in UCCNC

Re: Subprogram with variables not working

PostPosted: Sat Dec 09, 2023 11:07 pm
by cncdrive
UCCNC knows #variable values in sub progams just fine, the issue with your code is that UCCNC does not accept #var negations, so -# does not negate the value, but it makes UCCNC to not recognise the parameter value when the -# is after the axis word.