hello
among other things, i have tried to create codes for :
... saving, loading and reseting load monitor values
... faster coding for VLMON
... enhance the safety for long time series
in november 2017 all those became a single unit. I did not shared it, because i needed to be sure that it works ... and it works
this is how i code the load monitor inside the main program:
Code:
NOEX V166 = -1 ( it requires a common variable )
CALL OLM64 ( adress64 : general protection activated right at the begining of the program )
CALL OLM01 ( adress01 )
cutting something
CALL OLM02 ( adress02 )
cutting something else
CALL OLM64 ( adress64 again )
some cutting
CALL OLMOF ( load monitor disabled, near the end of the program )
after that i open a *.min, and i input the monitor values :
Code:
NOEX VLMXB [ 1 ] = ...
NOEX VLMX1 [ 1 ] = ...
NOEX VLMX2 [ 1 ] = ...
NOEX VLMMB [ 2 ] = ...
NOEX VLMM1 [ 2 ] = ...
NOEX VLMM2 [ 2 ] = ...
save + select + execute : it generates a master ssb soubroutine and i'm done !
advantages :
- all vlm*b,vlm*1,vlm*2 functions are grouped inside a single file
- no need to write the value for the VLMON :
... for example, if i wish to monitor C into #3, i won't write VLMON [ 3 ] = 4, but only CALL OLM03 : is easier and faster
... there is no VLMON [ arg ] = 0 lines , thus less code to right inside the program; status of a load monitor adress ( on / off ) is handled inside the master soubroutine that is generated automatically
- even if i don't use a VLMON for a specific operation, there is always active, in background, a monitoring value, which saves the day; examples :
... a drill broke, and the threading tool did not get damaged ( background Z monitor stopped the cnc )
... a reamer got stuck ( background M monitor stopped the cnc )
... too many chips got pressed between turret and cabinet ( Z again )
master benefit is not that the coding time is reduced, but that during cutting, all axis are monitorized : it gives peace of mind, especially when it stops the cnc and prevents damage; the stopping is not brutal, just stops check, replace, restart : that's all !
this one + tool offset checking so to prevent operator error + lower torque value for the rapids = less worries
what happens inside the min file :
... 1st of all, it resets all load monitor values ( if there is something from a previous setup, it will be gone instantly )
... it loads into #64 all the admisible limits : i use XZCYM = 80% + none for S
... it checks each load monitor value inputed, and inserts admisible limits into the axis that had not been declarated : for example, into #1 which uses only X, it will fill automatically ZCYM with 80%; also, for #2 which uses only M, it will fill XZCY with 80%
... data is written into a G-code format, and saved with ssb extension
pls find these codes :
... content for the min ( it is required to edit only the blue lines )
... example of a ssb generated by the min file / kindly
Code:
CALL ORSLM
NOEX VLMXB [ 1 ] = 21 ( debitare ebos )
NOEX VLMX1 [ 1 ] = 22
NOEX VLMX2 [ 1 ] = 23
NOEX VLMMB [ 2 ] = 30 ( burghiu )
NOEX VLMM1 [ 2 ] = 33
NOEX VLMM2 [ 2 ] = 36
NOEX VLMXB [ 3 ] = 18 ( debitare finitie )
NOEX VLMX1 [ 3 ] = 19
NOEX VLMX2 [ 3 ] = 21
CALL OAMV
M02
( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
ORSLM ( reset load monitor )
NOEX LV01 = 0
NHERE NOEX LV01 = LV01 + 1
NOEX VLMXB [ LV01 ] = 0 VLMX1 [ LV01 ] = 0 VLMX2 [ LV01 ] = 0
NOEX VLMZB [ LV01 ] = 0 VLMZ1 [ LV01 ] = 0 VLMZ2 [ LV01 ] = 0
NOEX VLMSB [ LV01 ] = 0 VLMS1 [ LV01 ] = 0 VLMS2 [ LV01 ] = 0
NOEX VLMCB [ LV01 ] = 0 VLMC1 [ LV01 ] = 0 VLMC2 [ LV01 ] = 0
NOEX VLMMB [ LV01 ] = 0 VLMM1 [ LV01 ] = 0 VLMM2 [ LV01 ] = 0
IF [ LV01 LT 64 ] NHERE
RTS
( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
OAMV ( adjust monitor values )
FWRITC res-olmts-v11.ssb;A
CALL OAMV3 ( write blank line ) (*2)
CALL OTIME
WRITE C
CALL OAMV3 ( write blank line )
( '1234567890123456' - max 16 chars )
NOEX PUT 'OLMOF ( Load Mon'
NOEX PUT 'itor OFf )'
WRITE C
CALL OAMV3 ( write blank line )
NOEX PUT ' VLMON [ V166 ]'
NOEX PUT ' = 0'
WRITE C
NOEX PUT ' NOEX V166 '
NOEX PUT ' = -1'
WRITE C
CALL OAMV1 ( write RTS )
NOEX V1 = 0
NHERE NOEX V1 = V1 + 1 (*1)
NOEX V2 = VLMXB [ V1 ] + VLMZB [ V1 ] + VLMSB [ V1 ] + VLMCB [ V1 ] + VLMMB [ V1 ] ( + VLMYB [ V1 ] )
IF [ [ [ V2 NE 0 ] OR [ V1 EQ 64 ] ] EQ 0 ] NJUMP
NOEX V3 = 0
NX IF [ VLMXB [ V1 ] NE 0 ] NWRTX
NOEX VLMXB [ V1 ] = 80 ( general protection limits for X axis )
NOEX VLMX1 [ V1 ] = 80
NOEX VLMX2 [ V1 ] = 80
NWRTX IF [ VLMXB [ V1 ] EQ 0 ] NZ
NOEX V3 = V3 + 1
NZ IF [ VLMZB [ V1 ] NE 0 ] NWRTZ
NOEX VLMZB [ V1 ] = 80 ( idem for Z axis )
NOEX VLMZ1 [ V1 ] = 80
NOEX VLMZ2 [ V1 ] = 80
NWRTZ IF [ VLMZB [ V1 ] EQ 0 ] NC
NOEX V3 = V3 + 2
NC IF [ VLMCB [ V1 ] NE 0 ] NWRTC
NOEX VLMCB [ V1 ] = 80 ( C )
NOEX VLMC1 [ V1 ] = 80
NOEX VLMC2 [ V1 ] = 80
NWRTC IF [ VLMCB [ V1 ] EQ 0 ] NS
NOEX V3 = V3 + 4
NS IF [ VLMSB [ V1 ] NE 0 ] NWRTS
NOEX VLMSB [ V1 ] = 80-80 ( S )
NOEX VLMS1 [ V1 ] = 80-80
NOEX VLMS2 [ V1 ] = 80-80
NWRTS IF [ VLMSB [ V1 ] EQ 0 ] NM
NOEX V3 = V3 + 8
NM IF [ VLMMB [ V1 ] NE 0 ] NWRTM
NOEX VLMMB [ V1 ] = 80 ( M )
NOEX VLMM1 [ V1 ] = 80
NOEX VLMM2 [ V1 ] = 80
NWRTM IF [ VLMMB [ V1 ] EQ 0 ](NY) NWRT
NOEX V3 = V3 + 16
( NY IF [ VLMYB [ V1 ] NE 0 ] NWRTY
VLMYB [ V1 ] = 80 ) ( Y )
( VLMY1 [ V1 ] = 80
VLMY2 [ V1 ] = 80
NWRTY IF [ VLMYB [ V1 ] EQ 0 ] NWRT
NOEX V3 = V3 + 128 )
NWRT CALL OAMV3 ( write blank line )
NOEX PUT 'OLM'
CALL OAMV2 ( write V1, with 2 chars )
CALL OAMV3 ( write blank line )
NOEX PUT ' IF [ V166 EQ -1'
NOEX PUT ' ] NJUMP'
WRITE C
NOEX PUT ' VLMON [ V'
NOEX PUT '166 ] = 00'
WRITE C
NOEX PUT ' NJUMP NOEX V'
NOEX PUT '166 = '
CALL OAMV2 ( write V1, with 2 chars )
NOEX PUT ' VLMON [ V'
NOEX PUT '166 ] ='
NOEX PUT V3 , 3
WRITE C
CALL OAMV1 ( write RTS )
NJUMP IF [ V1 LT 64 ] NHERE
CALL OAMV3 ( write blank line )
NOEX PUT ' ( grija la codu'
NOEX PUT 'rile de serie ca'
NOEX PUT 're se comporta d'
NOEX PUT 'iferit pe ultima'
NOEX PUT ' piesa )'
WRITE C
NOEX PUT ' ( este posibil '
NOEX PUT 'sa iti sara OLMO'
NOEX PUT 'N #64; in acest '
NOEX PUT 'caz, poate merge'
NOEX PUT ' sa-l pui dupa E'
NOEX PUT 'ND )'
WRITE C
CLOSE C
RTS
( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
OAMV1 ( write RTS )
CALL OAMV3 ( write blank line )
NOEX PUT 'RTS ( . . . . .'
NOEX PUT ' . . . . . . . .'
NOEX PUT ' . . . )'
WRITE C
RTS
( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
OAMV2 ( write V1, with 2 chars )
IF [ V1 GE 10 ] NJUMP
NOEX PUT '0'
NOEX PUT V1 , 1
GOTO NEND
NJUMP NOEX PUT V1 , 2
NEND WRITE C
RTS
( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
OAMV3 ( write blank line )
NOEX PUT ' '
WRITE C
RTS
( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
( X Z C S M W S2 Y B
1 2 4 8 16 32 64 128 256 )
( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
Code:
OLMOF ( Load Monitor OFf )
VLMON [ V166 ] = 0
NOEX V166 = -1
RTS ( . . . . . . . . . . . . . . . . )
OLM01 ( Load Monitor on for adress 01 )
IF [ V166 EQ -1 ] NJUMP
VLMON [ V166 ] = 00
NJUMP NOEX V166 = 01
VLMON [ V166 ] = 23
RTS ( . . . . . . . . . . . . . . . . )
OLM02 ( Load Monitor on for adress 02 )
IF [ V166 EQ -1 ] NJUMP
VLMON [ V166 ] = 00
NJUMP NOEX V166 = 02
VLMON [ V166 ] = 23
RTS ( . . . . . . . . . . . . . . . . )
OLM03 ( Load Monitor on for adress 03 )
IF [ V166 EQ -1 ] NJUMP
VLMON [ V166 ] = 00
NJUMP NOEX V166 = 03
VLMON [ V166 ] = 23
RTS ( . . . . . . . . . . . . . . . . )
OLM64 ( Load Monitor on for adress 64 )
IF [ V166 EQ -1 ] NJUMP
VLMON [ V166 ] = 00
NJUMP NOEX V166 = 64
VLMON [ V166 ] = 23
RTS ( . . . . . . . . . . . . . . . . )