macro_command main()
    short res = 0, idx = 0
    GetData(res, "Local HMI", LW, 101, 1)
    idx = 7
    if res == 1 then
        idx = 1
    end if
    if res == 8 then
        idx = 2
    end if
    if res == 16 then
        idx = 3
    end if
    if res == 32 then
        idx = 4
    end if
    if res == 64 then
        idx = 5
    end if
    if res == 128 then
        idx = 6
    end if
    if res == 0 then
        idx = 0
    end if
    SetData(idx, "Local HMI", LW, 261, 1)
end macro_command