'table(102) to get ED3L axis alarm display on PC
axis_number = 0
idx = 0
WHILE TRUE
    'clock = TIME$ 'copy contoller time into variable "clock"
    'secs=MID(clock,6,2) 'extract seconds value
    'seconds=VAL(secs)'" reading the current Alaram from the Drive with Adrees 1 over ETherCAT'"
    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 (2) Axis.
        idx = VR(1000) AND $00FF 'separate the low byte to read the Alarm Code and
        'convert it TO decimal TO read in VR(1001).
        WA(50)
        TABLE(102, idx) 'table 102 to get single axis alarm on HMI in word
        WDOG=0
    ELSE
        idx = 0
        TABLE(102, 0) 'reset error flag
    ENDIF
WEND

