Subprogram with variables not working

If you think you've found a bug post it here.

Subprogram with variables not working

Postby Ruslan » Sat Dec 09, 2023 8:29 pm

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 77 times
-- works fine in Cimco viewer but don't work in UCCNC
SPODPR1.NC
(251 Bytes) Downloaded 81 times
-- WORKS FINE IN Cimco viewer and in UCCNC
Ruslan
 
Posts: 22
Joined: Wed Jan 25, 2023 11:05 am

Re: Subprogram with variables not working

Postby cncdrive » Sat Dec 09, 2023 11:07 pm

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.
cncdrive
Site Admin
 
Posts: 4727
Joined: Tue Aug 12, 2014 11:17 pm


Return to Report a bug

Who is online

Users browsing this forum: No registered users and 3 guests

cron