Re: Syntax: General Questions
hy vibi local variables format : ** or **^ or **^^, where *=A..Z and ^=*+1..9
1st char to be <> N O P V, so to avoid confusion to block names, soubroutines, etc
examples : XS=1, XST=-1.23 XSRT=45/25
//
make that code shorter
NLOOP G1 X=XSRT F0.01 XSRT=XSRT+.01
IF [ XSRT LT 123 ] NLOOP
or even this
NOEX G1 F0.01 G95
NLOOP X=XSRT XSRT=XSRT+.01
IF [ XSRT LT 123 ] NLOOP
//
these will perform the same :
... IF [ ] NLOOP
... IF [ ] GOTO NLOOP
* will jump to 1st NLOOP adrress from begining of program, regardless of your IF position, thus search start is relative to program start, not to current executed block
even more, the search is done in current nesting level only, good to know if you wish to stack soubroutines
//
avoid NAT60, not because is not working, but such NAT** are more used in okuma codes for restart at tool index, so many have a habit to use it only for that ... like a fanuc guy, that has a habit for g28, so to speack
//
to pass local ( vanish with reset, power off ) to global ( resists after reset, power cycle ) :
XSTR=1
VC1=XSTR
or
XSTR=1 VC1=XSTR
or
XSTR=1 VC[2]=XSTR
thus VC1 and VC[1] target same content, as global variables are array type ... or whatever
//
there is a function to pass strings, and i have to search the examples, that shows it in the allarm zone
please, feel free to ask anything, i am easy with coding / kindly
Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg