function ret=lj_get(p)
 
    pstruct = get(p);
    lj_handle = pstruct.Value;
    r = libpointer('doublePtr',0);
    calllib('labjackud', 'eGetS', lj_handle, 'LJ_ioGET_AIN', 0, r, 0);
    rstruct = get(r);
    ret = rstruct.Value;
