made multi-channel field setting more generic to aid code reuse; added unit test for testing analog channel field setting