'table(102) -->> to send ED3L alarm-display code on PC
axis_number = 0 'according to your axis position on network - in this case -->> BASE(0)
idx = 0 'local register to get alarm decimal value
WHILE TRUE
    IF AXISSTATUS AXIS(axis_number).30=1 OR AXISSTATUS AXIS(axis_number).3=1 THEN
        CO_READ(0,axis_number,$603f,0,6,1000) ' Read the Error Code from Object $603F subindex0 of  - in HEX format
        'ED3M drive's (0) Axis.
        idx = VR(1000) AND $00FF 'separate the low byte to read the Alarm Code and
        'convert it TO decimal TO read in TABLE(102).
        WA(50)
        TABLE(102, idx) 'table 102 -->> to get ED3L axis alarm-display on PC
        WDOG=0 'disable master enable
    ELSE
        idx = 0
        TABLE(102, 0) 'reset error flag
    ENDIF
WEND

